1
0
Fork 0

ALSA: hda - Fix max amp cap calculation for IDT/STAC codecs

The commit afbd9b8448
    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>
hifive-unleashed-5.1
Takashi Iwai 2010-07-26 17:00:15 +02:00
parent 2385b789f1
commit 7ccc3eface
1 changed files with 2 additions and 1 deletions

View File

@ -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,