提交 5ebd3bbd 编写于 作者: T Takashi Iwai

ALSA: hda - Add some model name strings for ALC260

In order to let user test the known workaround more easily, give a few
known fixups for ALC260 to the model strings so that it can be passed
via the module option.

Also, move the unusual setups found in FSC S7020 fixup into a special
model, fujitsu-jwse, Jonathan Woithe Special Edition.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 5f171baa
...@@ -1455,6 +1455,7 @@ enum { ...@@ -1455,6 +1455,7 @@ enum {
ALC260_FIXUP_HP_B1900, ALC260_FIXUP_HP_B1900,
ALC260_FIXUP_KN1, ALC260_FIXUP_KN1,
ALC260_FIXUP_FSC_S7020, ALC260_FIXUP_FSC_S7020,
ALC260_FIXUP_FSC_S7020_JWSE,
}; };
static void alc260_gpio1_automute(struct hda_codec *codec) static void alc260_gpio1_automute(struct hda_codec *codec)
...@@ -1516,14 +1517,18 @@ static void alc260_fixup_fsc_s7020(struct hda_codec *codec, ...@@ -1516,14 +1517,18 @@ static void alc260_fixup_fsc_s7020(struct hda_codec *codec,
const struct hda_fixup *fix, int action) const struct hda_fixup *fix, int action)
{ {
struct alc_spec *spec = codec->spec; struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PROBE)
spec->init_amp = ALC_INIT_NONE;
}
switch (action) { static void alc260_fixup_fsc_s7020_jwse(struct hda_codec *codec,
case HDA_FIXUP_ACT_PRE_PROBE: const struct hda_fixup *fix, int action)
{
struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->gen.add_out_jack_modes = 1; spec->gen.add_out_jack_modes = 1;
break; spec->gen.add_in_jack_modes = 1;
case HDA_FIXUP_ACT_PROBE: spec->gen.hp_mic = 1;
spec->init_amp = ALC_INIT_NONE;
break;
} }
} }
...@@ -1586,6 +1591,12 @@ static const struct hda_fixup alc260_fixups[] = { ...@@ -1586,6 +1591,12 @@ static const struct hda_fixup alc260_fixups[] = {
.type = HDA_FIXUP_FUNC, .type = HDA_FIXUP_FUNC,
.v.func = alc260_fixup_fsc_s7020, .v.func = alc260_fixup_fsc_s7020,
}, },
[ALC260_FIXUP_FSC_S7020_JWSE] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc260_fixup_fsc_s7020_jwse,
.chained = true,
.chain_id = ALC260_FIXUP_FSC_S7020,
},
}; };
static const struct snd_pci_quirk alc260_fixup_tbl[] = { static const struct snd_pci_quirk alc260_fixup_tbl[] = {
...@@ -1602,6 +1613,14 @@ static const struct snd_pci_quirk alc260_fixup_tbl[] = { ...@@ -1602,6 +1613,14 @@ static const struct snd_pci_quirk alc260_fixup_tbl[] = {
{} {}
}; };
static const struct hda_model_fixup alc260_fixup_models[] = {
{.id = ALC260_FIXUP_GPIO1, .name = "gpio1"},
{.id = ALC260_FIXUP_COEF, .name = "coef"},
{.id = ALC260_FIXUP_FSC_S7020, .name = "fujitsu"},
{.id = ALC260_FIXUP_FSC_S7020_JWSE, .name = "fujitsu-jwse"},
{}
};
/* /*
*/ */
static int patch_alc260(struct hda_codec *codec) static int patch_alc260(struct hda_codec *codec)
...@@ -1620,7 +1639,8 @@ static int patch_alc260(struct hda_codec *codec) ...@@ -1620,7 +1639,8 @@ static int patch_alc260(struct hda_codec *codec)
*/ */
spec->gen.prefer_hp_amp = 1; spec->gen.prefer_hp_amp = 1;
snd_hda_pick_fixup(codec, NULL, alc260_fixup_tbl, alc260_fixups); snd_hda_pick_fixup(codec, alc260_fixup_models, alc260_fixup_tbl,
alc260_fixups);
snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
/* automatic parse from the BIOS config */ /* automatic parse from the BIOS config */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册