Skip to content

audio: -audiodev option, multiple options

Kővágó, Zoltán qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest48 of 49 patches 19 repliesIn review
  2. v125 patches 31 repliesSuperseded

Changes in v2 from the cover letter

* added qemu_opts_print patch as it's still not merged
* splitted the big -audiodev and remove mixeng from backend commits
* tons of bugfixes and typo fixing

48 of 49 patches are in this archive. The cover letter announces 49.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/49opts: produce valid command line in qemu_opts_printblock.c tests/qemu-iotests/017.out tests/qemu-iotests/018.out +31 more+123 -1001 reply
2/49qapi: support implicit structs in OptsVisitorqapi/opts-visitor.c+15 -01 reply
3/49qapi: convert NumaOptions into a flat unionnuma.c qapi-schema.json+37 -125 replies
4/49net: remove NetLegacy structnet/net.c qapi-schema.json+30 -421 reply
5/49net: use Netdev instead of NetClientOptions in client initnet/clients.h net/dump.c net/hub.c +9 more+56 -572 replies
6/49qapi: change Netdev into a flat unionhw/arm/musicpal.c hw/core/qdev-properties-system.c hw/net/allwinner_emac.c +42 more+166 -1541 reply
7/49qapi: reorder NetdevBase and Netdevqapi-schema.json+23 -231 reply
8/49qapi: qapi for audio backendsMakefile qapi-schema.json qapi/audio.json+268 -20 replies
9/49qapi: support nested structs in OptsVisitorqapi/opts-visitor.c tests/qapi-schema/qapi-schema-test.json tests/qapi-schema/qapi-schema-test.out +1 more+141 -241 reply
10/49audio: use qapi AudioFormat instead of audfmt_eaudio/alsaaudio.c audio/audio.c audio/audio.h +22 more+187 -1810 replies
11/49audio: -audiodev command line option: documentationqemu-options.hx+219 -30 replies
12/49audio: -audiodev command line option basic implementationaudio/Makefile.objs audio/alsaaudio.c audio/audio.c +13 more+472 -3680 replies
13/49alsaaudio: port to -audiodev configaudio/alsaaudio.c audio/audio_legacy.c+148 -2260 replies
14/49coreaudio: port to -audiodev configaudio/audio_legacy.c audio/coreaudio.c+20 -370 replies
15/49dsoundaudio: port to -audiodev configaudio/audio_legacy.c audio/dsound_template.h audio/dsoundaudio.c+32 -450 replies
16/49noaudio: port to -audiodev configaudio/noaudio.c+0 -10 replies
17/49ossaudio: port to -audiodev configaudio/audio_legacy.c audio/ossaudio.c+59 -1110 replies
18/49paaudio: port to -audiodev configaudio/audio_legacy.c audio/paaudio.c+40 -510 replies
19/49sdlaudio: port to -audiodev configaudio/audio_legacy.c audio/sdlaudio.c+11 -180 replies
20/49spiceaudio: port to -audiodev configaudio/spiceaudio.c+0 -50 replies
21/49wavaudio: port to -audiodev configaudio/audio_legacy.c audio/wavaudio.c+19 -490 replies
22/49audio: -audiodev command line option: cleanupaudio/audio.c audio/audio_int.h+4 -2150 replies
23/49audio: reduce glob_audio_state usageaudio/audio.c audio/audio_int.h audio/audio_template.h+46 -450 replies
24/49audio: basic support for multi backend audioaudio/audio.c audio/audio.h audio/audio_int.h +8 more+129 -390 replies
25/49audio: add audiodev properties to frontendsaudio/audio.h hw/audio/ac97.c hw/audio/adlib.c +12 more+90 -10 replies
26/49audio: audiodev= parameters no longer optional when -audiodev presentaudio/audio.c+14 -50 replies
27/49paaudio: do not create multiple connections to the same serveraudio/paaudio.c+171 -1260 replies
28/49paaudio: do not move stream when sink/source name is specifiedaudio/paaudio.c+5 -00 replies
29/49paaudio: properly disconnect streams in fini_*audio/paaudio.c+21 -20 replies
30/49audio: remove audio_MIN, audio_MAXaudio/alsaaudio.c audio/audio.c audio/audio.h +17 more+62 -790 replies
31/49audio: do not run each backend in audio_runaudio/alsaaudio.c audio/audio.c audio/audio_int.h +1 more+19 -190 replies
32/49paaudio: fix playback glitchesaudio/paaudio.c+2 -40 replies
33/49audio: remove read and write pcm_opsaudio/alsaaudio.c audio/audio.c audio/audio_int.h +8 more+4 -1120 replies
34/49audio: use size_t where makes senseaudio/alsaaudio.c audio/audio.c audio/audio.h +8 more+125 -1250 replies
35/49audio: api for mixeng code free backendsaudio/audio.c audio/audio_int.h audio/audio_template.h+241 -100 replies
36/49alsaaudio: port to the new audio backend apiaudio/alsaaudio.c+81 -2250 replies
37/49coreaudio: port to the new audio backend apiaudio/coreaudio.c+69 -610 replies
38/49dsoundaudio: port to the new audio backend apiaudio/dsound_template.h audio/dsoundaudio.c+102 -2710 replies
39/49noaudio: port to the new audio backend apiaudio/noaudio.c+15 -240 replies
40/49ossaudio: port to the new audio backend apiaudio/ossaudio.c+104 -1850 replies
41/49paaudio: port to the new audio backend apiaudio/Makefile.objs audio/audio_pt_int.c audio/audio_pt_int.h +2 more+47 -5320 replies
42/49sdlaudio: port to the new audio backend apiaudio/sdlaudio.c+41 -610 replies
44/49wavaudio: port to the new audio backend apiaudio/wavaudio.c+9 -460 replies
45/49audio: remove remains of the old backend apiaudio/audio.c audio/audio_int.h+6 -430 replies
46/49audio: unify input and output mixeng buffer managementaudio/audio.c audio/audio_int.h audio/audio_template.h+71 -820 replies
47/49audio: remove hw->samples, buffer_size_in/out pcm_opsaudio/alsaaudio.c audio/audio_int.h audio/audio_template.h +9 more+104 -250 replies
48/49audio: common rate control code for timer based outputsaudio/audio.c audio/audio_int.h audio/noaudio.c +2 more+78 -790 replies
49/49audio: split ctl_* functions into enable_* and volume_*audio/alsaaudio.c audio/audio.c audio/audio_int.h +9 more+214 -3110 replies

Reviews trailers per patch

11 of 48 patches have a Reviewed-by or Acked-by.

PatchMarkus ArmbrusterStefan HajnocziMarc-André LureauEric Blake
1/49R-b R-b R-b
2/49R-b
3/49R-b
4/49
5/49R-b
6/49
7/49R-b
8/49
9/49
10/49R-b
11/49
12/49
13/49
14/49
15/49
16/49
17/49
18/49
19/49
20/49
21/49
22/49
23/49
24/49
25/49R-b
26/49R-b
27/49R-b
28/49
29/49R-b
30/49
31/49R-b
32/49
33/49
34/49
35/49
36/49
37/49
38/49
39/49
40/49
41/49
42/49
44/49
45/49
46/49
47/49
48/49
49/49

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 00/49] audio: -audiodev option, multiple options

This patch series adds support to multiple audio backends. Afterwards I add support to multiple backends. Audio fronteds gain a new audiodev option to specify the id of the audiodev to use. The audiodev= option is required, unless you use the old environment variable based configuration, in that case it must not used (and you can't use multiple backends).

Finally I also make mixeng usage optional, it can save us some useless format converting when not needed. Also makes easier to support formats currently not supported by qemu (as only the backend has to support it, not the mixeng).

For easier testing pull https://github.com/DirtYiCE/qemu.git tag audio-multi-v2.

Please review.

---

Changes from v1:
* added qemu_opts_print patch as it's still not merged
* splitted the big -audiodev and remove mixeng from backend commits
* tons of bugfixes and typo fixing

Kővágó, Zoltán (49):
opts: produce valid command line in qemu_opts_print
qapi: support implicit structs in OptsVisitor
qapi: convert NumaOptions into a flat union
net: remove NetLegacy struct
net: use Netdev instead of NetClientOptions in client init
qapi: change Netdev into a flat union
qapi: reorder NetdevBase and Netdev
qapi: qapi for audio backends
qapi: support nested structs in OptsVisitor
audio: use qapi AudioFormat instead of audfmt_e
audio: -audiodev command line option: documentation
audio: -audiodev command line option basic implementation
alsaaudio: port to -audiodev config
coreaudio: port to -audiodev config
dsoundaudio: port to -audiodev config
noaudio: port to -audiodev config
ossaudio: port to -audiodev config
paaudio: port to -audiodev config
sdlaudio: port to -audiodev config
spiceaudio: port to -audiodev config
wavaudio: port to -audiodev config
audio: -audiodev command line option: cleanup
audio: reduce glob_audio_state usage
audio: basic support for multi backend audio
audio: add audiodev properties to frontends
audio: audiodev= parameters no longer optional when -audiodev present
paaudio: do not create multiple connections to the same server
paaudio: do not move stream when sink/source name is specified
paaudio: properly disconnect streams in fini_*
audio: remove audio_MIN, audio_MAX
audio: do not run each backend in audio_run
paaudio: fix playback glitches
audio: remove read and write pcm_ops
audio: use size_t where makes sense
audio: api for mixeng code free backends
alsaaudio: port to the new audio backend api
coreaudio: port to the new audio backend api
dsoundaudio: port to the new audio backend api
noaudio: port to the new audio backend api
ossaudio: port to the new audio backend api
paaudio: port to the new audio backend api
sdlaudio: port to the new audio backend api
spiceaudio: port to the new audio backend api
wavaudio: port to the new audio backend api
audio: remove remains of the old backend api
audio: unify input and output mixeng buffer management
audio: remove hw->samples, buffer_size_in/out pcm_ops
audio: common rate control code for timer based outputs
audio: split ctl_* functions into enable_* and volume_*

 Makefile                                |    4 +-
 audio/Makefile.objs                     |    3 +-
 audio/alsaaudio.c                       |  740 +++++-----------
 audio/audio.c                           | 1390 +++++++++++++++----------------
 audio/audio.h                           |   66 +-
 audio/audio_int.h                       |  121 +--
 audio/audio_legacy.c                    |  333 ++++++++
 audio/audio_pt_int.c                    |  173 ----
 audio/audio_pt_int.h                    |   22 -
 audio/audio_template.h                  |   89 +-
 audio/audio_win_int.c                   |   18 +-
 audio/coreaudio.c                       |  198 ++---
 audio/dsound_template.h                 |   59 +-
 audio/dsoundaudio.c                     |  445 +++-------
 audio/mixeng.h                          |   11 +-
 audio/noaudio.c                         |   98 +--
 audio/ossaudio.c                        |  588 +++++--------
 audio/paaudio.c                         |  828 +++++++-----------
 audio/rate_template.h                   |    2 +-
 audio/sdlaudio.c                        |  183 ++--
 audio/spiceaudio.c                      |  283 +++----
 audio/wavaudio.c                        |  156 +---
 audio/wavcapture.c                      |    8 +-
 block.c                                 |    2 +-
 configure                               |    5 -
 hmp-commands.hx                         |   11 +-
 hw/arm/musicpal.c                       |    2 +-
 hw/arm/omap2.c                          |    2 +-
 hw/audio/ac97.c                         |   13 +-
 hw/audio/adlib.c                        |    7 +-
 hw/audio/cs4231a.c                      |   11 +-
 hw/audio/es1370.c                       |   17 +-
 hw/audio/gus.c                          |    9 +-
 hw/audio/hda-codec.c                    |   19 +-
 hw/audio/lm4549.c                       |    6 +-
 hw/audio/milkymist-ac97.c               |   16 +-
 hw/audio/pcspk.c                        |    5 +-
 hw/audio/pl041.c                        |    1 +
 hw/audio/sb16.c                         |   17 +-
 hw/audio/wm8750.c                       |   14 +-
 hw/core/qdev-properties-system.c        |   59 +-
 hw/input/tsc210x.c                      |    2 +-
 hw/net/allwinner_emac.c                 |    2 +-
 hw/net/cadence_gem.c                    |    2 +-
 hw/net/dp8393x.c                        |    2 +-
 hw/net/e1000.c                          |    2 +-
 hw/net/eepro100.c                       |    2 +-
 hw/net/etraxfs_eth.c                    |    2 +-
 hw/net/fsl_etsec/etsec.c                |    2 +-
 hw/net/lan9118.c                        |    2 +-
 hw/net/lance.c                          |    2 +-
 hw/net/mcf_fec.c                        |    2 +-
 hw/net/milkymist-minimac2.c             |    2 +-
 hw/net/mipsnet.c                        |    2 +-
 hw/net/ne2000-isa.c                     |    2 +-
 hw/net/ne2000.c                         |    2 +-
 hw/net/opencores_eth.c                  |    2 +-
 hw/net/pcnet-pci.c                      |    2 +-
 hw/net/rocker/rocker_fp.c               |    2 +-
 hw/net/rtl8139.c                        |    2 +-
 hw/net/smc91c111.c                      |    2 +-
 hw/net/spapr_llan.c                     |    2 +-
 hw/net/stellaris_enet.c                 |    2 +-
 hw/net/vhost_net.c                      |   18 +-
 hw/net/virtio-net.c                     |    6 +-
 hw/net/vmxnet3.c                        |    2 +-
 hw/net/xen_nic.c                        |    2 +-
 hw/net/xgmac.c                          |    2 +-
 hw/net/xilinx_axienet.c                 |    2 +-
 hw/net/xilinx_ethlite.c                 |    2 +-
 hw/usb/dev-audio.c                      |    3 +-
 hw/usb/dev-network.c                    |    2 +-
 include/hw/qdev-properties.h            |    3 +
 include/net/net.h                       |    4 +-
 monitor.c                               |   26 +-
 net/clients.h                           |   20 +-
 net/dump.c                              |    8 +-
 net/hub.c                               |   24 +-
 net/l2tpv3.c                            |    8 +-
 net/net.c                               |  129 ++-
 net/netmap.c                            |    6 +-
 net/slirp.c                             |    8 +-
 net/socket.c                            |   10 +-
 net/tap-win32.c                         |    8 +-
 net/tap.c                               |   28 +-
 net/vde.c                               |    8 +-
 net/vhost-user.c                        |   14 +-
 numa.c                                  |    2 +-
 qapi-schema.json                        |  132 +--
 qapi/audio.json                         |  263 ++++++
 qapi/opts-visitor.c                     |  131 ++-
 qemu-options.hx                         |  227 ++++-
 tests/qapi-schema/qapi-schema-test.json |    9 +-
 tests/qapi-schema/qapi-schema-test.out  |    6 +-
 tests/qemu-iotests/017.out              |    2 +-
 tests/qemu-iotests/018.out              |    2 +-
 tests/qemu-iotests/019.out              |    2 +-
 tests/qemu-iotests/020.out              |    2 +-
 tests/qemu-iotests/024.out              |    2 +-
 tests/qemu-iotests/028.out              |    4 +-
 tests/qemu-iotests/034.out              |    2 +-
 tests/qemu-iotests/037.out              |    2 +-
 tests/qemu-iotests/038.out              |    2 +-
 tests/qemu-iotests/039.out              |    2 +-
 tests/qemu-iotests/043.out              |   12 +-
 tests/qemu-iotests/046.out              |    2 +-
 tests/qemu-iotests/049.out              |   22 +-
 tests/qemu-iotests/050.out              |    2 +-
 tests/qemu-iotests/051.out              |    2 +-
 tests/qemu-iotests/061.out              |   10 +-
 tests/qemu-iotests/069.out              |    2 +-
 tests/qemu-iotests/073.out              |    2 +-
 tests/qemu-iotests/079.out              |   18 +-
 tests/qemu-iotests/082.out              |    4 +-
 tests/qemu-iotests/085.out              |   38 +-
 tests/qemu-iotests/095.out              |    4 +-
 tests/qemu-iotests/097.out              |   16 +-
 tests/qemu-iotests/098.out              |    8 +-
 tests/qemu-iotests/110.out              |    4 +-
 tests/qemu-iotests/112.out              |    4 +-
 tests/qemu-iotests/114.out              |    2 +-
 tests/qemu-iotests/115.out              |    2 +-
 tests/qemu-iotests/121.out              |    4 +-
 tests/qemu-iotests/122.out              |    6 +-
 tests/qemu-iotests/130.out              |    4 +-
 tests/qemu-iotests/common.filter        |    2 +-
 tests/test-opts-visitor.c               |   34 +
 ui/vnc.c                                |   29 +-
 ui/vnc.h                                |    2 +
 util/qemu-option.c                      |   29 +-
 vl.c                                    |   11 +-
 131 files changed, 3578 insertions(+), 3910 deletions(-)
 create mode 100644 audio/audio_legacy.c
 delete mode 100644 audio/audio_pt_int.c
 delete mode 100644 audio/audio_pt_int.h
 create mode 100644 qapi/audio.json
Signature · 1 line
2.5.0