aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-04-18 17:03:56 -0400
committerJaroslav Kysela <perex@suse.cz>2007-05-11 10:56:07 -0400
commitfb956c16d92c6c8c8d30e938cce5c17cf737b646 (patch)
tree663a6c86a9d978661a57865e79852fc1d9c6c7c5
parent43a23389003f92cc26a84a680008330e094db38d (diff)
[ALSA] hda-codec - Fix surround output on AD1986A
Fix surround output on AD1986A codec 3stack model. The following bugs are fixed: - init verbs for 3stack disabled the shared surround outputs - a channel mode change resulted in the mute of surrounds Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r--sound/pci/hda/patch_analog.c40
1 files changed, 16 insertions, 24 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index fa194f21282f..26540972ee78 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -751,42 +751,35 @@ static struct hda_verb ad1986a_init_verbs[] = {
751 { } /* end */ 751 { } /* end */
752}; 752};
753 753
754/* additional verbs for 3-stack model */
755static struct hda_verb ad1986a_3st_init_verbs[] = {
756 /* Mic selector, mix C/LFE (backmic) and Mic (frontmic) */
757 {0x0f, AC_VERB_SET_CONNECT_SEL, 0x4},
758 /* Line-in selectors */
759 {0x10, AC_VERB_SET_CONNECT_SEL, 0x1},
760 { } /* end */
761};
762
763static struct hda_verb ad1986a_ch2_init[] = { 754static struct hda_verb ad1986a_ch2_init[] = {
764 /* Surround out -> Line In */ 755 /* Surround out -> Line In */
765 { 0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, 756 { 0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
766 { 0x1c, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 757 /* Line-in selectors */
758 { 0x10, AC_VERB_SET_CONNECT_SEL, 0x1 },
767 /* CLFE -> Mic in */ 759 /* CLFE -> Mic in */
768 { 0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, 760 { 0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
769 { 0x1d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 761 /* Mic selector, mix C/LFE (backmic) and Mic (frontmic) */
762 { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x4 },
770 { } /* end */ 763 { } /* end */
771}; 764};
772 765
773static struct hda_verb ad1986a_ch4_init[] = { 766static struct hda_verb ad1986a_ch4_init[] = {
774 /* Surround out -> Surround */ 767 /* Surround out -> Surround */
775 { 0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, 768 { 0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
776 { 0x1c, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 769 { 0x10, AC_VERB_SET_CONNECT_SEL, 0x0 },
777 /* CLFE -> Mic in */ 770 /* CLFE -> Mic in */
778 { 0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, 771 { 0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
779 { 0x1d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, 772 { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x4 },
780 { } /* end */ 773 { } /* end */
781}; 774};
782 775
783static struct hda_verb ad1986a_ch6_init[] = { 776static struct hda_verb ad1986a_ch6_init[] = {
784 /* Surround out -> Surround out */ 777 /* Surround out -> Surround out */
785 { 0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, 778 { 0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
786 { 0x1c, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 779 { 0x10, AC_VERB_SET_CONNECT_SEL, 0x0 },
787 /* CLFE -> CLFE */ 780 /* CLFE -> CLFE */
788 { 0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, 781 { 0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
789 { 0x1d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, 782 { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x0 },
790 { } /* end */ 783 { } /* end */
791}; 784};
792 785
@@ -895,9 +888,8 @@ static int patch_ad1986a(struct hda_codec *codec)
895 case AD1986A_3STACK: 888 case AD1986A_3STACK:
896 spec->num_mixers = 2; 889 spec->num_mixers = 2;
897 spec->mixers[1] = ad1986a_3st_mixers; 890 spec->mixers[1] = ad1986a_3st_mixers;
898 spec->num_init_verbs = 3; 891 spec->num_init_verbs = 2;
899 spec->init_verbs[1] = ad1986a_3st_init_verbs; 892 spec->init_verbs[1] = ad1986a_ch2_init;
900 spec->init_verbs[2] = ad1986a_ch2_init;
901 spec->channel_mode = ad1986a_modes; 893 spec->channel_mode = ad1986a_modes;
902 spec->num_channel_mode = ARRAY_SIZE(ad1986a_modes); 894 spec->num_channel_mode = ARRAY_SIZE(ad1986a_modes);
903 spec->need_dac_fix = 1; 895 spec->need_dac_fix = 1;