aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-05-01 13:05:54 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-05-01 13:05:54 +0100
commit61e5b75c178524136622ea8809603b2fae6cc1ca (patch)
treedaf881f5ad18e32b6e4eac736a0d7cb0dff0abac
parentb006f8162e11f0395689a684d6e871b047c23481 (diff)
parent4843877e5d7d9ef4fdd29ac14ee1ce55531a0fc4 (diff)
Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-4' into staging
hda-audio: fix non-mixer codecs # gpg: Signature made Tue 29 Apr 2014 10:03:44 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-audio-4: hda-audio: fix non-mixer codecs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/audio/hda-codec.c3
1 files changed, 3 insertions, 0 deletions
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 {