[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v13 11/11] docs/system: add basic virtio-snd documentation
|
From: |
Manos Pitsidianakis |
|
Subject: |
[PATCH v13 11/11] docs/system: add basic virtio-snd documentation |
|
Date: |
Mon, 23 Oct 2023 15:03:28 +0300 |
This commit adds basic documentation for using virtio-snd.
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
---
MAINTAINERS | 1 +
docs/system/device-emulation.rst | 1 +
docs/system/devices/virtio-snd.rst | 49 ++++++++++++++++++++++++++++++
3 files changed, 51 insertions(+)
create mode 100644 docs/system/devices/virtio-snd.rst
diff --git a/MAINTAINERS b/MAINTAINERS
index 07e07f6b7a..e60a9b742b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2289,6 +2289,7 @@ S: Supported
F: hw/audio/virtio-snd.c
F: hw/audio/virtio-snd-pci.c
F: include/hw/audio/virtio-snd.h
+F: docs/system/devices/virtio-snd.rst
nvme
M: Keith Busch <kbusch@kernel.org>
diff --git a/docs/system/device-emulation.rst b/docs/system/device-emulation.rst
index 1167f3a9f2..d1f3277cb0 100644
--- a/docs/system/device-emulation.rst
+++ b/docs/system/device-emulation.rst
@@ -93,6 +93,7 @@ Emulated Devices
devices/vhost-user.rst
devices/virtio-gpu.rst
devices/virtio-pmem.rst
+ devices/virtio-snd.rst
devices/vhost-user-rng.rst
devices/canokey.rst
devices/usb-u2f.rst
diff --git a/docs/system/devices/virtio-snd.rst
b/docs/system/devices/virtio-snd.rst
new file mode 100644
index 0000000000..2a9187fd70
--- /dev/null
+++ b/docs/system/devices/virtio-snd.rst
@@ -0,0 +1,49 @@
+virtio sound
+============
+
+This document explains the setup and usage of the Virtio sound device.
+The Virtio sound device is a paravirtualized sound card device.
+
+Linux kernel support
+--------------------
+
+Virtio sound requires a guest Linux kernel built with the
+``CONFIG_SND_VIRTIO`` option.
+
+Description
+-----------
+
+Virtio sound implements capture and playback from inside a guest using the
+configured audio backend of the host machine.
+
+Device properties
+-----------------
+
+The Virtio sound device can be configured with the following properties:
+
+ * ``jacks`` number of physical jacks (Unimplemented).
+ * ``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.
+ * ``chmaps`` number of channel maps (Unimplemented).
+
+All streams are stereo and have the default channel positions ``Front left,
right``.
+
+Examples
+--------
+
+Add an audio device and an audio backend at once with ``-audio`` and
``model=virtio``:
+
+ * pulseaudio: ``-audio driver=pa,model=virtio``
+ or ``-audio driver=pa,model=virtio,server=/run/user/1000/pulse/native``
+ * sdl: ``-audio driver=sdl,model=virtio``
+ * coreaudio: ``-audio driver=coreaudio,model=virtio``
+
+etc.
+
+To specifically add virtualized sound devices, you have to specify a PCI device
+and an audio backend listed with ``-audio driver=help`` that works on your host
+machine, e.g.:
+
+::
+
+ -device virtio-sound-pci,audiodev=my_audiodev \
+ -audiodev alsa,id=my_audiodev
--
2.39.2
- [PATCH v13 01/11] Add virtio-sound device stub, (continued)
- [PATCH v13 01/11] Add virtio-sound device stub, Manos Pitsidianakis, 2023/10/23
- [PATCH v13 02/11] Add virtio-sound-pci device, Manos Pitsidianakis, 2023/10/23
- [PATCH v13 03/11] virtio-sound: handle control messages and streams, Manos Pitsidianakis, 2023/10/23
- [PATCH v13 05/11] virtio-sound: handle VIRTIO_SND_R_PCM_{START,STOP}, Manos Pitsidianakis, 2023/10/23
- [PATCH v13 06/11] virtio-sound: handle VIRTIO_SND_R_PCM_SET_PARAMS, Manos Pitsidianakis, 2023/10/23
- [PATCH v13 04/11] virtio-sound: handle VIRTIO_SND_R_PCM_INFO request, Manos Pitsidianakis, 2023/10/23
- [PATCH v13 07/11] virtio-sound: handle VIRTIO_SND_R_PCM_PREPARE, Manos Pitsidianakis, 2023/10/23
- [PATCH v13 08/11] virtio-sound: handle VIRTIO_SND_R_PCM_RELEASE, Manos Pitsidianakis, 2023/10/23
- [PATCH v13 09/11] virtio-sound: implement audio output (TX), Manos Pitsidianakis, 2023/10/23
- [PATCH v13 10/11] virtio-sound: implement audio capture (RX), Manos Pitsidianakis, 2023/10/23
- [PATCH v13 11/11] docs/system: add basic virtio-snd documentation,
Manos Pitsidianakis <=
- Re: [PATCH v13 00/11] Add VIRTIO sound card, Alex Bennée, 2023/10/31