audio: add help option for -audio and -audiodev

add a simple help option for -audio and -audiodev
to show the list of available drivers, and document them.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Message-Id: <20220908081441.7111-1-cfontana@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Claudio Fontana 2022-09-08 10:14:41 +02:00 committed by Paolo Bonzini
parent e121d7606b
commit 5e03b6daf6
4 changed files with 33 additions and 6 deletions

View file

@ -704,10 +704,11 @@ SRST
``-audio [driver=]driver,model=value[,prop[=value][,...]]``
This option is a shortcut for configuring both the guest audio
hardware and the host audio backend in one go.
The host backend options are the same as with the corresponding
``-audiodev`` options below. The guest hardware model can be set with
``model=modelname``. Use ``model=help`` to list the available device
types.
The driver option is the same as with the corresponding ``-audiodev`` option below.
The guest hardware model can be set with ``model=modelname``.
Use ``driver=help`` to list the available drivers,
and ``model=help`` to list the available device types.
The following two example do exactly the same, to show how ``-audio``
can be used to shorten the command line length:
@ -721,6 +722,7 @@ ERST
DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev,
"-audiodev [driver=]driver,id=id[,prop[=value][,...]]\n"
" specifies the audio backend to use\n"
" Use ``-audiodev help`` to list the available drivers\n"
" id= identifier of the backend\n"
" timer-period= timer period in microseconds\n"
" in|out.mixing-engine= use mixing engine to mix streams inside QEMU\n"