aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>2019-03-08 23:34:15 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-03-11 10:29:27 +0100
commit71830221fb23388b32e6516c2fb7a698453a6c5a (patch)
treef10b78c8eac3ca884923a35406fd2be2105d531b /vl.c
parentf0b3d8115298c3162d3a56f8f38e0a02e783b54b (diff)
audio: -audiodev command line option basic implementation
Audio drivers now get an Audiodev * as config paramters, instead of the global audio_option structs. There is some code in audio/audio_legacy.c that converts the old environment variables to audiodev options (this way backends do not have to worry about legacy options). It also contains a replacement of -audio-help, which prints out the equivalent -audiodev based config of the currently specified environment variables. Note that backends are not updated and still rely on environment variables. Also note that (due to moving try-poll from global to backend specific option) currently ALSA and OSS will always try poll mode, regardless of environment variables or -audiodev options. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Message-id: e99a7cbdac0d13512743880660b2032024703e4c.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 4a350de5cd..db04aea7f8 100644
--- a/vl.c
+++ b/vl.c
@@ -3253,9 +3253,12 @@ int main(int argc, char **argv, char **envp)
add_device_config(DEV_BT, optarg);
break;
case QEMU_OPTION_audio_help:
- AUD_help ();
+ audio_legacy_help();
exit (0);
break;
+ case QEMU_OPTION_audiodev:
+ audio_parse_option(optarg);
+ break;
case QEMU_OPTION_soundhw:
select_soundhw (optarg);
break;
@@ -4447,6 +4450,8 @@ int main(int argc, char **argv, char **envp)
/* do monitor/qmp handling at preconfig state if requested */
main_loop();
+ audio_init_audiodevs();
+
/* from here on runstate is RUN_STATE_PRELAUNCH */
machine_run_board_init(current_machine);