aboutsummaryrefslogtreecommitdiff
path: root/qemu-options.hx
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-04-27 12:27:46 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2022-05-14 12:33:44 +0200
commit039a68373c4544ff94871f945a733928b6dcfe93 (patch)
tree9a4d966054f19e7c967a5d9c046d9ab184ab0fc3 /qemu-options.hx
parent67aaa96ae451913ffd25766dc59341fe6b63619d (diff)
introduce -audio as a replacement for -soundhw
-audio is used like "-audio pa,model=sb16". It is almost as simple as -soundhw, but it reuses the -audiodev parsing machinery and attaches an audiodev to the newly-created device. The main 'feature' is that it knows about adding the codec device for model=intel-hda, and adding the audiodev to the codec device. In the future, it could be extended to support default models or builtin devices, just like -nic, or even a default backend. For now, keep it simple. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-options.hx')
-rw-r--r--qemu-options.hx51
1 files changed, 24 insertions, 27 deletions
diff --git a/qemu-options.hx b/qemu-options.hx
index 796229c433..60d2d728d6 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -661,6 +661,30 @@ SRST
(deprecated) environment variables.
ERST
+DEF("audio", HAS_ARG, QEMU_OPTION_audio,
+ "-audio [driver=]driver,model=value[,prop[=value][,...]]\n"
+ " specifies the audio backend and device to use;\n"
+ " apart from 'model', options are the same as for -audiodev.\n"
+ " use '-audio model=help' to show possible devices.\n",
+ QEMU_ARCH_ALL)
+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 following two example do exactly the same, to show how ``-audio``
+ can be used to shorten the command line length:
+
+ .. parsed-literal::
+
+ |qemu_system| -audiodev pa,id=pa -device sb16,audiodev=pa
+ |qemu_system| -audio pa,model=sb16
+ERST
+
DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev,
"-audiodev [driver=]driver,id=id[,prop[=value][,...]]\n"
" specifies the audio backend to use\n"
@@ -892,33 +916,6 @@ SRST
``qemu.wav``.
ERST
-DEF("soundhw", HAS_ARG, QEMU_OPTION_soundhw,
- "-soundhw c1,... enable audio support\n"
- " and only specified sound cards (comma separated list)\n"
- " use '-soundhw help' to get the list of supported cards\n"
- " use '-soundhw all' to enable all of them\n", QEMU_ARCH_ALL)
-SRST
-``-soundhw card1[,card2,...] or -soundhw all``
- Enable audio and selected sound hardware. Use 'help' to print all
- available sound hardware. For example:
-
- .. parsed-literal::
-
- |qemu_system_x86| -soundhw sb16,adlib disk.img
- |qemu_system_x86| -soundhw es1370 disk.img
- |qemu_system_x86| -soundhw ac97 disk.img
- |qemu_system_x86| -soundhw hda disk.img
- |qemu_system_x86| -soundhw all disk.img
- |qemu_system_x86| -soundhw help
-
- Note that Linux's i810\_audio OSS kernel (for AC97) module might
- require manually specifying clocking.
-
- ::
-
- modprobe i810_audio clocking=48000
-ERST
-
DEF("device", HAS_ARG, QEMU_OPTION_device,
"-device driver[,prop[=value][,...]]\n"
" add device (based on driver)\n"