From 4843877e5d7d9ef4fdd29ac14ee1ce55531a0fc4 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 17 Apr 2014 12:43:26 +0200 Subject: 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 --- hw/audio/hda-codec.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hw/audio') diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index a67ca91ca7..48c6eadb03 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -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 { -- cgit v1.2.3