-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add default value for audio driver #2456
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "default"
should also work with VZ and just be an alias for "vz"
in that case.
Also maybe "none"
should work for VZ as well and be an alias for ""
?
examples/default.yaml
Outdated
@@ -297,6 +297,7 @@ audio: | |||
# QEMU audiodev, e.g., "none", "coreaudio", "pa", "alsa", "oss". | |||
# VZ driver, use "vz" as device name | |||
# Choosing "none" will mute the audio output, and not play any sound. | |||
# Choosing "default" will pick the default for the operating system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we explicitly list the default values for each os:
# macOS: "coreaudio" or "vz", Linux: "pa", Windows: "dsound", otherwise "oss"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just listed all of them, like we do for the video display
@@ -297,6 +297,7 @@ audio: | |||
# QEMU audiodev, e.g., "none", "coreaudio", "pa", "alsa", "oss". | |||
# VZ driver, use "vz" as device name | |||
# Choosing "none" will mute the audio output, and not play any sound. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is not part of this PR, but reading the docs here makes me wonder what the difference is between ""
and "none"
beyond that "none"
doesn't work with VZ. Why would you use "none"
instead of just leaving off the audio device?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually some distributions don't work properly without an audio card, so the default ("") is to add one but leave it disconnected to any speakers. It can be explicitly removed ("none"), if you know that the OS will still boot...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the comment is actually wrong. It is ""
that is muting the audio, and "none"
that removes the driver.
And I still think it needs to be clarified that "default"
doesn't apply to VZ. This could be as simple as moving the VZ line all the way to the bottom (on top of the "Builtin default" line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, "" omits the qemu flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but this is end-user documentation. We should not punt by telling them to read the qemu docs and the Lima sources, but explain what each valid choice does, and why they would want to pick ""
over "none"
or vice versa. Or just drop "none"
from our comments if there is no reason a user would ever want that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The defaults changed again in QEMU 8.2, so if we want to document what the default drivers are - it needs some more research and testing.
This probably needs a testing template, as well. If nothing else, you need to add linux-modules-extra and alsa-utils. I would normally test with |
7148c29
to
c365809
Compare
Added example:
This example uses |
Can now use .audio.device=default similar to .video.display=default You can still pick another driver, such as alsa or oss, if you want. Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
c365809
to
a232747
Compare
853330e
to
45f3c99
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but one superfluous argument in the Warnf
call.
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
45f3c99
to
af048c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM.
@@ -297,6 +297,9 @@ audio: | |||
# QEMU audiodev, e.g., "none", "coreaudio", "pa", "alsa", "oss". | |||
# VZ driver, use "vz" as device name | |||
# Choosing "none" will mute the audio output, and not play any sound. | |||
# Choosing "default" will pick a suitable of: coreudio, pa, dsound, oss. | |||
# As of QEMU v6.2 the default is to create a disconnected sound device |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still ambiguous if "the default" means when it is set to "default"
or to "the builtin default" ""
.
But maybe it doesn't really matter, practically speaking.
Can now use
.audio.device=default
similar to.video.display=default
You can still pick another driver, such as
alsa
oross
, if you want.