mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 03:13:44 +08:00
hda-audio: fix non-mixer codecs
They don't advertise mixer support, but still allow the guest change mixer settings. Add a check to avoid it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
e2da502c00
commit
4843877e5d
@ -261,6 +261,9 @@ static void hda_audio_set_amp(HDAAudioStream *st)
|
||||
left = left * 255 / QEMU_HDA_AMP_STEPS;
|
||||
right = right * 255 / QEMU_HDA_AMP_STEPS;
|
||||
|
||||
if (!st->state->mixer) {
|
||||
return;
|
||||
}
|
||||
if (st->output) {
|
||||
AUD_set_volume_out(st->voice.out, muted, left, right);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user