summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorNicolas Graziano <nicolas.graziano@wanadoo.fr>2005-07-29 12:17:20 +0200
committerJaroslav Kysela <perex@suse.cz>2005-08-30 08:43:15 +0200
commitb9f5a89c74e541533766dcda55d34a06253f60f3 (patch)
treec6368abb5f77f63663911fb4edc769e18de658e6 /sound/pci/hda
parent[ALSA] hda-codec - Add default config for ASUS P5AD2 (diff)
downloadlinux-b9f5a89c74e541533766dcda55d34a06253f60f3.tar.xz
linux-b9f5a89c74e541533766dcda55d34a06253f60f3.zip
[ALSA] hda-codec - Fix LFE volume/switch
HDA Codec driver Fixed LFE volume/switch control. Signed-off-by: Nicolas Graziano <nicolas.graziano@wanadoo.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_codec.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index d3ac7530ec89..026ae726d875 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -749,12 +749,14 @@ int snd_hda_mixer_amp_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
long *valp = ucontrol->value.integer.value;
int change = 0;
- if (chs & 1)
+ if (chs & 1) {
change = snd_hda_codec_amp_update(codec, nid, 0, dir, idx,
0x7f, *valp);
+ valp++;
+ }
if (chs & 2)
change |= snd_hda_codec_amp_update(codec, nid, 1, dir, idx,
- 0x7f, valp[1]);
+ 0x7f, *valp);
return change;
}
@@ -796,12 +798,15 @@ int snd_hda_mixer_amp_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
long *valp = ucontrol->value.integer.value;
int change = 0;
- if (chs & 1)
+ if (chs & 1) {
change = snd_hda_codec_amp_update(codec, nid, 0, dir, idx,
0x80, *valp ? 0 : 0x80);
+ valp++;
+ }
if (chs & 2)
change |= snd_hda_codec_amp_update(codec, nid, 1, dir, idx,
- 0x80, valp[1] ? 0 : 0x80);
+ 0x80, *valp ? 0 : 0x80);
+
return change;
}