From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4qIm-0002n3-Tg for qemu-devel@nongnu.org; Tue, 16 Jun 2015 08:49:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4qIh-0005sW-Mr for qemu-devel@nongnu.org; Tue, 16 Jun 2015 08:49:16 -0400 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:33943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4qIh-0005ry-CO for qemu-devel@nongnu.org; Tue, 16 Jun 2015 08:49:11 -0400 Received: by wicnd19 with SMTP id nd19so52117144wic.1 for ; Tue, 16 Jun 2015 05:49:10 -0700 (PDT) From: "=?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?=" Date: Tue, 16 Jun 2015 14:49:03 +0200 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v2 0/6] -audiodev option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann 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,property=value,... like: -audiodev alsa,frequency=8000,channels=1 The first commit adds a qapi Audiodev struct that describes the audio backend options. The next 4 commits are some miscellaneous additions that are needed by the last commit which finally adds the -audiodev option. For users with esoteric platforms or needs please check I did not break anything accidentally. For easier testing, pull https://github.com/DirtYiCE/qemu.git tag audio-cmdline-v2. Please review. --- 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 (6): qapi: qapi for audio backends qapi: support nested structs in OptsVisitor opts: do not print separator before first item in qemu_opts_print qapi: AllocVisitor audio: use qapi AudioFormat instead of audfmt_e audio: -audiodev command line option Makefile | 4 +- audio/Makefile.objs | 2 +- audio/alsaaudio.c | 337 +++++--------- audio/audio.c | 798 ++++++++++---------------------- 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 | 183 +++----- audio/paaudio.c | 109 ++--- audio/sdlaudio.c | 50 +- audio/spiceaudio.c | 11 +- audio/wavaudio.c | 76 +-- audio/wavcapture.c | 2 +- block.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/input/tsc210x.c | 2 +- hw/usb/dev-audio.c | 2 +- include/qapi/alloc-visitor.h | 18 + qapi-schema.json | 3 + qapi/Makefile.objs | 1 + qapi/alloc-visitor.c | 62 +++ qapi/audio.json | 223 +++++++++ qapi/opts-visitor.c | 144 ++++-- qemu-options.hx | 218 ++++++++- tests/qapi-schema/qapi-schema-test.json | 9 +- tests/test-opts-visitor.c | 34 ++ ui/vnc.c | 14 +- util/qemu-option.c | 5 +- vl.c | 9 +- 46 files changed, 1627 insertions(+), 1273 deletions(-) create mode 100644 audio/audio_legacy.c create mode 100644 include/qapi/alloc-visitor.h create mode 100644 qapi/alloc-visitor.c create mode 100644 qapi/audio.json -- 2.4.3