diff options
author | Nicolas Graziano <nicolas.graziano@wanadoo.fr> | 2005-07-29 06:17:20 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-08-30 02:43:15 -0400 |
commit | b9f5a89c74e541533766dcda55d34a06253f60f3 (patch) | |
tree | c6368abb5f77f63663911fb4edc769e18de658e6 /sound/pci/hda | |
parent | d827560c96346e0b8b02c1000cc347d73488c818 (diff) |
[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.c | 13 |
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 | |||
749 | long *valp = ucontrol->value.integer.value; | 749 | long *valp = ucontrol->value.integer.value; |
750 | int change = 0; | 750 | int change = 0; |
751 | 751 | ||
752 | if (chs & 1) | 752 | if (chs & 1) { |
753 | change = snd_hda_codec_amp_update(codec, nid, 0, dir, idx, | 753 | change = snd_hda_codec_amp_update(codec, nid, 0, dir, idx, |
754 | 0x7f, *valp); | 754 | 0x7f, *valp); |
755 | valp++; | ||
756 | } | ||
755 | if (chs & 2) | 757 | if (chs & 2) |
756 | change |= snd_hda_codec_amp_update(codec, nid, 1, dir, idx, | 758 | change |= snd_hda_codec_amp_update(codec, nid, 1, dir, idx, |
757 | 0x7f, valp[1]); | 759 | 0x7f, *valp); |
758 | return change; | 760 | return change; |
759 | } | 761 | } |
760 | 762 | ||
@@ -796,12 +798,15 @@ int snd_hda_mixer_amp_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t | |||
796 | long *valp = ucontrol->value.integer.value; | 798 | long *valp = ucontrol->value.integer.value; |
797 | int change = 0; | 799 | int change = 0; |
798 | 800 | ||
799 | if (chs & 1) | 801 | if (chs & 1) { |
800 | change = snd_hda_codec_amp_update(codec, nid, 0, dir, idx, | 802 | change = snd_hda_codec_amp_update(codec, nid, 0, dir, idx, |
801 | 0x80, *valp ? 0 : 0x80); | 803 | 0x80, *valp ? 0 : 0x80); |
804 | valp++; | ||
805 | } | ||
802 | if (chs & 2) | 806 | if (chs & 2) |
803 | change |= snd_hda_codec_amp_update(codec, nid, 1, dir, idx, | 807 | change |= snd_hda_codec_amp_update(codec, nid, 1, dir, idx, |
804 | 0x80, valp[1] ? 0 : 0x80); | 808 | 0x80, *valp ? 0 : 0x80); |
809 | |||
805 | return change; | 810 | return change; |
806 | } | 811 | } |
807 | 812 | ||