From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5cuz-0007Pr-A1 for qemu-devel@nongnu.org; Thu, 18 Jun 2015 12:43:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5cuv-0000rq-AY for qemu-devel@nongnu.org; Thu, 18 Jun 2015 12:43:57 -0400 Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:37591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5cuu-0000rY-Ui for qemu-devel@nongnu.org; Thu, 18 Jun 2015 12:43:53 -0400 Received: by wicgi11 with SMTP id gi11so19541273wic.0 for ; Thu, 18 Jun 2015 09:43:51 -0700 (PDT) From: "=?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?=" Date: Thu, 18 Jun 2015 18:43:42 +0200 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v3 0/8] -audiodev option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Eduardo Habkost This series of patches adds a new -audiodev command line option to specify audio subsytem parameters instead of environment variables. This will later allow us to specify multiple audio backends. The syntax is something like this: -audiodev driver_name,id=id,property=value,... like: -audiodev alsa,id=foo,frequency=8000,channels=1 This series also convert numa and netdev qapi to flat unions, to avoid extra complexity in OptsVisitor. Please refer to the thread at v2 patch. You are encouraged check whether I break anything during the refactorings (especially at netdev and various audio backends). For easier testing, pull https://github.com/DirtYiCE/qemu.git tag audio-cmdline-v3. Please review (especially the qapi refactoring I did...) Changes from v2: * consistency, style issues in audio qapi * converted NumaOptions and Netdev and friends to flat union * OptsVisitor: only full paths accepted * qemu_opts_print: hopefully produces valid command line in all cases * other small fixes... Changes from v1: * updated to master, removed commits already merged * now every time-related option takes usecs * some small fixes Kővágó, Zoltán (8): qapi: support implicit structs in OptsVisitor qapi: convert NumaOptions into a flat union qapi: change Netdev and NetLegacy into a flat union qapi: qapi for audio backends qapi: support nested structs in OptsVisitor opts: produce valid command line in qemu_opts_print audio: use qapi AudioFormat instead of audfmt_e audio: -audiodev command line option Makefile | 4 +- audio/Makefile.objs | 2 +- audio/alsaaudio.c | 346 +++++--------- audio/audio.c | 792 +++++++++----------------------- audio/audio.h | 34 +- audio/audio_int.h | 7 +- audio/audio_legacy.c | 328 +++++++++++++ audio/audio_template.h | 13 +- audio/audio_win_int.c | 18 +- audio/coreaudio.c | 49 +- audio/dsound_template.h | 6 +- audio/dsoundaudio.c | 60 +-- audio/noaudio.c | 3 +- audio/ossaudio.c | 182 +++----- audio/paaudio.c | 108 ++--- audio/sdlaudio.c | 50 +- audio/spiceaudio.c | 11 +- audio/wavaudio.c | 75 +-- audio/wavcapture.c | 2 +- block.c | 2 +- hw/arm/musicpal.c | 2 +- hw/arm/omap2.c | 2 +- hw/audio/ac97.c | 2 +- hw/audio/adlib.c | 2 +- hw/audio/cs4231a.c | 6 +- hw/audio/es1370.c | 4 +- hw/audio/gus.c | 2 +- hw/audio/hda-codec.c | 18 +- hw/audio/lm4549.c | 6 +- hw/audio/milkymist-ac97.c | 2 +- hw/audio/pcspk.c | 2 +- hw/audio/sb16.c | 14 +- hw/audio/wm8750.c | 4 +- hw/core/qdev-properties-system.c | 2 +- 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 | 2 +- hw/usb/dev-network.c | 2 +- include/net/net.h | 4 +- monitor.c | 14 +- net/clients.h | 20 +- net/dump.c | 9 +- net/hub.c | 24 +- net/l2tpv3.c | 9 +- net/net.c | 110 ++--- net/netmap.c | 6 +- net/slirp.c | 9 +- net/socket.c | 11 +- net/tap-win32.c | 9 +- net/tap.c | 29 +- net/vde.c | 9 +- net/vhost-user.c | 15 +- numa.c | 2 +- qapi-schema.json | 153 ++++-- qapi/audio.json | 250 ++++++++++ qapi/opts-visitor.c | 129 +++++- qemu-options.hx | 230 +++++++++- tests/qapi-schema/qapi-schema-test.json | 9 +- tests/test-opts-visitor.c | 34 ++ ui/vnc.c | 14 +- util/qemu-option.c | 47 +- vl.c | 9 +- 89 files changed, 1876 insertions(+), 1521 deletions(-) create mode 100644 audio/audio_legacy.c create mode 100644 qapi/audio.json -- 2.4.3