From patchwork Wed Jan 16 23:37:14 2019 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: 1026309 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="V575rm4b"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43g3zg5prjz9sCX for ; Thu, 17 Jan 2019 10:57:35 +1100 (AEDT) Received: from localhost ([127.0.0.1]:35924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjv3t-0002PU-O4 for incoming@patchwork.ozlabs.org; Wed, 16 Jan 2019 18:57:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjul8-0004P3-2z for qemu-devel@nongnu.org; Wed, 16 Jan 2019 18:38:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjul4-0003Rn-II for qemu-devel@nongnu.org; Wed, 16 Jan 2019 18:38:10 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:36186) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjul4-0003Jl-4P for qemu-devel@nongnu.org; Wed, 16 Jan 2019 18:38:06 -0500 Received: by mail-wr1-x42b.google.com with SMTP id u4so8967971wrp.3 for ; Wed, 16 Jan 2019 15:38:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CCmmtkTX5UQWh5lGDkfWpkyZkld9l3muJnFm8hymQpM=; b=V575rm4bzYa7x7HqzIlvG90YuG/pzGeUuSVi5kC7t3uzrYxs4tPBB02CtQK487rSuO FLXOfWwpSxsmT85RAWhcSsz6pfVyktR+heYXKPGaWs291Fc9vUMZCajbKP04g6Nk6HwT /KeAVOvSaoUjCfEc+PLQMOCE+FYJK6WLtJDqW9ZSIjK0kgoG+zBKbk6fmlbvoq26N3sx +XBOtRbep/oLs12ZUSaOktyijIuajpaYByxaiZ8meTDi3vR/BWH0NZHrlPjYa6v5tIu2 0OAsTd15CmJqgmmOkuU45gkBskk/cADUSeqTA5LAhS+0NvJ7tkdvVi+wYV/XP9uD8YyZ 4qig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CCmmtkTX5UQWh5lGDkfWpkyZkld9l3muJnFm8hymQpM=; b=ohz/AgfflILnCFsps/hsg5b0Fg2gr4k/heC9giIOUUEgSPB+tiZXvn1lGiOg5UGWGu MSpDaxhS0w9uZhu7M/pYux1T19HFaw5EWKzjainu2vZ81dYePJg6c43TtQdbcTO0qSLY FW9hOjAvEpxpX+cL43hjf4sOIy0W5b9HkGlwkUDSIhVbUPXLc4KyBuD2sV0iHQZkF2ws QbC0JYLFMVtltyK4MAuGJ+tEa3Vuv7g2K/WacfY8IMxlhnESfSuplthfK+azsGvKiype er6enaNT/mehEBc/7NT3LjegUjQ8HEEPwtrdcWJ/e2V5KCQMTzuxMHGw3ViX+O/KVWdP VoTw== X-Gm-Message-State: AJcUukfvMPlaVeGxwkspZ+2IcFpTLNnlWKeb/9E2fOp1G2J+kMBfWAvq dgSE+l6htVeYJEcFZj61F8YW7QaRWcI= X-Google-Smtp-Source: ALg8bN5EomIzaYLVSR5S+zTspD7zv2A1OoxMfer6XSk8O0XXLpfS4JFOXIEzgegx1QnP7Q6Dsrr/Sw== X-Received: by 2002:a05:6000:51:: with SMTP id k17mr8958109wrx.259.1547681882080; Wed, 16 Jan 2019 15:38:02 -0800 (PST) Received: from nullptr.home.dirty-ice.org (2a01-036c-0113-e4b0-0000-0000-0000-0005.pool6.digikabel.hu. [2a01:36c:113:e4b0::5]) by smtp.gmail.com with ESMTPSA id s66sm30760437wmf.34.2019.01.16.15.38.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 15:38:01 -0800 (PST) From: "=?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?=" X-Google-Original-From: =?utf-8?b?S8WRdsOhZ8OzLCBab2x0w6Fu?= To: qemu-devel@nongnu.org Date: Thu, 17 Jan 2019 00:37:14 +0100 Message-Id: <48943170cf1619d5d2aadfaebf450a017316d8d2.1547681517.git.DirtY.iCE.hu@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42b Subject: [Qemu-devel] [PATCH v3 41/50] audio: add mixeng option (documentation) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 --- Notes: Changes from v2: * removed #optional qapi/audio.json | 5 +++++ qemu-options.hx | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/qapi/audio.json b/qapi/audio.json index bd6e2494bd..7bcea6240f 100644 --- a/qapi/audio.json +++ b/qapi/audio.json @@ -172,6 +172,10 @@ # # General audio backend options that are used for both playback and recording. # +# @mixeng: 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: use fixed settings for host input/output. When off, # frequency, channels and format must not be specified # (default on) @@ -192,6 +196,7 @@ ## { 'struct': 'AudiodevPerDirectionOptions', 'data': { + '*mixeng': 'bool', '*fixed-settings': 'bool', '*frequency': 'uint32', '*channels': 'uint32', diff --git a/qemu-options.hx b/qemu-options.hx index 098508ce09..53fc5ef453 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -432,6 +432,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" @@ -500,6 +501,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