From nobody Sun Nov 9 14:50:03 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1550842624318551.6972924491506; Fri, 22 Feb 2019 05:37:04 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 844AC8765E; Fri, 22 Feb 2019 13:37:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4DAB72C8EC; Fri, 22 Feb 2019 13:37:02 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EC57824C13; Fri, 22 Feb 2019 13:37:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1KLbteL025193 for ; Wed, 20 Feb 2019 16:37:55 -0500 Received: by smtp.corp.redhat.com (Postfix) id 35BFA45A3; Wed, 20 Feb 2019 21:37:55 +0000 (UTC) Received: from mx1.redhat.com (ext-mx17.extmail.prod.ext.phx2.redhat.com [10.5.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 296441948B; Wed, 20 Feb 2019 21:37:51 +0000 (UTC) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 853C1300398D; Wed, 20 Feb 2019 21:37:49 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id n2so15553969wrw.8; Wed, 20 Feb 2019 13:37:49 -0800 (PST) Received: from nullptr.home.dirty-ice.org (2a01-036c-0113-6fd0-0000-0000-0000-0005.pool6.digikabel.hu. [2a01:36c:113:6fd0::5]) by smtp.gmail.com with ESMTPSA id o18sm66452489wrg.40.2019.02.20.13.37.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Feb 2019 13:37:47 -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=p1+5gaqOxuy2fodYWQuwpRdy9OFl6u+CUArpIOM0QLk=; b=nonBOx30TpUXCkt5wuylkQQ1SgoiZ3B7elUL/e0ZCdLtCbN5nVDvtnTKlywYw3ojfH O/81zx4/XxC0RR4CkP4Aj8vwHMFXISEKrA2WRdW+rLys6bu3iWrNKRi+QMTYJ7/a/20T 2va2/y+ULc++x9kbpJEChSnUe7ljKXDOUOXidVKH1RhZ+l+dCthyWZ8fXNL2wZo54L3n ZNbO5iaBkxxWJIDQzVMkPIy9CXHdi0DrHQbCibvlEEtgd8PEIiqckMLqF9ms6TU6O40Q G7zqgfWrmW7b/JsO7MYQStz45ciIQAWUNlR76BfRe4Ou/s7Nc6eT9qg1wOkQAWXr7s+x nG7Q== 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=p1+5gaqOxuy2fodYWQuwpRdy9OFl6u+CUArpIOM0QLk=; b=CUIA4YgLrYw3gOPgdQYxKnR0QmpzBRmixh2qz9/MmxkmpmIVoqBGU+f4ra+NHyunMS shZI1LhKF7hoAwhYuj63SJnmuiEBOHJyR2sV2A2/syztGi18oncb9Ux6XqKd8SN3eQmk hndXR+QMW4MmtjV+/YGkoQEueqbGE1hnM0Bi+fQy8gX17DskhUXG881YAuZkEFEfO4nV YCvqlfgbs/ZO+Xs7OFPJCeG843xwPdB8ztpoAge+nSVPPKTOZl6jU4z5S1Jgf8CBvYS+ HYSDibFenfkq4xMXO24mu/GZm4Iy5o50ynTzwzx8iJBnJgztIlQRO6kbudWolTX3xu/H 8QRA== X-Gm-Message-State: AHQUAuaVMqNI2raZdyl5ikLPtHB8XJp5d0ID+9Ssyewlx223V8sHibzk 5umxqfw58ZnLQ1QYt9FdOGI= X-Google-Smtp-Source: AHgI3IZfGn852QtDPYq84ulztXI5ux4krPh5HuX1fdMVyZ73oIvC19NhFQWxRrzGQrTssEeiO11kPg== X-Received: by 2002:adf:dd86:: with SMTP id x6mr4358888wrl.250.1550698668032; Wed, 20 Feb 2019 13:37:48 -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: Wed, 20 Feb 2019 22:37:32 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 20 Feb 2019 21:37:50 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 20 Feb 2019 21:37:50 +0000 (UTC) for IP:'209.85.221.67' DOMAIN:'mail-wr1-f67.google.com' HELO:'mail-wr1-f67.google.com' FROM:'dirty.ice.hu@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.111 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.221.67 mail-wr1-f67.google.com 209.85.221.67 mail-wr1-f67.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.46 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Fri, 22 Feb 2019 08:37:00 -0500 Cc: "reviewer:Incompatible changes" , Gerd Hoffmann Subject: [libvirt] [PATCH v5 03/14] audio: -audiodev command line option: documentation X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 22 Feb 2019 13:37:03 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) This patch adds documentation of an -audiodev command line option, that deprecates the old QEMU_* environment variables for audio backend configuration. It's syntax is similar to existing options (-netdev, -device, etc): -audiodev driver_name,property=3Dvalue,... Although now it's possible to specify multiple -audiodev options on command line, multiple audio backends are not supported yet. Signed-off-by: K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n --- Notes: Changes from v4: =20 * deprecated QEMU_AUDIO_ env vars * updated to reflect qapi changes * added info to qemu-deprecated.texi qemu-deprecated.texi | 7 ++ qemu-options.hx | 236 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 240 insertions(+), 3 deletions(-) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 45c57952da..5c07ad4acb 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -60,6 +60,13 @@ Support for invalid topologies will be removed, the user= must ensure topologies described with -smp include all possible cpus, i.e. @math{@var{sockets} * @var{cores} * @var{threads} =3D @var{maxcpus}}. =20 +@subsection QEMU_AUDIO_ environment variables and -audio-help (since 4.0) + +The ``-audiodev'' argument is now the preferred way to specify audio +backend settings instead of environment variables. To ease migration to +the new format, the ``-audiodev-help'' option can be used to convert +the current values of the environment variables to ``-audiodev'' options. + @section QEMU Machine Protocol (QMP) commands =20 @subsection block-dirty-bitmap-add "autoload" parameter (since 2.12.0) diff --git a/qemu-options.hx b/qemu-options.hx index 77bd98e20b..f77f4d89a7 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -416,14 +416,244 @@ The default is @code{en-us}. ETEXI =20 =20 +HXCOMM Deprecated by -audiodev DEF("audio-help", 0, QEMU_OPTION_audio_help, - "-audio-help print list of audio drivers and their options\n", + "-audio-help show -audiodev equivalent of the currently specified = audio settings\n", QEMU_ARCH_ALL) STEXI @item -audio-help @findex -audio-help -Will show the audio subsystem help: list of drivers, tunable -parameters. +Will show the -audiodev equivalent of the currently specified +(deprecated) environment variables. +ETEXI + +DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev, + "-audiodev [driver=3D]driver,id=3Did[,prop[=3Dvalue][,...]]\n" + " specifies the audio backend to use\n" + " id=3D identifier of the backend\n" + " timer-period=3D timer period in microseconds\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" + " in|out.format=3D sample format to use with fixed sett= ings\n" + " valid values: s8, s16, s32, u8, u16, u32\n" + " in|out.voices=3D number of voices to use\n" + " in|out.buffer-len=3D length of buffer in microseconds= \n" + "-audiodev none,id=3Did,[,prop[=3Dvalue][,...]]\n" + " dummy driver that discards all output\n" +#ifdef CONFIG_ALSA + "-audiodev alsa,id=3Did[,prop[=3Dvalue][,...]]\n" + " in|out.dev=3D name of the audio device to use\n" + " in|out.period-len=3D length of period in microseconds= \n" + " in|out.try-poll=3D attempt to use poll mode\n" + " threshold=3D threshold (in microseconds) when playbac= k starts\n" +#endif +#ifdef CONFIG_COREAUDIO + "-audiodev coreaudio,id=3Did[,prop[=3Dvalue][,...]]\n" + " in|out.buffer-count=3D number of buffers\n" +#endif +#ifdef CONFIG_DSOUND + "-audiodev dsound,id=3Did[,prop[=3Dvalue][,...]]\n" + " latency=3D add extra latency to playback in microseco= nds\n" +#endif +#ifdef CONFIG_OSS + "-audiodev oss,id=3Did[,prop[=3Dvalue][,...]]\n" + " in|out.dev=3D path of the audio device to use\n" + " in|out.buffer-count=3D number of buffers\n" + " in|out.try-poll=3D attempt to use poll mode\n" + " try-mmap=3D try using memory mapped access\n" + " exclusive=3D open device in exclusive mode\n" + " dsp-policy=3D set timing policy (0..10), -1 to use fr= agment mode\n" +#endif +#ifdef CONFIG_PA + "-audiodev pa,id=3Did[,prop[=3Dvalue][,...]]\n" + " server=3D PulseAudio server address\n" + " in|out.name=3D source/sink device name\n" +#endif +#ifdef CONFIG_SDL + "-audiodev sdl,id=3Did[,prop[=3Dvalue][,...]]\n" +#endif +#ifdef CONFIG_SPICE + "-audiodev spice,id=3Did[,prop[=3Dvalue][,...]]\n" +#endif + "-audiodev wav,id=3Did[,prop[=3Dvalue][,...]]\n" + " path=3D path of wav file to record\n", + QEMU_ARCH_ALL) +STEXI +@item -audiodev [driver=3D]@var{driver},id=3D@var{id}[,@var{prop}[=3D@var{= value}][,...]] +@findex -audiodev +Adds a new audio backend @var{driver} identified by @var{id}. There are +global and driver specific properties. Some values can be set +differently for input and output, they're marked with @code{in|out.}. +You can set the input's property with @code{in.@var{prop}} and the +output's property with @code{out.@var{prop}}. For example: +@example +-audiodev alsa,id=3Dexample,in.frequency=3D44110,out.frequency=3D8000 +-audiodev alsa,id=3Dexample,out.channels=3D1 # leaves in.channels unspecif= ied +@end example + +Valid global options are: + +@table @option +@item id=3D@var{identifier} +Identifies the audio backend. + +@item timer-period=3D@var{period} +Sets the timer @var{period} used by the audio subsystem in microseconds. +Default is 10000 (10 ms). + +@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 +@var{frequency}, @var{channels} or @var{format}. Default is on. + +@item in|out.frequency=3D@var{frequency} +Specify the @var{frequency} to use when using @var{fixed-settings}. +Default is 44100Hz. + +@item in|out.channels=3D@var{channels} +Specify the number of @var{channels} to use when using +@var{fixed-settings}. Default is 2 (stereo). + +@item in|out.format=3D@var{format} +Specify the sample @var{format} to use when using @var{fixed-settings}. +Valid values are: @code{s8}, @code{s16}, @code{s32}, @code{u8}, +@code{u16}, @code{u32}. Default is @code{s16}. + +@item in|out.voices=3D@var{voices} +Specify the number of @var{voices} to use. Default is 1. + +@item in|out.buffer=3D@var{usecs} +Sets the size of the buffer in microseconds. + +@end table + +@item -audiodev none,id=3D@var{id}[,@var{prop}[=3D@var{value}][,...]] +Creates a dummy backend that discards all outputs. This backend has no +backend specific properties. + +@item -audiodev alsa,id=3D@var{id}[,@var{prop}[=3D@var{value}][,...]] +Creates backend using the ALSA. This backend is only available on +Linux. + +ALSA specific options are: + +@table @option + +@item in|out.dev=3D@var{device} +Specify the ALSA @var{device} to use for input and/or output. Default +is @code{default}. + +@item in|out.period-len=3D@var{usecs} +Sets the period length in microseconds. + +@item in|out.try-poll=3Don|off +Attempt to use poll mode with the device. Default is on. + +@item threshold=3D@var{threshold} +Threshold (in microseconds) when playback starts. Default is 0. + +@end table + +@item -audiodev coreaudio,id=3D@var{id}[,@var{prop}[=3D@var{value}][,...]] +Creates a backend using Apple's Core Audio. This backend is only +available on Mac OS and only supports playback. + +Core Audio specific options are: + +@table @option + +@item in|out.buffer-count=3D@var{count} +Sets the @var{count} of the buffers. + +@end table + +@item -audiodev dsound,id=3D@var{id}[,@var{prop}[=3D@var{value}][,...]] +Creates a backend using Microsoft's DirectSound. This backend is only +available on Windows and only supports playback. + +DirectSound specific options are: + +@table @option + +@item latency=3D@var{usecs} +Add extra @var{usecs} microseconds latency to playback. Default is +10000 (10 ms). + +@end table + +@item -audiodev oss,id=3D@var{id}[,@var{prop}[=3D@var{value}][,...]] +Creates a backend using OSS. This backend is available on most +Unix-like systems. + +OSS specific options are: + +@table @option + +@item in|out.dev=3D@var{device} +Specify the file name of the OSS @var{device} to use. Default is +@code{/dev/dsp}. + +@item in|out.buffer-count=3D@var{count} +Sets the @var{count} of the buffers. + +@item in|out.try-poll=3Don|of +Attempt to use poll mode with the device. Default is on. + +@item try-mmap=3Don|off +Try using memory mapped device access. Default is off. + +@item exclusive=3Don|off +Open the device in exclusive mode (vmix won't work in this case). +Default is off. + +@item dsp-policy=3D@var{policy} +Sets the timing policy (between 0 and 10, where smaller number means +smaller latency but higher CPU usage). Use -1 to use buffer sizes +specified by @code{buffer} and @code{buffer-count}. This option is +ignored if you do not have OSS 4. Default is 5. + +@end table + +@item -audiodev pa,id=3D@var{id}[,@var{prop}[=3D@var{value}][,...]] +Creates a backend using PulseAudio. This backend is available on most +systems. + +PulseAudio specific options are: + +@table @option + +@item server=3D@var{server} +Sets the PulseAudio @var{server} to connect to. + +@item in|out.name=3D@var{sink} +Use the specified source/sink for recording/playback. + +@end table + +@item -audiodev sdl,id=3D@var{id}[,@var{prop}[=3D@var{value}][,...]] +Creates a backend using SDL. This backend is available on most systems, +but you should use your platform's native backend if possible. This +backend has no backend specific properties. + +@item -audiodev spice,id=3D@var{id}[,@var{prop}[=3D@var{value}][,...]] +Creates a backend that sends audio through SPICE. This backend requires +@code{-spice} and automatically selected in that case, so usually you +can ignore this option. This backend has no backend specific +properties. + +@item -audiodev wav,id=3D@var{id}[,@var{prop}[=3D@var{value}][,...]] +Creates a backend that writes audio to a WAV file. + +Backend specific options are: + +@table @option + +@item path=3D@var{path} +Write recorded audio into the specified file. Default is +@code{qemu.wav}. + +@end table ETEXI =20 DEF("soundhw", HAS_ARG, QEMU_OPTION_soundhw, --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list