diff options
author | Timos Ampelikiotis <t.ampelikiotis@virtualopensystems.com> | 2023-10-10 14:51:22 +0000 |
---|---|---|
committer | Timos Ampelikiotis <t.ampelikiotis@virtualopensystems.com> | 2023-10-10 14:51:22 +0000 |
commit | ddc98ee7562fa01abbd4d1b027efd5e98ceb93bf (patch) | |
tree | ae3e83b565b602c86a3787f5dda646856ce240fa /adapter.c | |
parent | 7eef0269955fa7dc930161ded1edc8f1458ac788 (diff) |
[ADD] Vhost-user-sound is being added
Signed-off-by: Timos Ampelikiotis <t.ampelikiotis@virtualopensystems.com>
Change-Id: I77c6fe2a1e50d4c838662a5eee846780e265de5f
Diffstat (limited to 'adapter.c')
-rw-r--r-- | adapter.c | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -48,6 +48,8 @@ #include "vhost_user_blk.h" #include "vhost_user_input.h" #include "vhost_user_gpio.h" +#include "vhost_user_sound.h" + #ifdef DEBUG #define DBG(...) printf("adapter: " __VA_ARGS__) @@ -138,7 +140,7 @@ static void help_args(void) "\t\t [ -qn number of queues ]\n" "\t\t [ -qs size of queues ]\n" "The 'device_name' can be one of the following:\n" - "\tvrng, vhurng, vhublk, vhuinput, vhugpio\n"); + "\tvrng, vhurng, vhublk, vhuinput, vhusnd, vhugpio\n"); } int find_arg(int argc, char **argv, char *str) @@ -156,9 +158,9 @@ int find_arg(int argc, char **argv, char *str) int val_device_arg(char *str) { char *adapter_devices[] = {"vrng", "vhurng", "vhublk", "vhuinput", - "vhugpio"}; - char *vhu_devices[] = {"vhurng", "vhublk", "vhuinput", "vhugpio"}; - int adapter_devices_num = 5, i; + "vhusnd", "vhugpio"}; + char *vhu_devices[] = {"vhurng", "vhublk", "vhuinput", "vhusnd", "vhugpio"}; + int adapter_devices_num = 6, i; for (i = 0; i < adapter_devices_num; i++) { if (!strcmp(adapter_devices[i], str)) { @@ -171,8 +173,8 @@ int val_device_arg(char *str) bool check_vhu_device(char *str) { - char *vhu_devices[] = {"vhurng", "vhublk", "vhuinput", "vhugpio"}; - int vhu_devices_num = 4, i; + char *vhu_devices[] = {"vhurng", "vhublk", "vhuinput", "vhusnd", "vhugpio"}; + int vhu_devices_num = 5, i; for (i = 0; i < vhu_devices_num; i++) { if (!strcmp(vhu_devices[i], str)) { @@ -290,6 +292,9 @@ int main(int argc, char **argv) virtio_input_device_realize(); break; case 5: + vus_device_realize(); + break; + case 6: vu_gpio_device_realize(); break; default: |