Commit ea4e7af1 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda/realtek - Convert alc262 model=tyan to a fixup-list

Use the auto-parser for ALC262 model=tyan with a pin-config fix-up and
drop the static configuration.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent dccc1810
...@@ -17,7 +17,6 @@ enum { ...@@ -17,7 +17,6 @@ enum {
ALC262_NEC, ALC262_NEC,
ALC262_TOSHIBA_S06, ALC262_TOSHIBA_S06,
ALC262_TOSHIBA_RX1, ALC262_TOSHIBA_RX1,
ALC262_TYAN,
ALC262_MODEL_LAST /* last tag */ ALC262_MODEL_LAST /* last tag */
}; };
...@@ -177,48 +176,6 @@ static const struct snd_kcontrol_new alc262_benq_t31_mixer[] = { ...@@ -177,48 +176,6 @@ static const struct snd_kcontrol_new alc262_benq_t31_mixer[] = {
{ } /* end */ { } /* end */
}; };
static const struct snd_kcontrol_new alc262_tyan_mixer[] = {
HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
HDA_BIND_MUTE("Master Playback Switch", 0x0c, 2, HDA_INPUT),
HDA_CODEC_VOLUME("Aux Playback Volume", 0x0b, 0x06, HDA_INPUT),
HDA_CODEC_MUTE("Aux Playback Switch", 0x0b, 0x06, HDA_INPUT),
HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT),
HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT),
HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT),
HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT),
{ } /* end */
};
static const struct hda_verb alc262_tyan_verbs[] = {
/* Headphone automute */
{0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
{0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
{0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
/* P11 AUX_IN, white 4-pin connector */
{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
{0x14, AC_VERB_SET_CONFIG_DEFAULT_BYTES_1, 0xe1},
{0x14, AC_VERB_SET_CONFIG_DEFAULT_BYTES_2, 0x93},
{0x14, AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0x19},
{}
};
/* unsolicited event for HP jack sensing */
static void alc262_tyan_setup(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
spec->autocfg.hp_pins[0] = 0x1b;
spec->autocfg.speaker_pins[0] = 0x15;
alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP);
}
#define alc262_capture_mixer alc882_capture_mixer #define alc262_capture_mixer alc882_capture_mixer
#define alc262_capture_alt_mixer alc882_capture_alt_mixer #define alc262_capture_alt_mixer alc882_capture_alt_mixer
...@@ -686,7 +643,6 @@ static const char * const alc262_models[ALC262_MODEL_LAST] = { ...@@ -686,7 +643,6 @@ static const char * const alc262_models[ALC262_MODEL_LAST] = {
[ALC262_ULTRA] = "ultra", [ALC262_ULTRA] = "ultra",
[ALC262_LENOVO_3000] = "lenovo-3000", [ALC262_LENOVO_3000] = "lenovo-3000",
[ALC262_NEC] = "nec", [ALC262_NEC] = "nec",
[ALC262_TYAN] = "tyan",
[ALC262_AUTO] = "auto", [ALC262_AUTO] = "auto",
}; };
...@@ -698,7 +654,6 @@ static const struct snd_pci_quirk alc262_cfg_tbl[] = { ...@@ -698,7 +654,6 @@ static const struct snd_pci_quirk alc262_cfg_tbl[] = {
SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06), SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06),
SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU),
SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU),
SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_TYAN),
SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc032, "Samsung Q1", SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc032, "Samsung Q1",
ALC262_ULTRA), ALC262_ULTRA),
SND_PCI_QUIRK(0x144d, 0xc510, "Samsung Q45", ALC262_HIPPO), SND_PCI_QUIRK(0x144d, 0xc510, "Samsung Q45", ALC262_HIPPO),
...@@ -857,19 +812,5 @@ static const struct alc_config_preset alc262_presets[] = { ...@@ -857,19 +812,5 @@ static const struct alc_config_preset alc262_presets[] = {
.setup = alc262_hippo_setup, .setup = alc262_hippo_setup,
.init_hook = alc_inithook, .init_hook = alc_inithook,
}, },
[ALC262_TYAN] = {
.mixers = { alc262_tyan_mixer },
.init_verbs = { alc262_init_verbs, alc262_tyan_verbs},
.num_dacs = ARRAY_SIZE(alc262_dac_nids),
.dac_nids = alc262_dac_nids,
.hp_nid = 0x02,
.dig_out_nid = ALC262_DIGOUT_NID,
.num_channel_mode = ARRAY_SIZE(alc262_modes),
.channel_mode = alc262_modes,
.input_mux = &alc262_capture_source,
.unsol_event = alc_sku_unsol_event,
.setup = alc262_tyan_setup,
.init_hook = alc_hp_automute,
},
}; };
...@@ -4339,12 +4339,13 @@ static int alc262_parse_auto_config(struct hda_codec *codec) ...@@ -4339,12 +4339,13 @@ static int alc262_parse_auto_config(struct hda_codec *codec)
* Pin config fixes * Pin config fixes
*/ */
enum { enum {
PINFIX_FSC_H270, ALC262_FIXUP_FSC_H270,
PINFIX_HP_Z200, ALC262_FIXUP_HP_Z200,
ALC262_FIXUP_TYAN,
}; };
static const struct alc_fixup alc262_fixups[] = { static const struct alc_fixup alc262_fixups[] = {
[PINFIX_FSC_H270] = { [ALC262_FIXUP_FSC_H270] = {
.type = ALC_FIXUP_PINS, .type = ALC_FIXUP_PINS,
.v.pins = (const struct alc_pincfg[]) { .v.pins = (const struct alc_pincfg[]) {
{ 0x14, 0x99130110 }, /* speaker */ { 0x14, 0x99130110 }, /* speaker */
...@@ -4353,18 +4354,26 @@ static const struct alc_fixup alc262_fixups[] = { ...@@ -4353,18 +4354,26 @@ static const struct alc_fixup alc262_fixups[] = {
{ } { }
} }
}, },
[PINFIX_HP_Z200] = { [ALC262_FIXUP_HP_Z200] = {
.type = ALC_FIXUP_PINS, .type = ALC_FIXUP_PINS,
.v.pins = (const struct alc_pincfg[]) { .v.pins = (const struct alc_pincfg[]) {
{ 0x16, 0x99130120 }, /* internal speaker */ { 0x16, 0x99130120 }, /* internal speaker */
{ } { }
} }
}, },
[ALC262_FIXUP_TYAN] = {
.type = ALC_FIXUP_PINS,
.v.pins = (const struct alc_pincfg[]) {
{ 0x14, 0x1993e1f0 }, /* int AUX */
{ }
}
},
}; };
static const struct snd_pci_quirk alc262_fixup_tbl[] = { static const struct snd_pci_quirk alc262_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", PINFIX_HP_Z200), SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200),
SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", PINFIX_FSC_H270), SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_FIXUP_TYAN),
SND_PCI_QUIRK(0x1734, 0x1147, "FSC Celsius H270", ALC262_FIXUP_FSC_H270),
{} {}
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment