diff options
author | Lydia Wang <lydiawang@viatech.com.cn> | 2011-03-24 00:39:05 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-03-24 02:45:33 -0400 |
commit | e87885fea58ef49e08f2b4218587397586dc155d (patch) | |
tree | 3d68323cc2254a3e5ff0fcb234b920659fb38634 /sound/pci/hda/patch_via.c | |
parent | 11890956e948e6ed1b3e4acc11b6879db6ace01b (diff) |
ALSA: hda - VIA: Fix side channel mute invalid issue
Modify side_mute_channel() and update_side_mute_status() functions
to fix invalid side channel mute issue of VT2002P, VT1812 and VT1802
codecs.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_via.c')
-rw-r--r-- | sound/pci/hda/patch_via.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 74e2a2482815..c90b23b5cf7c 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -708,6 +708,9 @@ static hda_nid_t side_mute_channel(struct via_spec *spec) | |||
708 | case VT1709_10CH: return 0x29; | 708 | case VT1709_10CH: return 0x29; |
709 | case VT1708B_8CH: /* fall thru */ | 709 | case VT1708B_8CH: /* fall thru */ |
710 | case VT1708S: return 0x27; | 710 | case VT1708S: return 0x27; |
711 | case VT2002P: return 0x19; | ||
712 | case VT1802: return 0x15; | ||
713 | case VT1812: return 0x15; | ||
711 | default: return 0; | 714 | default: return 0; |
712 | } | 715 | } |
713 | } | 716 | } |
@@ -716,13 +719,22 @@ static int update_side_mute_status(struct hda_codec *codec) | |||
716 | { | 719 | { |
717 | /* mute side channel */ | 720 | /* mute side channel */ |
718 | struct via_spec *spec = codec->spec; | 721 | struct via_spec *spec = codec->spec; |
719 | unsigned int parm = spec->hp_independent_mode | 722 | unsigned int parm; |
720 | ? AMP_OUT_MUTE : AMP_OUT_UNMUTE; | ||
721 | hda_nid_t sw3 = side_mute_channel(spec); | 723 | hda_nid_t sw3 = side_mute_channel(spec); |
722 | 724 | ||
723 | if (sw3) | 725 | if (sw3) { |
724 | snd_hda_codec_write(codec, sw3, 0, AC_VERB_SET_AMP_GAIN_MUTE, | 726 | if (VT2002P_COMPATIBLE(spec)) |
725 | parm); | 727 | parm = spec->hp_independent_mode ? |
728 | AMP_IN_MUTE(1) : AMP_IN_UNMUTE(1); | ||
729 | else | ||
730 | parm = spec->hp_independent_mode ? | ||
731 | AMP_OUT_MUTE : AMP_OUT_UNMUTE; | ||
732 | snd_hda_codec_write(codec, sw3, 0, | ||
733 | AC_VERB_SET_AMP_GAIN_MUTE, parm); | ||
734 | if (spec->codec_type == VT1812) | ||
735 | snd_hda_codec_write(codec, 0x1d, 0, | ||
736 | AC_VERB_SET_AMP_GAIN_MUTE, parm); | ||
737 | } | ||
726 | return 0; | 738 | return 0; |
727 | } | 739 | } |
728 | 740 | ||