From 521a1f241c441478cf41cc0f93bb37f9403f011a Mon Sep 17 00:00:00 2001 From: Cuda-Chen Date: Thu, 21 Nov 2024 12:00:45 +0800 Subject: [PATCH] Debug --- virtio-snd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/virtio-snd.c b/virtio-snd.c index 6752756..a3537a8 100644 --- a/virtio-snd.c +++ b/virtio-snd.c @@ -168,6 +168,7 @@ typedef struct { uint32_t jacks; uint32_t streams; uint32_t chmaps; + uint32_t controls; } virtio_snd_config_t; /* VirtIO sound common header */ @@ -555,6 +556,7 @@ static void virtio_snd_cb(struct CNFADriver *dev, int framesp, int framesr) { + (void) in; /* reversed for future recording use */ #if 0 /* TODO: apply lock on guest_playing */ vsnd_stream_sel_t *v_ptr = (vsnd_stream_sel_t *) dev->opaque; @@ -790,7 +792,7 @@ static int virtio_snd_tx_desc_handler(virtio_snd_state_t *vsnd, // pthread_mutex_unlock(&virtio_snd_mutex); /* TODO: remove sleep once find the root cause of infinite loop in TX. */ - sleep(1); + // sleep(1); return 0; } @@ -1074,6 +1076,8 @@ bool virtio_snd_init(virtio_snd_state_t *vsnd) PRIV(vsnd)->jacks = 1; PRIV(vsnd)->streams = 1; PRIV(vsnd)->chmaps = 1; + PRIV(vsnd)->controls = + 0; /* virtio-snd device does not support control elements */ return true; }