diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-02-20 10:36:52 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-02-20 11:06:04 -0500 |
commit | ba5338185dd522696f1c0d0957a724a1fdd1f39d (patch) | |
tree | fc5996b75379b0e2a5accacd56eaa0d82d1de62f /sound/pci/hda | |
parent | cf5a22793cfa54c056655d374722dc5dfd496eca (diff) |
ALSA: hda/realtek - Rewrite ALC880 model=F1734 with auto-parser
Similar as the previous patch for model=fujitsu, we can now move the
static quirk for F1734 to the auto-parser. The only difference is the
default pin configurations: F1734 has less pins than Amilo's.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/alc880_quirks.c | 85 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 24 |
2 files changed, 24 insertions, 85 deletions
diff --git a/sound/pci/hda/alc880_quirks.c b/sound/pci/hda/alc880_quirks.c index f062eaae6b1e..2ab7c3b9bb9b 100644 --- a/sound/pci/hda/alc880_quirks.c +++ b/sound/pci/hda/alc880_quirks.c | |||
@@ -13,7 +13,6 @@ enum { | |||
13 | ALC880_Z71V, | 13 | ALC880_Z71V, |
14 | ALC880_6ST, | 14 | ALC880_6ST, |
15 | ALC880_6ST_DIG, | 15 | ALC880_6ST_DIG, |
16 | ALC880_F1734, | ||
17 | ALC880_ASUS, | 16 | ALC880_ASUS, |
18 | ALC880_ASUS_DIG, | 17 | ALC880_ASUS_DIG, |
19 | ALC880_ASUS_W1V, | 18 | ALC880_ASUS_W1V, |
@@ -257,40 +256,6 @@ static const struct snd_kcontrol_new alc880_z71v_mixer[] = { | |||
257 | { } /* end */ | 256 | { } /* end */ |
258 | }; | 257 | }; |
259 | 258 | ||
260 | |||
261 | /* | ||
262 | * ALC880 F1734 model | ||
263 | * | ||
264 | * DAC: HP = 0x02 (0x0c), Front = 0x03 (0x0d) | ||
265 | * Pin assignment: HP = 0x14, Front = 0x15, Mic = 0x18 | ||
266 | */ | ||
267 | |||
268 | static const hda_nid_t alc880_f1734_dac_nids[1] = { | ||
269 | 0x03 | ||
270 | }; | ||
271 | #define ALC880_F1734_HP_DAC 0x02 | ||
272 | |||
273 | static const struct snd_kcontrol_new alc880_f1734_mixer[] = { | ||
274 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
275 | HDA_BIND_MUTE("Headphone Playback Switch", 0x0c, 2, HDA_INPUT), | ||
276 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | ||
277 | HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT), | ||
278 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
279 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
280 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
281 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
282 | { } /* end */ | ||
283 | }; | ||
284 | |||
285 | static const struct hda_input_mux alc880_f1734_capture_source = { | ||
286 | .num_items = 2, | ||
287 | .items = { | ||
288 | { "Mic", 0x1 }, | ||
289 | { "CD", 0x4 }, | ||
290 | }, | ||
291 | }; | ||
292 | |||
293 | |||
294 | /* | 259 | /* |
295 | * ALC880 ASUS model | 260 | * ALC880 ASUS model |
296 | * | 261 | * |
@@ -710,38 +675,6 @@ static void alc880_uniwill_p53_unsol_event(struct hda_codec *codec, | |||
710 | } | 675 | } |
711 | 676 | ||
712 | /* | 677 | /* |
713 | * F1734 pin configuration: | ||
714 | * HP = 0x14, speaker-out = 0x15, mic = 0x18 | ||
715 | */ | ||
716 | static const struct hda_verb alc880_pin_f1734_init_verbs[] = { | ||
717 | {0x07, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
718 | {0x10, AC_VERB_SET_CONNECT_SEL, 0x02}, | ||
719 | {0x11, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
720 | {0x12, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
721 | {0x13, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
722 | |||
723 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
724 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
725 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
726 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
727 | |||
728 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
729 | {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
730 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50}, | ||
731 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
732 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
733 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
734 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
735 | {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
736 | {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
737 | |||
738 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC_HP_EVENT}, | ||
739 | {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC_DCVOL_EVENT}, | ||
740 | |||
741 | { } | ||
742 | }; | ||
743 | |||
744 | /* | ||
745 | * ASUS pin configuration: | 678 | * ASUS pin configuration: |
746 | * HP/front = 0x14, surr = 0x15, clfe = 0x16, mic = 0x18, line = 0x1a | 679 | * HP/front = 0x14, surr = 0x15, clfe = 0x16, mic = 0x18, line = 0x1a |
747 | */ | 680 | */ |
@@ -1059,7 +992,6 @@ static const char * const alc880_models[ALC880_MODEL_LAST] = { | |||
1059 | [ALC880_ASUS_DIG2] = "asus-dig2", | 992 | [ALC880_ASUS_DIG2] = "asus-dig2", |
1060 | [ALC880_UNIWILL_DIG] = "uniwill", | 993 | [ALC880_UNIWILL_DIG] = "uniwill", |
1061 | [ALC880_UNIWILL_P53] = "uniwill-p53", | 994 | [ALC880_UNIWILL_P53] = "uniwill-p53", |
1062 | [ALC880_F1734] = "F1734", | ||
1063 | #ifdef CONFIG_SND_DEBUG | 995 | #ifdef CONFIG_SND_DEBUG |
1064 | [ALC880_TEST] = "test", | 996 | [ALC880_TEST] = "test", |
1065 | #endif | 997 | #endif |
@@ -1103,13 +1035,10 @@ static const struct snd_pci_quirk alc880_cfg_tbl[] = { | |||
1103 | SND_PCI_QUIRK(0x1558, 0x5401, "ASUS", ALC880_ASUS_DIG2), | 1035 | SND_PCI_QUIRK(0x1558, 0x5401, "ASUS", ALC880_ASUS_DIG2), |
1104 | SND_PCI_QUIRK(0x1565, 0x8202, "Biostar", ALC880_5ST_DIG), | 1036 | SND_PCI_QUIRK(0x1565, 0x8202, "Biostar", ALC880_5ST_DIG), |
1105 | SND_PCI_QUIRK(0x1584, 0x9050, "Uniwill", ALC880_UNIWILL_DIG), | 1037 | SND_PCI_QUIRK(0x1584, 0x9050, "Uniwill", ALC880_UNIWILL_DIG), |
1106 | SND_PCI_QUIRK(0x1584, 0x9054, "Uniwill", ALC880_F1734), | ||
1107 | SND_PCI_QUIRK(0x1584, 0x9070, "Uniwill", ALC880_UNIWILL), | 1038 | SND_PCI_QUIRK(0x1584, 0x9070, "Uniwill", ALC880_UNIWILL), |
1108 | SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_UNIWILL_P53), | 1039 | SND_PCI_QUIRK(0x1584, 0x9077, "Uniwill P53", ALC880_UNIWILL_P53), |
1109 | SND_PCI_QUIRK(0x1695, 0x400d, "EPoX", ALC880_5ST_DIG), | 1040 | SND_PCI_QUIRK(0x1695, 0x400d, "EPoX", ALC880_5ST_DIG), |
1110 | SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_5ST_DIG), | 1041 | SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_5ST_DIG), |
1111 | SND_PCI_QUIRK(0x1734, 0x107c, "FSC F1734", ALC880_F1734), | ||
1112 | SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_F1734), | ||
1113 | SND_PCI_QUIRK(0x2668, 0x8086, NULL, ALC880_6ST_DIG), /* broken BIOS */ | 1042 | SND_PCI_QUIRK(0x2668, 0x8086, NULL, ALC880_6ST_DIG), /* broken BIOS */ |
1114 | SND_PCI_QUIRK(0x8086, 0x2668, NULL, ALC880_6ST_DIG), | 1043 | SND_PCI_QUIRK(0x8086, 0x2668, NULL, ALC880_6ST_DIG), |
1115 | SND_PCI_QUIRK(0x8086, 0xa100, "Intel mobo", ALC880_5ST_DIG), | 1044 | SND_PCI_QUIRK(0x8086, 0xa100, "Intel mobo", ALC880_5ST_DIG), |
@@ -1212,20 +1141,6 @@ static const struct alc_config_preset alc880_presets[] = { | |||
1212 | .channel_mode = alc880_2_jack_modes, | 1141 | .channel_mode = alc880_2_jack_modes, |
1213 | .input_mux = &alc880_capture_source, | 1142 | .input_mux = &alc880_capture_source, |
1214 | }, | 1143 | }, |
1215 | [ALC880_F1734] = { | ||
1216 | .mixers = { alc880_f1734_mixer }, | ||
1217 | .init_verbs = { alc880_volume_init_verbs, | ||
1218 | alc880_pin_f1734_init_verbs }, | ||
1219 | .num_dacs = ARRAY_SIZE(alc880_f1734_dac_nids), | ||
1220 | .dac_nids = alc880_f1734_dac_nids, | ||
1221 | .hp_nid = 0x02, | ||
1222 | .num_channel_mode = ARRAY_SIZE(alc880_2_jack_modes), | ||
1223 | .channel_mode = alc880_2_jack_modes, | ||
1224 | .input_mux = &alc880_f1734_capture_source, | ||
1225 | .unsol_event = alc880_uniwill_p53_unsol_event, | ||
1226 | .setup = alc880_uniwill_p53_setup, | ||
1227 | .init_hook = alc_hp_automute, | ||
1228 | }, | ||
1229 | [ALC880_ASUS] = { | 1144 | [ALC880_ASUS] = { |
1230 | .mixers = { alc880_asus_mixer }, | 1145 | .mixers = { alc880_asus_mixer }, |
1231 | .init_verbs = { alc880_volume_init_verbs, | 1146 | .init_verbs = { alc880_volume_init_verbs, |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6a6436a54f07..2d102f70f787 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4446,6 +4446,7 @@ enum { | |||
4446 | ALC880_FIXUP_TCL_S700, | 4446 | ALC880_FIXUP_TCL_S700, |
4447 | ALC880_FIXUP_VOL_KNOB, | 4447 | ALC880_FIXUP_VOL_KNOB, |
4448 | ALC880_FIXUP_FUJITSU, | 4448 | ALC880_FIXUP_FUJITSU, |
4449 | ALC880_FIXUP_F1734, | ||
4449 | }; | 4450 | }; |
4450 | 4451 | ||
4451 | /* enable the volume-knob widget support on NID 0x21 */ | 4452 | /* enable the volume-knob widget support on NID 0x21 */ |
@@ -4535,14 +4536,37 @@ static const struct alc_fixup alc880_fixups[] = { | |||
4535 | .chained = true, | 4536 | .chained = true, |
4536 | .chain_id = ALC880_FIXUP_VOL_KNOB, | 4537 | .chain_id = ALC880_FIXUP_VOL_KNOB, |
4537 | }, | 4538 | }, |
4539 | [ALC880_FIXUP_F1734] = { | ||
4540 | /* almost compatible with FUJITSU, but no bass and SPDIF */ | ||
4541 | .type = ALC_FIXUP_PINS, | ||
4542 | .v.pins = (const struct alc_pincfg[]) { | ||
4543 | { 0x14, 0x0121411f }, /* HP */ | ||
4544 | { 0x15, 0x99030120 }, /* speaker */ | ||
4545 | { 0x16, 0x411111f0 }, /* N/A */ | ||
4546 | { 0x17, 0x411111f0 }, /* N/A */ | ||
4547 | { 0x18, 0x411111f0 }, /* N/A */ | ||
4548 | { 0x19, 0x01a19950 }, /* mic-in */ | ||
4549 | { 0x1a, 0x411111f0 }, /* N/A */ | ||
4550 | { 0x1b, 0x411111f0 }, /* N/A */ | ||
4551 | { 0x1c, 0x411111f0 }, /* N/A */ | ||
4552 | { 0x1d, 0x411111f0 }, /* N/A */ | ||
4553 | { 0x1e, 0x411111f0 }, /* N/A */ | ||
4554 | { } | ||
4555 | }, | ||
4556 | .chained = true, | ||
4557 | .chain_id = ALC880_FIXUP_VOL_KNOB, | ||
4558 | }, | ||
4538 | }; | 4559 | }; |
4539 | 4560 | ||
4540 | static const struct snd_pci_quirk alc880_fixup_tbl[] = { | 4561 | static const struct snd_pci_quirk alc880_fixup_tbl[] = { |
4541 | SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810), | 4562 | SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810), |
4542 | SND_PCI_QUIRK_VENDOR(0x1558, "Clevo", ALC880_FIXUP_EAPD_COEF), | 4563 | SND_PCI_QUIRK_VENDOR(0x1558, "Clevo", ALC880_FIXUP_EAPD_COEF), |
4564 | SND_PCI_QUIRK(0x1584, 0x9054, "Uniwill", ALC880_FIXUP_F1734), | ||
4543 | SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_FIXUP_W810), | 4565 | SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_FIXUP_W810), |
4544 | SND_PCI_QUIRK(0x161f, 0x205d, "Medion Rim 2150", ALC880_FIXUP_MEDION_RIM), | 4566 | SND_PCI_QUIRK(0x161f, 0x205d, "Medion Rim 2150", ALC880_FIXUP_MEDION_RIM), |
4567 | SND_PCI_QUIRK(0x1734, 0x107c, "FSC F1734", ALC880_FIXUP_F1734), | ||
4545 | SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FIXUP_FUJITSU), | 4568 | SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FIXUP_FUJITSU), |
4569 | SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_FIXUP_F1734), | ||
4546 | SND_PCI_QUIRK(0x1734, 0x10b0, "FSC Amilo Pi1556", ALC880_FIXUP_FUJITSU), | 4570 | SND_PCI_QUIRK(0x1734, 0x10b0, "FSC Amilo Pi1556", ALC880_FIXUP_FUJITSU), |
4547 | SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_FIXUP_LG), | 4571 | SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_FIXUP_LG), |
4548 | SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_FIXUP_LG), | 4572 | SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_FIXUP_LG), |