Skip to content

Commit 9e0456d

Browse files
author
Dorinda Bassey
committed
libkrun: Add vhost-user sound device constants and support
Add constants and device-specific configuration for virtio-snd (vhost-user sound device). Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
1 parent 8346642 commit 9e0456d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

include/libkrun.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,13 @@ int32_t krun_set_snd_device(uint32_t ctx_id, bool enable);
732732
#define KRUN_VHOST_USER_RNG_NUM_QUEUES 1
733733
#define KRUN_VHOST_USER_RNG_QUEUE_SIZES ((uint16_t[]){256})
734734

735+
/**
736+
* Vhost-user sound device default queue configuration.
737+
* Sound device uses 4 queues: control (idx 0), event (idx 1), TX/playback (idx 2), RX/capture (idx 3).
738+
*/
739+
#define KRUN_VHOST_USER_SND_NUM_QUEUES 4
740+
#define KRUN_VHOST_USER_SND_QUEUE_SIZES ((uint16_t[]){64, 64, 64, 64})
741+
735742
/**
736743
* Add a vhost-user device to the VM.
737744
*

0 commit comments

Comments
 (0)