Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuda-Chen committed Nov 21, 2024
1 parent efaecc1 commit 521a1f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion virtio-snd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

0 comments on commit 521a1f2

Please sign in to comment.