提交 4843877e 编写于 作者: G Gerd Hoffmann

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: NGerd Hoffmann <kraxel@redhat.com>
上级 e2da502c
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册