From patchwork Sun Dec 23 20:52:19 2018 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: 1018129 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=208.118.235.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="b18povVG"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43NFnw08pVz9sCQ for ; Mon, 24 Dec 2018 08:27:46 +1100 (AEDT) Received: from localhost ([127.0.0.1]:59982 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbBHj-00019z-GJ for incoming@patchwork.ozlabs.org; Sun, 23 Dec 2018 16:27:43 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbAkF-0008Nf-7h for qemu-devel@nongnu.org; Sun, 23 Dec 2018 15:53:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbAkE-0003WJ-33 for qemu-devel@nongnu.org; Sun, 23 Dec 2018 15:53:07 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:51214) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gbAkD-0003TW-S9 for qemu-devel@nongnu.org; Sun, 23 Dec 2018 15:53:06 -0500 Received: by mail-wm1-x332.google.com with SMTP id b11so9877472wmj.1 for ; Sun, 23 Dec 2018 12:53:05 -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=YPkI6O+yO0+PWs9SLcVDMljymIpnHMJomM9nRkZBkws=; b=b18povVGbzci8Ix1XUUlkk/X/hIdnX4HhFjQg8DG9r7l/uYU91LypgEeXhDWXpBcmh wmHzZTx5nCQVG8WvZSVvqRDT9rZq6t9QvLqewt0NKV7V2ANVYKSdU/Ix/9gnESdsX2id 7jNxEdgz4AdIr+twwPSdvgr1NESSVvidsOIqYjSgeL6S/vVO4KphoNnLjgDYf7iU+02F 55P+yMawKHDK3h/mX5Rkk42rxDBe2TLtBGuxe1KZa5OjyvOuZgEuUCoiQbQgde5GB659 vHm1ruBmfivvlVtba9ZSiiC/CYiGMgZl2Gc9orpDGHZXHhVwDcM5jzR/F009CtJQKLXd J9nw== 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=YPkI6O+yO0+PWs9SLcVDMljymIpnHMJomM9nRkZBkws=; b=WPPvRfLEbijb+Ef+B91nsiZN0qJ2hgoabgHSV5Ly+xo+mx7Kfdy22xL22bZnODha1J m0IlW/on2lmmB7TFMWnlM+dPcUl/s6rsxmoRGijYqwMCU9/UfNmxVMgGAxAMXDebv2eS Iqk51LYLaSRgx1zSd2xcaOtKEwMVeBCIubZwrgzYasvAC8qKipZv4WIzdneEo9EJ9HRK cP9ajbrqmeYnWtAKWNE/RkL6TJ38C2pijPQKiQhimTeVr/4mhggybyOCEvN2y3czg1xK 6+Ir/ddeUwEO0162AtW8NpgLFZ/fbw6gIUCRtuP+aIJWyuv7Eexi0tp9OCgFQvmUfHwh 5Cig== X-Gm-Message-State: AA+aEWYK676a75Pk0Gl2AQh1mzLKj6dLhELh8hLje25Son7cKNUjl8VO u7Q/fGy5qtgz+II0bJE2iCTrEU0Yr8E= X-Google-Smtp-Source: ALg8bN6KnXNGJzHTeYAcjo70uP5AEsYmstyqmB6h4Ar754kFv2q0xvQ5Rq4YlXnNR6E4/VKkr8gLpQ== X-Received: by 2002:a7b:cb86:: with SMTP id m6mr10106232wmi.61.1545598384607; Sun, 23 Dec 2018 12:53:04 -0800 (PST) Received: from nullptr.home.dirty-ice.org (2a01-036c-0113-24a3-0000-0000-0000-0005.pool6.digikabel.hu. [2a01:36c:113:24a3::5]) by smtp.gmail.com with ESMTPSA id g198sm25456920wmd.23.2018.12.23.12.53.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Dec 2018 12:53:04 -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: Sun, 23 Dec 2018 21:52:19 +0100 Message-Id: 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::332 Subject: [Qemu-devel] [PATCH v2 43/52] 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 --- qapi/audio.json | 5 +++++ qemu-options.hx | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/qapi/audio.json b/qapi/audio.json index 56d8ce439f..180bf207a8 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 687dd23bf2..eb65b511fa 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