diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-02-19 17:23:31 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-03-07 17:30:07 (GMT) |
commit | 5ebd3bbdcc17c9523dbbbf9c756da1676ca7e973 (patch) | |
tree | 38acad2e01258dea2bea0f9ea2970c29b6a88ece /sound/pci/hda/patch_realtek.c | |
parent | 5f171baaa5afb8bb26d09b63d429ccc2cafc6bf7 (diff) | |
download | linux-fsl-qoriq-5ebd3bbdcc17c9523dbbbf9c756da1676ca7e973.tar.xz |
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: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 2d4237b..056990e 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1455,6 +1455,7 @@ enum { ALC260_FIXUP_HP_B1900, ALC260_FIXUP_KN1, ALC260_FIXUP_FSC_S7020, + ALC260_FIXUP_FSC_S7020_JWSE, }; static void alc260_gpio1_automute(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) { struct alc_spec *spec = codec->spec; + if (action == HDA_FIXUP_ACT_PROBE) + spec->init_amp = ALC_INIT_NONE; +} - switch (action) { - case HDA_FIXUP_ACT_PRE_PROBE: +static void alc260_fixup_fsc_s7020_jwse(struct hda_codec *codec, + 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; - break; - case HDA_FIXUP_ACT_PROBE: - spec->init_amp = ALC_INIT_NONE; - break; + spec->gen.add_in_jack_modes = 1; + spec->gen.hp_mic = 1; } } @@ -1586,6 +1591,12 @@ static const struct hda_fixup alc260_fixups[] = { .type = HDA_FIXUP_FUNC, .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[] = { @@ -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) @@ -1620,7 +1639,8 @@ static int patch_alc260(struct hda_codec *codec) */ 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); /* automatic parse from the BIOS config */ |