#virtio #sound #vhost #virtualization #virtio-sound #virtio-snd

bin+lib vhost-device-sound

A virtio-sound device using the vhost-user protocol

1 unstable release

0.1.0 Feb 7, 2024

#259 in Audio

Download history 11/week @ 2024-02-19 16/week @ 2024-02-26 16/week @ 2024-04-01 74/week @ 2024-04-15

90 downloads per month

Apache-2.0 OR BSD-3-Clause

190KB
4K SLoC

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

Dependencies

~3–5.5MB
~92K SLoC