diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-07-26 11:00:15 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-07-26 11:00:15 -0400 |
commit | 7ccc3eface57b6e1773fce009dac8a3da081b8b1 (patch) | |
tree | fd841d80ec28e6d0d7ad4fadb8a5a26f4f569e76 /sound/pci/hda/hda_codec.c | |
parent | 2385b789f1525542396d8f6b0cc37c1eb2493b4c (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/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 3 |
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, | |||
1629 | 1629 | ||
1630 | if (val > 0) | 1630 | if (val > 0) |
1631 | val += ofs; | 1631 | val += ofs; |
1632 | maxval = get_amp_max_value(codec, nid, dir, ofs); | 1632 | /* ofs = 0: raw max value */ |
1633 | maxval = get_amp_max_value(codec, nid, dir, 0); | ||
1633 | if (val > maxval) | 1634 | if (val > maxval) |
1634 | val = maxval; | 1635 | val = maxval; |
1635 | return snd_hda_codec_amp_update(codec, nid, ch, dir, idx, | 1636 | return snd_hda_codec_amp_update(codec, nid, ch, dir, idx, |