diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-11-15 08:46:25 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-11-15 08:46:25 -0500 |
commit | 19723079db3ef1769803e05293314461ba81dede (patch) | |
tree | 862426e891c25634044a19c5905e6806e2cd72e7 /sound | |
parent | ee3b29693cb56b36fa4913b9a573d6c233bb8f03 (diff) |
ALSA: hda/realtek - Move ALC880 model=lg-lw to auto-parser
ALC880 model=lg-lw works fine with the auto-parser as is.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/alc880_quirks.c | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/sound/pci/hda/alc880_quirks.c b/sound/pci/hda/alc880_quirks.c index dffa7a91ba6d..5b68435d195b 100644 --- a/sound/pci/hda/alc880_quirks.c +++ b/sound/pci/hda/alc880_quirks.c | |||
@@ -26,7 +26,6 @@ enum { | |||
26 | ALC880_CLEVO, | 26 | ALC880_CLEVO, |
27 | ALC880_TCL_S700, | 27 | ALC880_TCL_S700, |
28 | ALC880_LG, | 28 | ALC880_LG, |
29 | ALC880_LG_LW, | ||
30 | #ifdef CONFIG_SND_DEBUG | 29 | #ifdef CONFIG_SND_DEBUG |
31 | ALC880_TEST, | 30 | ALC880_TEST, |
32 | #endif | 31 | #endif |
@@ -1051,91 +1050,6 @@ static void alc880_lg_setup(struct hda_codec *codec) | |||
1051 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | 1050 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); |
1052 | } | 1051 | } |
1053 | 1052 | ||
1054 | /* | ||
1055 | * LG LW20 | ||
1056 | * | ||
1057 | * Pin assignment: | ||
1058 | * Speaker-out: 0x14 | ||
1059 | * Mic-In: 0x18 | ||
1060 | * Built-in Mic-In: 0x19 | ||
1061 | * Line-In: 0x1b | ||
1062 | * HP-Out: 0x1a | ||
1063 | * SPDIF-Out: 0x1e | ||
1064 | */ | ||
1065 | |||
1066 | static const struct hda_input_mux alc880_lg_lw_capture_source = { | ||
1067 | .num_items = 3, | ||
1068 | .items = { | ||
1069 | { "Mic", 0x0 }, | ||
1070 | { "Internal Mic", 0x1 }, | ||
1071 | { "Line In", 0x2 }, | ||
1072 | }, | ||
1073 | }; | ||
1074 | |||
1075 | #define alc880_lg_lw_modes alc880_threestack_modes | ||
1076 | |||
1077 | static const struct snd_kcontrol_new alc880_lg_lw_mixer[] = { | ||
1078 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
1079 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
1080 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | ||
1081 | HDA_BIND_MUTE("Surround Playback Switch", 0x0f, 2, HDA_INPUT), | ||
1082 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), | ||
1083 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | ||
1084 | HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), | ||
1085 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), | ||
1086 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
1087 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
1088 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
1089 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
1090 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | ||
1091 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | ||
1092 | { | ||
1093 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
1094 | .name = "Channel Mode", | ||
1095 | .info = alc_ch_mode_info, | ||
1096 | .get = alc_ch_mode_get, | ||
1097 | .put = alc_ch_mode_put, | ||
1098 | }, | ||
1099 | { } /* end */ | ||
1100 | }; | ||
1101 | |||
1102 | static const struct hda_verb alc880_lg_lw_init_verbs[] = { | ||
1103 | {0x13, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */ | ||
1104 | {0x10, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */ | ||
1105 | {0x12, AC_VERB_SET_CONNECT_SEL, 0x03}, /* line/surround */ | ||
1106 | |||
1107 | /* set capture source to mic-in */ | ||
1108 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1109 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1110 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1111 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)}, | ||
1112 | /* speaker-out */ | ||
1113 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
1114 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1115 | /* HP-out */ | ||
1116 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
1117 | {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1118 | /* mic-in to input */ | ||
1119 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
1120 | {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1121 | /* built-in mic */ | ||
1122 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
1123 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1124 | /* jack sense */ | ||
1125 | {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | ||
1126 | { } | ||
1127 | }; | ||
1128 | |||
1129 | /* toggle speaker-output according to the hp-jack state */ | ||
1130 | static void alc880_lg_lw_setup(struct hda_codec *codec) | ||
1131 | { | ||
1132 | struct alc_spec *spec = codec->spec; | ||
1133 | |||
1134 | spec->autocfg.hp_pins[0] = 0x1b; | ||
1135 | spec->autocfg.speaker_pins[0] = 0x14; | ||
1136 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | ||
1137 | } | ||
1138 | |||
1139 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 1053 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
1140 | static const struct hda_amp_list alc880_lg_loopbacks[] = { | 1054 | static const struct hda_amp_list alc880_lg_loopbacks[] = { |
1141 | { 0x0b, HDA_INPUT, 1 }, | 1055 | { 0x0b, HDA_INPUT, 1 }, |
@@ -1432,7 +1346,6 @@ static const char * const alc880_models[ALC880_MODEL_LAST] = { | |||
1432 | [ALC880_FUJITSU] = "fujitsu", | 1346 | [ALC880_FUJITSU] = "fujitsu", |
1433 | [ALC880_F1734] = "F1734", | 1347 | [ALC880_F1734] = "F1734", |
1434 | [ALC880_LG] = "lg", | 1348 | [ALC880_LG] = "lg", |
1435 | [ALC880_LG_LW] = "lg-lw", | ||
1436 | #ifdef CONFIG_SND_DEBUG | 1349 | #ifdef CONFIG_SND_DEBUG |
1437 | [ALC880_TEST] = "test", | 1350 | [ALC880_TEST] = "test", |
1438 | #endif | 1351 | #endif |
@@ -1489,11 +1402,9 @@ static const struct snd_pci_quirk alc880_cfg_tbl[] = { | |||
1489 | SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FUJITSU), | 1402 | SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FUJITSU), |
1490 | SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_F1734), | 1403 | SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_F1734), |
1491 | SND_PCI_QUIRK(0x1734, 0x10b0, "Fujitsu", ALC880_FUJITSU), | 1404 | SND_PCI_QUIRK(0x1734, 0x10b0, "Fujitsu", ALC880_FUJITSU), |
1492 | SND_PCI_QUIRK(0x1854, 0x0018, "LG LW20", ALC880_LG_LW), | ||
1493 | SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_LG), | 1405 | SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_LG), |
1494 | SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_LG), | 1406 | SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_LG), |
1495 | SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_LG), | 1407 | SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_LG), |
1496 | SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_LG_LW), | ||
1497 | SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_TCL_S700), | 1408 | SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_TCL_S700), |
1498 | SND_PCI_QUIRK(0x2668, 0x8086, NULL, ALC880_6ST_DIG), /* broken BIOS */ | 1409 | SND_PCI_QUIRK(0x2668, 0x8086, NULL, ALC880_6ST_DIG), /* broken BIOS */ |
1499 | SND_PCI_QUIRK(0x8086, 0x2668, NULL, ALC880_6ST_DIG), | 1410 | SND_PCI_QUIRK(0x8086, 0x2668, NULL, ALC880_6ST_DIG), |
@@ -1773,20 +1684,6 @@ static const struct alc_config_preset alc880_presets[] = { | |||
1773 | .loopbacks = alc880_lg_loopbacks, | 1684 | .loopbacks = alc880_lg_loopbacks, |
1774 | #endif | 1685 | #endif |
1775 | }, | 1686 | }, |
1776 | [ALC880_LG_LW] = { | ||
1777 | .mixers = { alc880_lg_lw_mixer }, | ||
1778 | .init_verbs = { alc880_volume_init_verbs, | ||
1779 | alc880_lg_lw_init_verbs }, | ||
1780 | .num_dacs = ARRAY_SIZE(alc880_dac_nids), | ||
1781 | .dac_nids = alc880_dac_nids, | ||
1782 | .dig_out_nid = ALC880_DIGOUT_NID, | ||
1783 | .num_channel_mode = ARRAY_SIZE(alc880_lg_lw_modes), | ||
1784 | .channel_mode = alc880_lg_lw_modes, | ||
1785 | .input_mux = &alc880_lg_lw_capture_source, | ||
1786 | .unsol_event = alc_sku_unsol_event, | ||
1787 | .setup = alc880_lg_lw_setup, | ||
1788 | .init_hook = alc_hp_automute, | ||
1789 | }, | ||
1790 | #ifdef CONFIG_SND_DEBUG | 1687 | #ifdef CONFIG_SND_DEBUG |
1791 | [ALC880_TEST] = { | 1688 | [ALC880_TEST] = { |
1792 | .mixers = { alc880_test_mixer }, | 1689 | .mixers = { alc880_test_mixer }, |