diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-11-07 11:59:13 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-11-08 02:59:37 -0500 |
commit | 5c0ebfbe56795cce558736e0023ebb85b9f753c6 (patch) | |
tree | e405b2be3f56879c6098d0cd5a835174479a8f48 /sound/pci/hda | |
parent | 42399f7a71df817a0aab82dd88dc05521c88385b (diff) |
ALSA: hda/realtek - Rewrite ALC882 model=vaio-tt with auto-parser
Providing a pincfg fix for VAIO-TT with ALC889 codec to work with the
auto-parser, and drop the static configuration.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/alc882_quirks.c | 46 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 39 |
2 files changed, 24 insertions, 61 deletions
diff --git a/sound/pci/hda/alc882_quirks.c b/sound/pci/hda/alc882_quirks.c index e251514a26a4..59c556d5203e 100644 --- a/sound/pci/hda/alc882_quirks.c +++ b/sound/pci/hda/alc882_quirks.c | |||
@@ -55,7 +55,6 @@ enum { | |||
55 | ALC888_ASUS_EEE1601, | 55 | ALC888_ASUS_EEE1601, |
56 | ALC889A_MB31, | 56 | ALC889A_MB31, |
57 | ALC1200_ASUS_P5Q, | 57 | ALC1200_ASUS_P5Q, |
58 | ALC883_SONY_VAIO_TT, | ||
59 | ALC882_MODEL_LAST, | 58 | ALC882_MODEL_LAST, |
60 | }; | 59 | }; |
61 | 60 | ||
@@ -2255,16 +2254,6 @@ static const struct snd_kcontrol_new alc889A_mb31_mixer[] = { | |||
2255 | { } /* end */ | 2254 | { } /* end */ |
2256 | }; | 2255 | }; |
2257 | 2256 | ||
2258 | static const struct snd_kcontrol_new alc883_vaiott_mixer[] = { | ||
2259 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
2260 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
2261 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
2262 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
2263 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
2264 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
2265 | { } /* end */ | ||
2266 | }; | ||
2267 | |||
2268 | static const struct hda_bind_ctls alc883_bind_cap_vol = { | 2257 | static const struct hda_bind_ctls alc883_bind_cap_vol = { |
2269 | .ops = &snd_hda_bind_vol, | 2258 | .ops = &snd_hda_bind_vol, |
2270 | .values = { | 2259 | .values = { |
@@ -2475,17 +2464,6 @@ static const struct hda_verb alc888_6st_dell_verbs[] = { | |||
2475 | { } | 2464 | { } |
2476 | }; | 2465 | }; |
2477 | 2466 | ||
2478 | static const struct hda_verb alc883_vaiott_verbs[] = { | ||
2479 | /* HP */ | ||
2480 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
2481 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
2482 | |||
2483 | /* enable unsolicited event */ | ||
2484 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN}, | ||
2485 | |||
2486 | { } /* end */ | ||
2487 | }; | ||
2488 | |||
2489 | static void alc888_3st_hp_setup(struct hda_codec *codec) | 2467 | static void alc888_3st_hp_setup(struct hda_codec *codec) |
2490 | { | 2468 | { |
2491 | struct alc_spec *spec = codec->spec; | 2469 | struct alc_spec *spec = codec->spec; |
@@ -2682,16 +2660,6 @@ static void alc888_lenovo_sky_setup(struct hda_codec *codec) | |||
2682 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | 2660 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); |
2683 | } | 2661 | } |
2684 | 2662 | ||
2685 | static void alc883_vaiott_setup(struct hda_codec *codec) | ||
2686 | { | ||
2687 | struct alc_spec *spec = codec->spec; | ||
2688 | |||
2689 | spec->autocfg.hp_pins[0] = 0x15; | ||
2690 | spec->autocfg.speaker_pins[0] = 0x14; | ||
2691 | spec->autocfg.speaker_pins[1] = 0x17; | ||
2692 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | ||
2693 | } | ||
2694 | |||
2695 | static const struct hda_verb alc888_asus_m90v_verbs[] = { | 2663 | static const struct hda_verb alc888_asus_m90v_verbs[] = { |
2696 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | 2664 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, |
2697 | {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | 2665 | {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, |
@@ -2832,7 +2800,6 @@ static const char * const alc882_models[ALC882_MODEL_LAST] = { | |||
2832 | [ALC889_INTEL] = "intel-x58", | 2800 | [ALC889_INTEL] = "intel-x58", |
2833 | [ALC1200_ASUS_P5Q] = "asus-p5q", | 2801 | [ALC1200_ASUS_P5Q] = "asus-p5q", |
2834 | [ALC889A_MB31] = "mb31", | 2802 | [ALC889A_MB31] = "mb31", |
2835 | [ALC883_SONY_VAIO_TT] = "sony-vaio-tt", | ||
2836 | [ALC882_AUTO] = "auto", | 2803 | [ALC882_AUTO] = "auto", |
2837 | }; | 2804 | }; |
2838 | 2805 | ||
@@ -2887,7 +2854,6 @@ static const struct snd_pci_quirk alc882_cfg_tbl[] = { | |||
2887 | SND_PCI_QUIRK(0x1043, 0x82fe, "Asus P5Q-EM HDMI", ALC1200_ASUS_P5Q), | 2854 | SND_PCI_QUIRK(0x1043, 0x82fe, "Asus P5Q-EM HDMI", ALC1200_ASUS_P5Q), |
2888 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), | 2855 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), |
2889 | 2856 | ||
2890 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC883_SONY_VAIO_TT), | ||
2891 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), | 2857 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), |
2892 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG), | 2858 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG), |
2893 | SND_PCI_QUIRK(0x1071, 0x8227, "Mitac 82801H", ALC883_MITAC), | 2859 | SND_PCI_QUIRK(0x1071, 0x8227, "Mitac 82801H", ALC883_MITAC), |
@@ -3711,18 +3677,6 @@ static const struct alc_config_preset alc882_presets[] = { | |||
3711 | .unsol_event = alc889A_mb31_unsol_event, | 3677 | .unsol_event = alc889A_mb31_unsol_event, |
3712 | .init_hook = alc889A_mb31_automute, | 3678 | .init_hook = alc889A_mb31_automute, |
3713 | }, | 3679 | }, |
3714 | [ALC883_SONY_VAIO_TT] = { | ||
3715 | .mixers = { alc883_vaiott_mixer }, | ||
3716 | .init_verbs = { alc883_init_verbs, alc883_vaiott_verbs }, | ||
3717 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
3718 | .dac_nids = alc883_dac_nids, | ||
3719 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), | ||
3720 | .channel_mode = alc883_3ST_2ch_modes, | ||
3721 | .input_mux = &alc883_capture_source, | ||
3722 | .unsol_event = alc_sku_unsol_event, | ||
3723 | .setup = alc883_vaiott_setup, | ||
3724 | .init_hook = alc_hp_automute, | ||
3725 | }, | ||
3726 | }; | 3680 | }; |
3727 | 3681 | ||
3728 | 3682 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index afdecd86e9a9..959bda35f0c9 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4214,15 +4214,16 @@ static int patch_alc260(struct hda_codec *codec) | |||
4214 | * Pin config fixes | 4214 | * Pin config fixes |
4215 | */ | 4215 | */ |
4216 | enum { | 4216 | enum { |
4217 | PINFIX_ABIT_AW9D_MAX, | 4217 | ALC882_FIXUP_ABIT_AW9D_MAX, |
4218 | PINFIX_LENOVO_Y530, | 4218 | ALC882_FIXUP_LENOVO_Y530, |
4219 | PINFIX_PB_M5210, | 4219 | ALC882_FIXUP_PB_M5210, |
4220 | PINFIX_ACER_ASPIRE_7736, | 4220 | ALC882_FIXUP_ACER_ASPIRE_7736, |
4221 | PINFIX_ASUS_W90V, | 4221 | ALC882_FIXUP_ASUS_W90V, |
4222 | ALC889_FIXUP_VAIO_TT, | ||
4222 | }; | 4223 | }; |
4223 | 4224 | ||
4224 | static const struct alc_fixup alc882_fixups[] = { | 4225 | static const struct alc_fixup alc882_fixups[] = { |
4225 | [PINFIX_ABIT_AW9D_MAX] = { | 4226 | [ALC882_FIXUP_ABIT_AW9D_MAX] = { |
4226 | .type = ALC_FIXUP_PINS, | 4227 | .type = ALC_FIXUP_PINS, |
4227 | .v.pins = (const struct alc_pincfg[]) { | 4228 | .v.pins = (const struct alc_pincfg[]) { |
4228 | { 0x15, 0x01080104 }, /* side */ | 4229 | { 0x15, 0x01080104 }, /* side */ |
@@ -4231,7 +4232,7 @@ static const struct alc_fixup alc882_fixups[] = { | |||
4231 | { } | 4232 | { } |
4232 | } | 4233 | } |
4233 | }, | 4234 | }, |
4234 | [PINFIX_LENOVO_Y530] = { | 4235 | [ALC882_FIXUP_LENOVO_Y530] = { |
4235 | .type = ALC_FIXUP_PINS, | 4236 | .type = ALC_FIXUP_PINS, |
4236 | .v.pins = (const struct alc_pincfg[]) { | 4237 | .v.pins = (const struct alc_pincfg[]) { |
4237 | { 0x15, 0x99130112 }, /* rear int speakers */ | 4238 | { 0x15, 0x99130112 }, /* rear int speakers */ |
@@ -4239,32 +4240,40 @@ static const struct alc_fixup alc882_fixups[] = { | |||
4239 | { } | 4240 | { } |
4240 | } | 4241 | } |
4241 | }, | 4242 | }, |
4242 | [PINFIX_PB_M5210] = { | 4243 | [ALC882_FIXUP_PB_M5210] = { |
4243 | .type = ALC_FIXUP_VERBS, | 4244 | .type = ALC_FIXUP_VERBS, |
4244 | .v.verbs = (const struct hda_verb[]) { | 4245 | .v.verbs = (const struct hda_verb[]) { |
4245 | { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50 }, | 4246 | { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50 }, |
4246 | {} | 4247 | {} |
4247 | } | 4248 | } |
4248 | }, | 4249 | }, |
4249 | [PINFIX_ACER_ASPIRE_7736] = { | 4250 | [ALC882_FIXUP_ACER_ASPIRE_7736] = { |
4250 | .type = ALC_FIXUP_SKU, | 4251 | .type = ALC_FIXUP_SKU, |
4251 | .v.sku = ALC_FIXUP_SKU_IGNORE, | 4252 | .v.sku = ALC_FIXUP_SKU_IGNORE, |
4252 | }, | 4253 | }, |
4253 | [PINFIX_ASUS_W90V] = { | 4254 | [ALC882_FIXUP_ASUS_W90V] = { |
4254 | .type = ALC_FIXUP_PINS, | 4255 | .type = ALC_FIXUP_PINS, |
4255 | .v.pins = (const struct alc_pincfg[]) { | 4256 | .v.pins = (const struct alc_pincfg[]) { |
4256 | { 0x16, 0x99130110 }, /* fix sequence for CLFE */ | 4257 | { 0x16, 0x99130110 }, /* fix sequence for CLFE */ |
4257 | { } | 4258 | { } |
4258 | } | 4259 | } |
4259 | }, | 4260 | }, |
4261 | [ALC889_FIXUP_VAIO_TT] = { | ||
4262 | .type = ALC_FIXUP_PINS, | ||
4263 | .v.pins = (const struct alc_pincfg[]) { | ||
4264 | { 0x17, 0x90170111 }, /* hidden surround speaker */ | ||
4265 | { } | ||
4266 | } | ||
4267 | }, | ||
4260 | }; | 4268 | }; |
4261 | 4269 | ||
4262 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { | 4270 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { |
4263 | SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", PINFIX_PB_M5210), | 4271 | SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210), |
4264 | SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", PINFIX_ASUS_W90V), | 4272 | SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V), |
4265 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", PINFIX_LENOVO_Y530), | 4273 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530), |
4266 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", PINFIX_ABIT_AW9D_MAX), | 4274 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), |
4267 | SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", PINFIX_ACER_ASPIRE_7736), | 4275 | SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736), |
4276 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), | ||
4268 | {} | 4277 | {} |
4269 | }; | 4278 | }; |
4270 | 4279 | ||