Commit 7ccc3efa authored by Takashi Iwai's avatar Takashi Iwai

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

The commit afbd9b84
    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: default avatarTakashi Iwai <tiwai@suse.de>
parent 2385b789
...@@ -1629,7 +1629,8 @@ update_amp_value(struct hda_codec *codec, hda_nid_t nid, ...@@ -1629,7 +1629,8 @@ update_amp_value(struct hda_codec *codec, hda_nid_t nid,
if (val > 0) if (val > 0)
val += ofs; 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) if (val > maxval)
val = maxval; val = maxval;
return snd_hda_codec_amp_update(codec, nid, ch, dir, idx, return snd_hda_codec_amp_update(codec, nid, ch, dir, idx,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment