From: Gerd Hoffmann Date: Thu, 17 Apr 2014 10:43:26 +0000 (+0200) Subject: hda-audio: fix non-mixer codecs X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~877^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4843877e5d7d9ef4fdd29ac14ee1ce55531a0fc4;p=sdk%2Femulator%2Fqemu.git 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 --- diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index a67ca91..48c6ead 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 {