aboutsummaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-07-26 17:00:15 +0200
committerTakashi Iwai <tiwai@suse.de>2010-07-26 17:00:15 +0200
commit7ccc3eface57b6e1773fce009dac8a3da081b8b1 (patch)
treefd841d80ec28e6d0d7ad4fadb8a5a26f4f569e76 /sound/pci
parent2385b789f1525542396d8f6b0cc37c1eb2493b4c (diff)
ALSA: hda - Fix max amp cap calculation for IDT/STAC codecs
The commit afbd9b8448f4b7d15673c6858012f384f18d28b8 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>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_codec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 501cbc411a8..e5c3484388f 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -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,