From patchwork Thu Jan 14 13:45:55 2016 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: 567472 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 3A8FF1402E2 for ; Fri, 15 Jan 2016 01:07:58 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=05Fr3Uax; dkim-atps=neutral Received: from localhost ([::1]:42724 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJiZ9-0002Zu-JR for incoming@patchwork.ozlabs.org; Thu, 14 Jan 2016 09:07:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJiEf-0001oQ-Ta for qemu-devel@nongnu.org; Thu, 14 Jan 2016 08:46:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJiEd-0003Zb-NC for qemu-devel@nongnu.org; Thu, 14 Jan 2016 08:46:45 -0500 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:33935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJiEd-0003ZT-Ed for qemu-devel@nongnu.org; Thu, 14 Jan 2016 08:46:43 -0500 Received: by mail-wm0-x243.google.com with SMTP id b14so43780474wmb.1 for ; Thu, 14 Jan 2016 05:46:43 -0800 (PST) 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=Rg8EtwDy2i+3lIBLOZNeC4OHNLeZuZAfR8+RYBn5bag=; b=05Fr3Uaxs/gieAypitWMUnBjyiz64ZX5jggcWSx/r2dxiBevJJw8i9V55nRgDAuBvy PxBn4EW4KPddIPLflfTSMFk9SiAaJf3Wt/0S3Ffkl2p7I2yEB7GJxmqORWORNzBJyq5U zUoGUQy+LEs0c1Tl/jmFLqWj/S+7w+ZiYJDY/7jwhpUsZAIMEqKcw1+lJTRIrJlCVofG aKo0cD7u869wXVcRRlHrddnKVXADoPTPLcBoxiVfhe8BYFfTYrS2WczkagiwkGZAPCBs Y5JINID9OfMx8EWtpCNfNH2q/fAJB02+K07BM31TtEftjP0j2C2L2izmnNfPvH6eJgiQ 5hUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Rg8EtwDy2i+3lIBLOZNeC4OHNLeZuZAfR8+RYBn5bag=; b=hO471rhwNeNSPVN9SaAf08qwQndMtNsTWGUytkp7Ednmevhz+jxvxTm/IaLTVCj+sl lo+crr2C2/5BKJc6HNVmopulDA8cCBKFMVltq7PgJAx3PzCi9B8bw8hz3VCQXmzSGgFg qMjD8DBIAGC8nVarlYSxCiUrL/qu7+8Hr6cTYrSKvNzMXc6dKqcxXfHnLsoGhJzARcUK 2Hn1RxPKzCCe/Z5sJmVpI0bMUnRraSoE17Mm4I8wCPTHu0aiJVq9lMoKfzclFDevG9M1 ZsJqgrt6bKvfrXocPrzFaXQ8lF4pmA3SYuUsuIE157LUVVzvqz5KFn9SxosLXdLyg1dV UQfA== X-Gm-Message-State: ALoCoQmuO8mITzphs1PzE1NHFOHSh0VW1iysQMR/46OvIKGL9zKcf9ir+m6VeZWTowdclhTGGCP6pzke67BvYjUgoXne8ZUs6w== X-Received: by 10.28.87.135 with SMTP id l129mr5293944wmb.9.1452779202964; Thu, 14 Jan 2016 05:46:42 -0800 (PST) Received: from nullptr.home.dirty-ice.org (188-143-126-18.pool.digikabel.hu. [188.143.126.18]) by smtp.gmail.com with ESMTPSA id 79sm7398061wmo.7.2016.01.14.05.46.42 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 14 Jan 2016 05:46:42 -0800 (PST) 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: Thu, 14 Jan 2016 14:45:55 +0100 Message-Id: <7f38f2b695ad041854408899fb2cd9088fd59e88.1452776884.git.DirtY.iCE.hu@gmail.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::243 Cc: Gerd Hoffmann , Markus Armbruster Subject: [Qemu-devel] [PATCH 42/51] 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 da0c2df..9bd61de 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 184ffd4..a995fca 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -336,6 +336,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" @@ -404,6 +405,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