aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-02-19 12:23:31 -0500
committerTakashi Iwai <tiwai@suse.de>2013-03-07 12:30:07 -0500
commit5ebd3bbdcc17c9523dbbbf9c756da1676ca7e973 (patch)
tree38acad2e01258dea2bea0f9ea2970c29b6a88ece /sound/pci/hda/patch_realtek.c
parent5f171baaa5afb8bb26d09b63d429ccc2cafc6bf7 (diff)
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.c34
1 files changed, 27 insertions, 7 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 2d4237bc0d8e..056990e5ffe9 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1455,6 +1455,7 @@ enum {
1455 ALC260_FIXUP_HP_B1900, 1455 ALC260_FIXUP_HP_B1900,
1456 ALC260_FIXUP_KN1, 1456 ALC260_FIXUP_KN1,
1457 ALC260_FIXUP_FSC_S7020, 1457 ALC260_FIXUP_FSC_S7020,
1458 ALC260_FIXUP_FSC_S7020_JWSE,
1458}; 1459};
1459 1460
1460static void alc260_gpio1_automute(struct hda_codec *codec) 1461static void alc260_gpio1_automute(struct hda_codec *codec)
@@ -1516,14 +1517,18 @@ static void alc260_fixup_fsc_s7020(struct hda_codec *codec,
1516 const struct hda_fixup *fix, int action) 1517 const struct hda_fixup *fix, int action)
1517{ 1518{
1518 struct alc_spec *spec = codec->spec; 1519 struct alc_spec *spec = codec->spec;
1520 if (action == HDA_FIXUP_ACT_PROBE)
1521 spec->init_amp = ALC_INIT_NONE;
1522}
1519 1523
1520 switch (action) { 1524static void alc260_fixup_fsc_s7020_jwse(struct hda_codec *codec,
1521 case HDA_FIXUP_ACT_PRE_PROBE: 1525 const struct hda_fixup *fix, int action)
1526{
1527 struct alc_spec *spec = codec->spec;
1528 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1522 spec->gen.add_out_jack_modes = 1; 1529 spec->gen.add_out_jack_modes = 1;
1523 break; 1530 spec->gen.add_in_jack_modes = 1;
1524 case HDA_FIXUP_ACT_PROBE: 1531 spec->gen.hp_mic = 1;
1525 spec->init_amp = ALC_INIT_NONE;
1526 break;
1527 } 1532 }
1528} 1533}
1529 1534
@@ -1586,6 +1591,12 @@ static const struct hda_fixup alc260_fixups[] = {
1586 .type = HDA_FIXUP_FUNC, 1591 .type = HDA_FIXUP_FUNC,
1587 .v.func = alc260_fixup_fsc_s7020, 1592 .v.func = alc260_fixup_fsc_s7020,
1588 }, 1593 },
1594 [ALC260_FIXUP_FSC_S7020_JWSE] = {
1595 .type = HDA_FIXUP_FUNC,
1596 .v.func = alc260_fixup_fsc_s7020_jwse,
1597 .chained = true,
1598 .chain_id = ALC260_FIXUP_FSC_S7020,
1599 },
1589}; 1600};
1590 1601
1591static const struct snd_pci_quirk alc260_fixup_tbl[] = { 1602static const struct snd_pci_quirk alc260_fixup_tbl[] = {
@@ -1602,6 +1613,14 @@ static const struct snd_pci_quirk alc260_fixup_tbl[] = {
1602 {} 1613 {}
1603}; 1614};
1604 1615
1616static const struct hda_model_fixup alc260_fixup_models[] = {
1617 {.id = ALC260_FIXUP_GPIO1, .name = "gpio1"},
1618 {.id = ALC260_FIXUP_COEF, .name = "coef"},
1619 {.id = ALC260_FIXUP_FSC_S7020, .name = "fujitsu"},
1620 {.id = ALC260_FIXUP_FSC_S7020_JWSE, .name = "fujitsu-jwse"},
1621 {}
1622};
1623
1605/* 1624/*
1606 */ 1625 */
1607static int patch_alc260(struct hda_codec *codec) 1626static int patch_alc260(struct hda_codec *codec)
@@ -1620,7 +1639,8 @@ static int patch_alc260(struct hda_codec *codec)
1620 */ 1639 */
1621 spec->gen.prefer_hp_amp = 1; 1640 spec->gen.prefer_hp_amp = 1;
1622 1641
1623 snd_hda_pick_fixup(codec, NULL, alc260_fixup_tbl, alc260_fixups); 1642 snd_hda_pick_fixup(codec, alc260_fixup_models, alc260_fixup_tbl,
1643 alc260_fixups);
1624 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 1644 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
1625 1645
1626 /* automatic parse from the BIOS config */ 1646 /* automatic parse from the BIOS config */