From nobody Wed Nov 12 10:25:31 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1569876756; cv=none; d=zoho.com; s=zohoarc; b=bnjplq+MNjXgQSvJoIJnCD4SUEoHMvSRROn9ST/QYrLnf5HztCBQOkd3USdbybeIQ+3ooUmi1zUzQ9pIwzP8eOYhqji2SV09ynPICaCETVyAyorB2Z2Xyju5vZ+Wu75VIZemuUcFuLt3lTr+LtpViygsCttpK1cIoiu2Hm+cIQk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569876756; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Gi6tqrqwXbuZC6QjPDbutYBMsb5dVHxRt4y2Z1LxG9o=; b=GVLbebYi0fUmHsGzA7NM80Sn7mpdtE5kETQlIlu8tuEO+chuYIWOv7F6Sb0/IOWWR1Fe02mxfW5g+m7dxPUfjnD8lpG2GVzKhgF2wg/AgVZQ2KcIpi3LYfVS3SmctH0gUPZGQef+f6EvovaKd+YH3ozD/CZbGlvHdkgevq78tC4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569876756400491.8564256253102; Mon, 30 Sep 2019 13:52:36 -0700 (PDT) Received: from localhost ([::1]:57206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iF2ep-0007bK-4z for importer@patchew.org; Mon, 30 Sep 2019 16:52:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45718) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iF2HZ-0003uD-CZ for qemu-devel@nongnu.org; Mon, 30 Sep 2019 16:28:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iF2HY-0002Pl-2B for qemu-devel@nongnu.org; Mon, 30 Sep 2019 16:28:33 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:37110) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iF2HX-0002O5-Re for qemu-devel@nongnu.org; Mon, 30 Sep 2019 16:28:32 -0400 Received: by mail-wm1-x32d.google.com with SMTP id f22so836368wmc.2 for ; Mon, 30 Sep 2019 13:28:31 -0700 (PDT) Received: from nullptr.home.dirty-ice.org (2a01-036c-0113-e8f4-0000-0000-0000-0005.pool6.digikabel.hu. [2a01:36c:113:e8f4::5]) by smtp.gmail.com with ESMTPSA id o9sm34402911wrh.46.2019.09.30.13.28.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 13:28:30 -0700 (PDT) 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=Gi6tqrqwXbuZC6QjPDbutYBMsb5dVHxRt4y2Z1LxG9o=; b=LHQeeonu+UaERht6lIMhJK4jRh7bNV1Gsf3JjSST+XuhSYk2l19t7Q7X8oXMir0OPU RP4dGNtTrw1sY++rtg1/thjalbb0WCYYEdsJuanotRzxtMV7c/S8M57Y2JIxu+VSLEBz /Zoa9Cie7jE/j4Pehi4dKO16Cz1rUoKDJH1M790dN+6W+Rr0mZxZVKtLlO6xkPWi0g+y ifcR9yk2a8p46O61ARMy0Yo0hnCR7+2kHqKfke+y5rkoTFTNzS7A8qRE/fbXa6+vj2AG TSxEROTcq1WgEVOtI4ja2/uxX3xvdb0qocd5wP+QZAbI1AM9aAKD5adjtO8pgczZo3sK s5ig== 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=Gi6tqrqwXbuZC6QjPDbutYBMsb5dVHxRt4y2Z1LxG9o=; b=EnpBbqeGXG6xkgUOOAMewObQS+NYHkRy2b9rZHbnTiKKNjzLpmd/xlYoLIctVhL7Q0 nMmSC3ZdzsQZCAvxIOhHmIY0ChexLastJDEygnLOayemDlTe4TqJTSxYg3TxMOt7/Zgx EYyq4i7DwCloy7jBm7azyaJCDjsQ0dNPsDzFlMXVgr/4Le0qf4807rZtjkALpZ6/wSRU 7qh4C8mmJP4H2hjPMAswNL8Rp6rNTtuuAbod06VNH4vy8NhMvjx35yZq1ou2DLh2pt5s W3TpntWaYeUx548A6NtL8vblWFQThirQ3r3Rhry1WnpEgZgiNyd3oEPwFIuq95q5589v 27ag== X-Gm-Message-State: APjAAAVxmliU1NZ3EIOhnkir78VfJpfIOMoNuBRGmeu6WhuNDsz4MgVU 7tC01vOwa7QUr8UtTzScakTtAMl1 X-Google-Smtp-Source: APXvYqxVWOgy2+OXMRbM2Q9Ny2Obpiy1mZGZ0ZdHd9W7ycj+eW/B81J3A5n6vHGX5Bra9h9LCDuF/A== X-Received: by 2002:a05:600c:2059:: with SMTP id p25mr799742wmg.50.1569875310676; Mon, 30 Sep 2019 13:28:30 -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 Subject: [PATCH v5 01/10] audio: add mixing-engine option (documentation) Date: Mon, 30 Sep 2019 22:28:54 +0200 Message-Id: X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32d X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n --- Notes: Changes from v1: =20 * renamed mixeng to mixing-engine qapi/audio.json | 5 +++++ qemu-options.hx | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/qapi/audio.json b/qapi/audio.json index 9fefdf5186..0996705954 100644 --- a/qapi/audio.json +++ b/qapi/audio.json @@ -11,6 +11,10 @@ # General audio backend options that are used for both playback and # recording. # +# @mixing-engine: use QEMU's mixing engine to mix all streams inside QEMU.= When +# set to off, fixed-settings must be also off. Not every b= ackend +# is compatible with the off setting (default on, since 4.= 2) +# # @fixed-settings: use fixed settings for host input/output. When off, # frequency, channels and format must not be # specified (default true) @@ -31,6 +35,7 @@ ## { 'struct': 'AudiodevPerDirectionOptions', 'data': { + '*mixing-engine': 'bool', '*fixed-settings': 'bool', '*frequency': 'uint32', '*channels': 'uint32', diff --git a/qemu-options.hx b/qemu-options.hx index 2a04ca6ac5..3e50956f48 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -433,6 +433,7 @@ DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev, " specifies the audio backend to use\n" " id=3D identifier of the backend\n" " timer-period=3D timer period in microseconds\n" + " in|out.mixing-engine=3D use mixing engine to mix stre= ams inside QEMU\n" " in|out.fixed-settings=3D use fixed settings for host = audio\n" " in|out.frequency=3D frequency to use with fixed setti= ngs\n" " in|out.channels=3D number of channels to use with fix= ed settings\n" @@ -503,6 +504,11 @@ Identifies the audio backend. Sets the timer @var{period} used by the audio subsystem in microseconds. Default is 10000 (10 ms). =20 +@item in|out.mixing-engine=3Don|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=3Don|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 --=20 2.23.0