vhost-device/staging/vhost-device-sound
Matias Ezequiel Vara Larsen 7a00d935f9 sound/test: add tests for device.rs
This commit adds tests in test_sound_thread_failure to test that
process_control() returns Err() in the following four conditions:
    * control request with a single descriptor
    * control request in which first descriptor is write-only
    * control request in which second descriptor is read-only
    * control request with less than three descriptors for control requests
      that require three, e.g., PcmInfo, ChmapInfo

Signed-off-by: Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
2023-11-02 16:19:54 +01:00
..
src sound/test: add tests for device.rs 2023-11-02 16:19:54 +01:00
Cargo.toml sound: add virtualization in Cargo.toml categories 2023-11-02 10:39:25 +01:00
CHANGELOG.md Move vhost-device-sound to staging workspace 2023-10-16 14:58:40 +03:00
LICENSE-APACHE Move vhost-device-sound to staging workspace 2023-10-16 14:58:40 +03:00
LICENSE-BSD-3-Clause Move vhost-device-sound to staging workspace 2023-10-16 14:58:40 +03:00
README.md Move vhost-device-sound to staging workspace 2023-10-16 14:58:40 +03:00
rustfmt.toml Move vhost-device-sound to staging workspace 2023-10-16 14:58:40 +03:00

vhost-device-sound

Synopsis

   vhost-device-sound --socket <SOCKET> --backend <BACKEND>

Description

   A virtio-sound device using the vhost-user protocol.

Options

     --socket <SOCKET>
            vhost-user Unix domain socket path

     --backend <BACKEND>
            audio backend to be used [possible values: null, pipewire, alsa]

     -h, --help
            Print help

     -V, --version
            Print version

Examples

Launch the backend on the host machine:

host# vhost-device-sound --socket /tmp/snd.sock --backend null

With QEMU, you can add a virtio device that uses the backend's socket with the following flags:

-chardev socket,id=vsnd,path=/tmp/snd.sock \
-device vhost-user-snd-pci,chardev=vsnd,id=snd

License

This project is licensed under either of