From patchwork Fri Aug 21 20:36:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?UTF-8?B?Wm9sdMOhbiBLxZF2w6Fnw7M=?= X-Patchwork-Id: 509636 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id EB654140291 for ; Sat, 22 Aug 2015 06:37:22 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=KoeGHnvY; dkim-atps=neutral Received: from localhost ([::1]:43573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSt3w-00082F-VI for incoming@patchwork.ozlabs.org; Fri, 21 Aug 2015 16:37:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSt3E-0006sJ-7Q for qemu-devel@nongnu.org; Fri, 21 Aug 2015 16:36:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSt3A-0007GS-TS for qemu-devel@nongnu.org; Fri, 21 Aug 2015 16:36:36 -0400 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:35323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSt3A-0007GL-MQ for qemu-devel@nongnu.org; Fri, 21 Aug 2015 16:36:32 -0400 Received: by wicne3 with SMTP id ne3so24619256wic.0 for ; Fri, 21 Aug 2015 13:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=Ce79qXG/c9fTix+qk8oEi7mFCizYTeaJ6jPDWQ0JkDk=; b=KoeGHnvYlI2Upp/NCRMvTjjnqn5vvzk7lbrqgn7IfoKhr7PBBV6FXCoqs7M3utP5kP wK5vZA4Ut7cKBYXruBBuKw2CsZbF8zTLry8TkH+RQ4QsihY9Z4RLdtqfP0D4HAl3ZAIZ wEvX0xFlBY2ZqxCgR9m+sqsVko3iScYAag10lLh+CelvfiBxV8Wjbki+bBR9C9PuO774 LTo/xjv8leYkMvRxrkVkw34U471dtTCsdmlnVuhqQ3T+Afez+pLz4iKW4iDRvE1wb7lS VbhOZ/Csk376bG9lE+1qSOzmquJd4kbjGQLkzV8zK9qRP8oTrEU/5n7Au8yoioyLz/ZY adSw== X-Received: by 10.194.10.165 with SMTP id j5mr19461473wjb.147.1440189392026; Fri, 21 Aug 2015 13:36:32 -0700 (PDT) Received: from nullptr.home.dirty-ice.org (178-164-172-216.pool.digikabel.hu. [178.164.172.216]) by smtp.gmail.com with ESMTPSA id wx9sm10479830wjb.6.2015.08.21.13.36.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 21 Aug 2015 13:36:31 -0700 (PDT) From: "=?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?=" X-Google-Original-From: =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= To: qemu-devel@nongnu.org Date: Fri, 21 Aug 2015 22:36:29 +0200 Message-Id: <15a680324968752305cc76c8259d66aae3bbc7eb.1440189131.git.DirtY.iCE.hu@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::229 Cc: Gerd Hoffmann , Markus Armbruster Subject: [Qemu-devel] [PATCH v2 1/9] audio: add mixeng option (documentation) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This will allow us to disable mixeng when we use a decent backend. Disabling mixeng have a few advantages: * we no longer convert the audio output from one format to another, when the underlying audio system would just convert it to a third format. We no longer convert, only the underlying system, when needed. * the underlying system probably has better resampling and sample format converting methods anyway... * we may support formats that the mixeng currently does not support (S24 or float samples, more than two channels) * when using an audio server (like pulseaudio) different sound card outputs will show up as separate streams, even if we use only one backend Disadvantages: * audio capturing no longer works (wavcapture, and vnc audio extension) * some backends only support a single playback stream or very picky about the audio format. In this case we can't disable mixeng. However mixeng is not removed, only made optional, so this shouldn't be a big concern. Signed-off-by: Kővágó, Zoltán --- qapi/audio.json | 5 +++++ qemu-options.hx | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/qapi/audio.json b/qapi/audio.json index 30613da..2852dcc 100644 --- a/qapi/audio.json +++ b/qapi/audio.json @@ -184,6 +184,10 @@ # # General audio backend options that are used for both playback and recording. # +# @mixeng: #optional use QEMU's mixing engine to mix all streams inside QEMU. +# When set to off, fixed-settings must be also off. Not every backend +# compatible with the off setting (default on) +# # @fixed-settings: #optional use fixed settings for host input/output. When # off, frequency, channels and format must not be specified # (default on) @@ -207,6 +211,7 @@ ## { 'struct': 'AudiodevPerDirectionOptions', 'data': { + '*mixeng': 'bool', '*fixed-settings': 'bool', '*frequency': 'int', '*channels': 'int', diff --git a/qemu-options.hx b/qemu-options.hx index 09d19a7..4fffb6a 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -329,6 +329,7 @@ DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev, " specifies the audio backend to use\n" " id= identifier of the backend\n" " timer-period= timer period in microseconds\n" + " in|out.mixeng= use mixeng to mix streams inside QEMU\n" " in|out.fixed-settings= use fixed settings for host audio\n" " in|out.frequency= frequency to use with fixed settings\n" " in|out.channels= number of channels to use with fixed settings\n" @@ -397,6 +398,11 @@ Identifies the audio backend. Sets the timer @var{period} used by the audio subsystem in microseconds. Default is 10000 (10 ms). +@item in|out.mixeng=on|off +Use QEMU's mixing engine to mix all streams inside QEMU. When off, +@var{fixed-settings} must be off too. Not every backend is fully +compatible with the off setting. Default is on. + @item in|out.fixed-settings=on|off Use fixed settings for host audio. When off, it will change based on how the guest opens the sound card. In this case you must not specify