qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 6/6] audio: -audiodev command line option


From: Kővágó Zoltán
Subject: Re: [Qemu-devel] [PATCH v2 6/6] audio: -audiodev command line option
Date: Wed, 17 Jun 2015 13:18:51 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

2015-06-17 10:13 keltezéssel, Markus Armbruster írta:
"Kővágó, Zoltán" <address@hidden> writes:

This patch adds an -audiodev command line option, and deprecates the QEMU_*
environment variables for audio backend configuration. It's syntax is similar to
existing options (-netdev, -device, etc):
  -audiodev driver_name,property=value,...

Sounds really good.

Please wrap your commit message lines a bit earlier, around column 70.

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, also print out them with -audio-help, to ease
migrating to -audiodev).

The parenthesis isn't as clear as the rest of your message, probably
because it deals with two separate things.  Suggest to move out the bit
about help into its own paragraph.

Although now it's possible to specify multiple -audiodev options on command
line, multiple audio backends are not supported yet.

What happens when I specify multiple -audiodev?

You get an error and qemu terminates.

How should the command line look like when multiple audio backends are
supported?

There's an id property of audiodev, so you can identify them:
-audiodev alsa,id=foo,... -audiodev pa,id=bar,...
and audio devices should get an extra parameter, like audiodev or something like that:
-device usb-audio,audiodev=foo -device usb-audio,audiodev=bar
And you have two cards, one connected to the alsa device and the other connected to pulseaudio.


Do we have a clear backward-compatible path from here to there?

Currently if you specify an -audiodev option, the environment variables are completely ignored, and it will create an audio backend using the specified options. If you do not provide an -audiodev, it will initialize the audio subsystem using the old environment variables when you add the first sound card (so no -audiodev and no sound device means no audio subsystem, just like the old times).

About multiple backends: if the user does not specify the id of the backend when creating the sound card, just use the first -audiodev specified on the command line (or the legacy config, if there's no -audiodev). This way we stay backward-compatible (there won't be multiple -audiodevs in legacy configs).


[...]
  18 files changed, 994 insertions(+), 1083 deletions(-)
  create mode 100644 audio/audio_legacy.c

Very nice delta, but the size is a bit intimidating :)

[...]





reply via email to

[Prev in Thread] Current Thread [Next in Thread]