4 This document explains the setup and usage of the Virtio sound device.
5 The Virtio sound device is a paravirtualized sound card device.
10 Virtio sound requires a guest Linux kernel built with the
11 ``CONFIG_SND_VIRTIO`` option.
16 Virtio sound implements capture and playback from inside a guest using the
17 configured audio backend of the host machine.
22 The Virtio sound device can be configured with the following properties:
24 * ``jacks`` number of physical jacks (Unimplemented).
25 * ``streams`` number of PCM streams. At the moment, no stream configuration is supported: the first one will always be a playback stream, an optional second will always be a capture stream. Adding more will cycle stream directions from playback to capture.
26 * ``chmaps`` number of channel maps (Unimplemented).
28 All streams are stereo and have the default channel positions ``Front left, right``.
33 Add an audio device and an audio backend at once with ``-audio`` and ``model=virtio``:
35 * pulseaudio: ``-audio driver=pa,model=virtio``
36 or ``-audio driver=pa,model=virtio,server=/run/user/1000/pulse/native``
37 * sdl: ``-audio driver=sdl,model=virtio``
38 * coreaudio: ``-audio driver=coreaudio,model=virtio``
42 To specifically add virtualized sound devices, you have to specify a PCI device
43 and an audio backend listed with ``-audio driver=help`` that works on your host
48 -device virtio-sound-pci,audiodev=my_audiodev \
49 -audiodev alsa,id=my_audiodev