From fd62114112f5532270b8897ec83c42ccddda85e8 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 26 Jul 2010 17:00:15 +0200 Subject: [PATCH] ALSA: hda - Fix max amp cap calculation for IDT/STAC codecs The commit 810a5efea6c082b04407ebd257ba70a2cad9a17f 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 --- sound/pci/hda/hda_codec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 501cbc411a834..e5c3484388f0b 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, -- 2.39.5