Skip to content

RFC Virtio Sound card Implementation

Shreyansh Chouhan qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest25 patches 7 repliesIn review
  2. v1 RFC27 patches 12 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/25virtio-snd: Add virtio sound header fileinclude/hw/virtio/virtio-snd.h+97 -01 reply
2/25virtio-snd: Add jack control structuresinclude/hw/virtio/virtio-snd.h+40 -00 replies
3/25virtio-snd: Add PCM control structuresinclude/hw/virtio/virtio-snd.h+123 -00 replies
4/25virtio-snd: Add chmap control structuresinclude/hw/virtio/virtio-snd.h+57 -00 replies
5/25virtio-snd: Add device implementation structuresinclude/hw/virtio/virtio-snd.h+66 -00 replies
6/25virtio-snd: Add PCI wrapper code for VirtIOSoundhw/virtio/meson.build hw/virtio/virtio-snd-pci.c+73 -00 replies
7/25virtio-snd: Add properties for class inithw/audio/Kconfig hw/audio/meson.build hw/audio/virtio-snd.c+132 -00 replies
8/25virtio-snd: Add code for get config functionhw/audio/virtio-snd.c+9 -00 replies
9/25virtio-snd: Add code for the realize functionhw/audio/virtio-snd.c+35 -00 replies
10/25virtio-snd: Add macros for logginghw/audio/virtio-snd.c+8 -00 replies
11/25virtio-snd: Add control virtqueue handlerhw/audio/virtio-snd.c+73 -00 replies
12/25virtio-snd: Add VIRTIO_SND_R_JACK_INFO handlerhw/audio/virtio-snd.c+79 -21 reply
13/25virtio-snd: Add stub for VIRTIO_SND_R_JACK_REMAP handlerhw/audio/virtio-snd.c+23 -10 replies
14/25virtio-snd: Add VIRTIO_SND_R_PCM_INFO handlerhw/audio/virtio-snd.c+87 -11 reply
15/25virtio-snd: Add VIRITO_SND_R_PCM_SET_PARAMS handlehw/audio/virtio-snd.c+115 -10 replies
16/25virtio-snd: Add VIRTIO_SND_R_PCM_PREPARE handlerhw/audio/virtio-snd.c+202 -10 replies
17/25virtio-snd: Add default configs to realize fnhw/audio/virtio-snd.c+40 -00 replies
18/25virtio-snd: Add callback for SWVoiceOuthw/audio/virtio-snd.c+248 -60 replies
19/25virtio-snd: Add start/stop handlerhw/audio/virtio-snd.c+33 -20 replies
20/25virtio-snd: Add VIRTIO_SND_R_PCM_RELEASE handlerhw/audio/virtio-snd.c+81 -10 replies
21/25virtio-snd: Replaced goto with if elsehw/audio/virtio-snd.c+8 -130 replies
22/25virtio-snd: Add code to device unrealize functionhw/audio/virtio-snd.c+30 -00 replies
23/25virtio-snd: Add xfer handlerhw/audio/virtio-snd.c+70 -10 replies
24/25virtio-snd: Add event vq and a handler stubhw/audio/virtio-snd.c+14 -00 replies
25/25virtio-snd: Replaced AUD_log with tracepointshw/audio/trace-events hw/audio/virtio-snd.c+36 -330 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 00/25] Virtio Sound card Implementation

The second RFC for implementing the VirtIO Sound card as described in the virtio specs. Sorry for the absence of activity on this.

The output from the sound card works.

What remains to be done:
- Features defined in PCM features. (Eg message polling)
- Channel maps
- Jack remaps
- Input

I will work on the input after I have implemented the output along with all the features since at that point it should just be a matter of reversing a few things in the code that writes the audio.

I can work on this patchset mostly on weekends now but I will try to be more regular with this.

Reviews are welcome :)

Shreyansh Chouhan (25):
virtio-snd: Add virtio sound header file
virtio-snd: Add jack control structures
virtio-snd: Add PCM control structures
virtio-snd: Add chmap control structures
virtio-snd: Add device implementation structures
virtio-snd: Add PCI wrapper code for VirtIOSound
virtio-snd: Add properties for class init
virtio-snd: Add code for get config function
virtio-snd: Add code for the realize function
virtio-snd: Add macros for logging
virtio-snd: Add control virtqueue handler
virtio-snd: Add VIRTIO_SND_R_JACK_INFO handler
virtio-snd: Add stub for VIRTIO_SND_R_JACK_REMAP handler
virtio-snd: Add VIRTIO_SND_R_PCM_INFO handler
virtio-snd: Add VIRITO_SND_R_PCM_SET_PARAMS handle
virtio-snd: Add VIRTIO_SND_R_PCM_PREPARE handler
virtio-snd: Add default configs to realize fn
virtio-snd: Add callback for SWVoiceOut
virtio-snd: Add start/stop handler
virtio-snd: Add VIRTIO_SND_R_PCM_RELEASE handler
virtio-snd: Replaced goto with if else
virtio-snd: Add code to device unrealize function
virtio-snd: Add xfer handler
virtio-snd: Add event vq and a handler stub
virtio-snd: Replaced AUD_log with tracepoints

 hw/audio/Kconfig               |    5 +
 hw/audio/meson.build           |    1 +
 hw/audio/trace-events          |   14 +
 hw/audio/virtio-snd.c          | 1241 ++++++++++++++++++++++++++++++++
 hw/virtio/meson.build          |    1 +
 hw/virtio/virtio-snd-pci.c     |   72 ++
 include/hw/virtio/virtio-snd.h |  383 ++++++++++
 7 files changed, 1717 insertions(+)
 create mode 100644 hw/audio/virtio-snd.c
 create mode 100644 hw/virtio/virtio-snd-pci.c
 create mode 100644 include/hw/virtio/virtio-snd.h
Signature · 1 line
2.31.1