Skip to content

Commit

Permalink
ALSA: hda - Fix max amp cap calculation for IDT/STAC codecs
Browse files Browse the repository at this point in the history
The commit afbd9b8
    ALSA: hda - Limit the amp value to write
introduced a regression for codec setups with amp offsets like IDT/STAC
codecs.  The limit value should be a raw value without offset calculation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jul 26, 2010
1 parent 2385b78 commit 7ccc3ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,8 @@ update_amp_value(struct hda_codec *codec, hda_nid_t nid,

if (val > 0)
val += ofs;
maxval = get_amp_max_value(codec, nid, dir, ofs);
/* ofs = 0: raw max value */
maxval = get_amp_max_value(codec, nid, dir, 0);
if (val > maxval)
val = maxval;
return snd_hda_codec_amp_update(codec, nid, ch, dir, idx,
Expand Down

0 comments on commit 7ccc3ef

Please sign in to comment.