diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-02-17 10:18:59 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-02-17 10:18:59 -0500 |
commit | dc6af52dea5ada1269095cad5ed2c04e92114399 (patch) | |
tree | 245bf74e6e391a429962b2e689dbed99754ce5ae /sound/pci/hda/alc880_quirks.c | |
parent | 276dd70baebe6334e603227c064a9beb07cb4e9e (diff) |
ALSA: hda/realtek - Rewrite ALC880 model=lg with the auto-parser
ALC880 model=lg could work fine with the auto-parser due to the recent
rewrite, but it still needs the manual adjustment; namely, the BIOS leaves
unused pins as some real active jacks. This confuses the parser.
Thus we just cover these pins and override the pin-configs as a fix-up.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/alc880_quirks.c')
-rw-r--r-- | sound/pci/hda/alc880_quirks.c | 158 |
1 files changed, 0 insertions, 158 deletions
diff --git a/sound/pci/hda/alc880_quirks.c b/sound/pci/hda/alc880_quirks.c index 501501ef36a9..3b88bc561e16 100644 --- a/sound/pci/hda/alc880_quirks.c +++ b/sound/pci/hda/alc880_quirks.c | |||
@@ -25,7 +25,6 @@ enum { | |||
25 | ALC880_UNIWILL_P53, | 25 | ALC880_UNIWILL_P53, |
26 | ALC880_CLEVO, | 26 | ALC880_CLEVO, |
27 | ALC880_TCL_S700, | 27 | ALC880_TCL_S700, |
28 | ALC880_LG, | ||
29 | #ifdef CONFIG_SND_DEBUG | 28 | #ifdef CONFIG_SND_DEBUG |
30 | ALC880_TEST, | 29 | ALC880_TEST, |
31 | #endif | 30 | #endif |
@@ -773,11 +772,6 @@ static void alc880_uniwill_unsol_event(struct hda_codec *codec, | |||
773 | } | 772 | } |
774 | } | 773 | } |
775 | 774 | ||
776 | static void alc880_unsol_event(struct hda_codec *codec, unsigned int res) | ||
777 | { | ||
778 | alc_exec_unsol_event(codec, res >> 28); | ||
779 | } | ||
780 | |||
781 | static void alc880_uniwill_p53_setup(struct hda_codec *codec) | 775 | static void alc880_uniwill_p53_setup(struct hda_codec *codec) |
782 | { | 776 | { |
783 | struct alc_spec *spec = codec->spec; | 777 | struct alc_spec *spec = codec->spec; |
@@ -937,136 +931,6 @@ static const struct hda_verb alc880_pin_tcl_S700_init_verbs[] = { | |||
937 | }; | 931 | }; |
938 | 932 | ||
939 | /* | 933 | /* |
940 | * LG m1 express dual | ||
941 | * | ||
942 | * Pin assignment: | ||
943 | * Rear Line-In/Out (blue): 0x14 | ||
944 | * Build-in Mic-In: 0x15 | ||
945 | * Speaker-out: 0x17 | ||
946 | * HP-Out (green): 0x1b | ||
947 | * Mic-In/Out (red): 0x19 | ||
948 | * SPDIF-Out: 0x1e | ||
949 | */ | ||
950 | |||
951 | /* To make 5.1 output working (green=Front, blue=Surr, red=CLFE) */ | ||
952 | static const hda_nid_t alc880_lg_dac_nids[3] = { | ||
953 | 0x05, 0x02, 0x03 | ||
954 | }; | ||
955 | |||
956 | /* seems analog CD is not working */ | ||
957 | static const struct hda_input_mux alc880_lg_capture_source = { | ||
958 | .num_items = 3, | ||
959 | .items = { | ||
960 | { "Mic", 0x1 }, | ||
961 | { "Line", 0x5 }, | ||
962 | { "Internal Mic", 0x6 }, | ||
963 | }, | ||
964 | }; | ||
965 | |||
966 | /* 2,4,6 channel modes */ | ||
967 | static const struct hda_verb alc880_lg_ch2_init[] = { | ||
968 | /* set line-in and mic-in to input */ | ||
969 | { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, | ||
970 | { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
971 | { } | ||
972 | }; | ||
973 | |||
974 | static const struct hda_verb alc880_lg_ch4_init[] = { | ||
975 | /* set line-in to out and mic-in to input */ | ||
976 | { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, | ||
977 | { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
978 | { } | ||
979 | }; | ||
980 | |||
981 | static const struct hda_verb alc880_lg_ch6_init[] = { | ||
982 | /* set line-in and mic-in to output */ | ||
983 | { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, | ||
984 | { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, | ||
985 | { } | ||
986 | }; | ||
987 | |||
988 | static const struct hda_channel_mode alc880_lg_ch_modes[3] = { | ||
989 | { 2, alc880_lg_ch2_init }, | ||
990 | { 4, alc880_lg_ch4_init }, | ||
991 | { 6, alc880_lg_ch6_init }, | ||
992 | }; | ||
993 | |||
994 | static const struct snd_kcontrol_new alc880_lg_mixer[] = { | ||
995 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | ||
996 | HDA_BIND_MUTE("Front Playback Switch", 0x0f, 2, HDA_INPUT), | ||
997 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
998 | HDA_BIND_MUTE("Surround Playback Switch", 0x0c, 2, HDA_INPUT), | ||
999 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0d, 1, 0x0, HDA_OUTPUT), | ||
1000 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0d, 2, 0x0, HDA_OUTPUT), | ||
1001 | HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0d, 1, 2, HDA_INPUT), | ||
1002 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0d, 2, 2, HDA_INPUT), | ||
1003 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
1004 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
1005 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x06, HDA_INPUT), | ||
1006 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x06, HDA_INPUT), | ||
1007 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x07, HDA_INPUT), | ||
1008 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x07, HDA_INPUT), | ||
1009 | { | ||
1010 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
1011 | .name = "Channel Mode", | ||
1012 | .info = alc_ch_mode_info, | ||
1013 | .get = alc_ch_mode_get, | ||
1014 | .put = alc_ch_mode_put, | ||
1015 | }, | ||
1016 | { } /* end */ | ||
1017 | }; | ||
1018 | |||
1019 | static const struct hda_verb alc880_lg_init_verbs[] = { | ||
1020 | /* set capture source to mic-in */ | ||
1021 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
1022 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
1023 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
1024 | /* mute all amp mixer inputs */ | ||
1025 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(5)}, | ||
1026 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)}, | ||
1027 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)}, | ||
1028 | /* line-in to input */ | ||
1029 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
1030 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1031 | /* built-in mic */ | ||
1032 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
1033 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1034 | /* speaker-out */ | ||
1035 | {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
1036 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1037 | /* mic-in to input */ | ||
1038 | {0x11, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
1039 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
1040 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1041 | /* HP-out */ | ||
1042 | {0x13, AC_VERB_SET_CONNECT_SEL, 0x03}, | ||
1043 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
1044 | {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1045 | /* jack sense */ | ||
1046 | {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | ||
1047 | { } | ||
1048 | }; | ||
1049 | |||
1050 | /* toggle speaker-output according to the hp-jack state */ | ||
1051 | static void alc880_lg_setup(struct hda_codec *codec) | ||
1052 | { | ||
1053 | struct alc_spec *spec = codec->spec; | ||
1054 | |||
1055 | spec->autocfg.hp_pins[0] = 0x1b; | ||
1056 | spec->autocfg.speaker_pins[0] = 0x17; | ||
1057 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | ||
1058 | } | ||
1059 | |||
1060 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
1061 | static const struct hda_amp_list alc880_lg_loopbacks[] = { | ||
1062 | { 0x0b, HDA_INPUT, 1 }, | ||
1063 | { 0x0b, HDA_INPUT, 6 }, | ||
1064 | { 0x0b, HDA_INPUT, 7 }, | ||
1065 | { } /* end */ | ||
1066 | }; | ||
1067 | #endif | ||
1068 | |||
1069 | /* | ||
1070 | * Test configuration for debugging | 934 | * Test configuration for debugging |
1071 | * | 935 | * |
1072 | * Almost all inputs/outputs are enabled. I/O pins can be configured via | 936 | * Almost all inputs/outputs are enabled. I/O pins can be configured via |
@@ -1352,7 +1216,6 @@ static const char * const alc880_models[ALC880_MODEL_LAST] = { | |||
1352 | [ALC880_UNIWILL_P53] = "uniwill-p53", | 1216 | [ALC880_UNIWILL_P53] = "uniwill-p53", |
1353 | [ALC880_FUJITSU] = "fujitsu", | 1217 | [ALC880_FUJITSU] = "fujitsu", |
1354 | [ALC880_F1734] = "F1734", | 1218 | [ALC880_F1734] = "F1734", |
1355 | [ALC880_LG] = "lg", | ||
1356 | #ifdef CONFIG_SND_DEBUG | 1219 | #ifdef CONFIG_SND_DEBUG |
1357 | [ALC880_TEST] = "test", | 1220 | [ALC880_TEST] = "test", |
1358 | #endif | 1221 | #endif |
@@ -1409,9 +1272,6 @@ static const struct snd_pci_quirk alc880_cfg_tbl[] = { | |||
1409 | SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FUJITSU), | 1272 | SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FUJITSU), |
1410 | SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_F1734), | 1273 | SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_F1734), |
1411 | SND_PCI_QUIRK(0x1734, 0x10b0, "Fujitsu", ALC880_FUJITSU), | 1274 | SND_PCI_QUIRK(0x1734, 0x10b0, "Fujitsu", ALC880_FUJITSU), |
1412 | SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_LG), | ||
1413 | SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_LG), | ||
1414 | SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_LG), | ||
1415 | SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_TCL_S700), | 1275 | SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_TCL_S700), |
1416 | SND_PCI_QUIRK(0x2668, 0x8086, NULL, ALC880_6ST_DIG), /* broken BIOS */ | 1276 | SND_PCI_QUIRK(0x2668, 0x8086, NULL, ALC880_6ST_DIG), /* broken BIOS */ |
1417 | SND_PCI_QUIRK(0x8086, 0x2668, NULL, ALC880_6ST_DIG), | 1277 | SND_PCI_QUIRK(0x8086, 0x2668, NULL, ALC880_6ST_DIG), |
@@ -1673,24 +1533,6 @@ static const struct alc_config_preset alc880_presets[] = { | |||
1673 | .need_dac_fix = 1, | 1533 | .need_dac_fix = 1, |
1674 | .input_mux = &alc880_capture_source, | 1534 | .input_mux = &alc880_capture_source, |
1675 | }, | 1535 | }, |
1676 | [ALC880_LG] = { | ||
1677 | .mixers = { alc880_lg_mixer }, | ||
1678 | .init_verbs = { alc880_volume_init_verbs, | ||
1679 | alc880_lg_init_verbs }, | ||
1680 | .num_dacs = ARRAY_SIZE(alc880_lg_dac_nids), | ||
1681 | .dac_nids = alc880_lg_dac_nids, | ||
1682 | .dig_out_nid = ALC880_DIGOUT_NID, | ||
1683 | .num_channel_mode = ARRAY_SIZE(alc880_lg_ch_modes), | ||
1684 | .channel_mode = alc880_lg_ch_modes, | ||
1685 | .need_dac_fix = 1, | ||
1686 | .input_mux = &alc880_lg_capture_source, | ||
1687 | .unsol_event = alc880_unsol_event, | ||
1688 | .setup = alc880_lg_setup, | ||
1689 | .init_hook = alc_hp_automute, | ||
1690 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
1691 | .loopbacks = alc880_lg_loopbacks, | ||
1692 | #endif | ||
1693 | }, | ||
1694 | #ifdef CONFIG_SND_DEBUG | 1536 | #ifdef CONFIG_SND_DEBUG |
1695 | [ALC880_TEST] = { | 1537 | [ALC880_TEST] = { |
1696 | .mixers = { alc880_test_mixer }, | 1538 | .mixers = { alc880_test_mixer }, |