Skip to content

Commit 04ea592

Browse files
committed
update
1 parent fc9aec4 commit 04ea592

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

virtio-snd.c

+8-4
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,12 @@ static pthread_mutex_t virtio_snd_mutex = PTHREAD_MUTEX_INITIALIZER;
314314
static pthread_cond_t virtio_snd_tx_cond = PTHREAD_COND_INITIALIZER;
315315
static int tx_ev_notify;
316316

317+
/* vsnd virtq callback type */
318+
typedef int (*vsnd_virtq_cb)(virtio_snd_state_t *, /* vsnd state */
319+
const virtio_snd_queue_t *, /* vsnd queue */
320+
uint32_t, /* descriptor index */
321+
uint32_t * /* response length */);
322+
317323
/* Forward declaration */
318324
static int virtio_snd_pa_cb(const void *input,
319325
void *output,
@@ -324,17 +330,15 @@ static int virtio_snd_pa_cb(const void *input,
324330
static void virtio_queue_notify_handler(
325331
virtio_snd_state_t *vsnd,
326332
int index,
327-
int (*handler)(virtio_snd_state_t *,
328-
const virtio_snd_queue_t *,
329-
uint32_t,
330-
uint32_t *));
333+
vsnd_virtq_cb cb);
331334
static void __virtio_snd_frame_enqueue(void *payload,
332335
uint32_t n,
333336
uint32_t stream_id);
334337
typedef struct {
335338
struct virtq_desc vq_desc;
336339
struct list_head q;
337340
} virtq_desc_queue_node_t;
341+
338342
#define VSND_GEN_TX_QUEUE_HANDLER(NAME_SUFFIX, WRITE) \
339343
static int virtio_snd_tx_desc_##NAME_SUFFIX##_handler( \
340344
virtio_snd_state_t *vsnd, const virtio_snd_queue_t *queue, \

0 commit comments

Comments
 (0)