Skip to content

Commit

Permalink
hda-audio: fix non-mixer codecs
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kraxel committed Apr 29, 2014
1 parent e2da502 commit 4843877
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hw/audio/hda-codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4843877

Please sign in to comment.