diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2014-04-17 12:43:26 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-04-29 10:46:29 +0200 |
commit | 4843877e5d7d9ef4fdd29ac14ee1ce55531a0fc4 (patch) | |
tree | 91a76e742c8639235af162ffef6800258dfd6726 /hw/audio | |
parent | e2da502c003b9a91b4aea7684959192bd07c1f1d (diff) | |
download | qemu-4843877e5d7d9ef4fdd29ac14ee1ce55531a0fc4.zip qemu-4843877e5d7d9ef4fdd29ac14ee1ce55531a0fc4.tar.gz qemu-4843877e5d7d9ef4fdd29ac14ee1ce55531a0fc4.tar.bz2 |
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>
Diffstat (limited to 'hw/audio')
-rw-r--r-- | hw/audio/hda-codec.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 { |