Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh2...@gmail.com> --- hw/audio/virtio-snd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index be9ea05e3f..2d7b7ce39a 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -985,6 +985,18 @@ static void virtio_snd_handle_tx(VirtIODevice *vdev, VirtQueue *vq) } } +/* + * The event virtqueue handler. + * Not implemented yet. + * + * @vdev: VirtIOSound card + * @vq: event vq + */ +static void virtio_snd_handle_event(VirtIODevice *vdev, VirtQueue *vq) +{ + virtio_snd_log("event queue callback called\n"); +} + /* * Initializes the VirtIOSound card device. Validates the configuration * passed by the command line. Initializes the virtqueues. Allocates resources @@ -1029,6 +1041,7 @@ static void virtio_snd_device_realize(DeviceState *dev, Error **errp) default_params.rate = VIRTIO_SND_PCM_RATE_44100; s->ctrl_vq = virtio_add_queue(vdev, 64, virtio_snd_handle_ctrl); + s->event_vq = virtio_add_queue(vdev, 64, virtio_snd_handle_event); s->tx_vq = virtio_add_queue(vdev, 64, virtio_snd_handle_tx); s->streams = g_new0(virtio_snd_pcm_stream *, s->snd_conf.streams); @@ -1096,6 +1109,7 @@ static void virtio_snd_device_unrealize(DeviceState *dev) virtio_delete_queue(s->ctrl_vq); virtio_delete_queue(s->tx_vq); + virtio_delete_queue(s->event_vq); } static void virtio_snd_reset(VirtIODevice *vdev) -- 2.25.1