diff options
Diffstat (limited to 'include/vhost_user_sound.h')
-rw-r--r-- | include/vhost_user_sound.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/vhost_user_sound.h b/include/vhost_user_sound.h new file mode 100644 index 0000000..e63e9d3 --- /dev/null +++ b/include/vhost_user_sound.h @@ -0,0 +1,42 @@ +/* + * Based on vhost-user-sound.h of QEMU project + * + * Copyright 2020 Red Hat, Inc. + * + * Copyright (c) 2023-2024 Virtual Open Systems SAS. + * + * This work is licensed under the terms of the GNU GPL, version 2 or + * (at your option) any later version. See the COPYING file in the + * top-level directory. + * + */ + +#ifndef VHOST_USER_SOUND +#define VHOST_USER_SOUND + +#include "virtio_loopback.h" +#include "vhost_loopback.h" +#include "vhost_user_loopback.h" + +struct virtio_snd_config { + /* # of available physical jacks */ + uint32_t jacks; + /* # of available PCM streams */ + uint32_t streams; + /* # of available channel maps */ + uint32_t chmaps; +}; + +typedef struct VHostUserSound { + VirtIODevice *parent; + struct vhost_virtqueue *vhost_vqs; + VirtQueue **virtqs; + uint16_t num_queues; + uint32_t queue_size; + struct virtio_snd_config config; + struct vhost_dev *vhost_dev; +} VHostUserSound; + +void vus_device_realize(struct adapter_dev *adev); + +#endif /* VHOST_USER_SOUND */ |