diff options
| -rw-r--r-- | sound/pci/hda/patch_realtek.c | 49 |
1 files changed, 45 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 2508f8109f11..e65e35433055 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -1445,6 +1445,13 @@ enum { | |||
| 1445 | ALC_FIXUP_ACT_BUILD, | 1445 | ALC_FIXUP_ACT_BUILD, |
| 1446 | }; | 1446 | }; |
| 1447 | 1447 | ||
| 1448 | static void alc_apply_pincfgs(struct hda_codec *codec, | ||
| 1449 | const struct alc_pincfg *cfg) | ||
| 1450 | { | ||
| 1451 | for (; cfg->nid; cfg++) | ||
| 1452 | snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val); | ||
| 1453 | } | ||
| 1454 | |||
| 1448 | static void alc_apply_fixup(struct hda_codec *codec, int action) | 1455 | static void alc_apply_fixup(struct hda_codec *codec, int action) |
| 1449 | { | 1456 | { |
| 1450 | struct alc_spec *spec = codec->spec; | 1457 | struct alc_spec *spec = codec->spec; |
| @@ -1478,9 +1485,7 @@ static void alc_apply_fixup(struct hda_codec *codec, int action) | |||
| 1478 | snd_printdd(KERN_INFO "hda_codec: %s: " | 1485 | snd_printdd(KERN_INFO "hda_codec: %s: " |
| 1479 | "Apply pincfg for %s\n", | 1486 | "Apply pincfg for %s\n", |
| 1480 | codec->chip_name, modelname); | 1487 | codec->chip_name, modelname); |
| 1481 | for (; cfg->nid; cfg++) | 1488 | alc_apply_pincfgs(codec, cfg); |
| 1482 | snd_hda_codec_set_pincfg(codec, cfg->nid, | ||
| 1483 | cfg->val); | ||
| 1484 | break; | 1489 | break; |
| 1485 | case ALC_FIXUP_VERBS: | 1490 | case ALC_FIXUP_VERBS: |
| 1486 | if (action != ALC_FIXUP_ACT_PROBE || !fix->v.verbs) | 1491 | if (action != ALC_FIXUP_ACT_PROBE || !fix->v.verbs) |
| @@ -4861,6 +4866,7 @@ enum { | |||
| 4861 | ALC260_FIXUP_GPIO1_TOGGLE, | 4866 | ALC260_FIXUP_GPIO1_TOGGLE, |
| 4862 | ALC260_FIXUP_REPLACER, | 4867 | ALC260_FIXUP_REPLACER, |
| 4863 | ALC260_FIXUP_HP_B1900, | 4868 | ALC260_FIXUP_HP_B1900, |
| 4869 | ALC260_FIXUP_KN1, | ||
| 4864 | }; | 4870 | }; |
| 4865 | 4871 | ||
| 4866 | static void alc260_gpio1_automute(struct hda_codec *codec) | 4872 | static void alc260_gpio1_automute(struct hda_codec *codec) |
| @@ -4888,6 +4894,36 @@ static void alc260_fixup_gpio1_toggle(struct hda_codec *codec, | |||
| 4888 | } | 4894 | } |
| 4889 | } | 4895 | } |
| 4890 | 4896 | ||
| 4897 | static void alc260_fixup_kn1(struct hda_codec *codec, | ||
| 4898 | const struct alc_fixup *fix, int action) | ||
| 4899 | { | ||
| 4900 | struct alc_spec *spec = codec->spec; | ||
| 4901 | static const struct alc_pincfg pincfgs[] = { | ||
| 4902 | { 0x0f, 0x02214000 }, /* HP/speaker */ | ||
| 4903 | { 0x12, 0x90a60160 }, /* int mic */ | ||
| 4904 | { 0x13, 0x02a19000 }, /* ext mic */ | ||
| 4905 | { 0x18, 0x01446000 }, /* SPDIF out */ | ||
| 4906 | /* disable bogus I/O pins */ | ||
| 4907 | { 0x10, 0x411111f0 }, | ||
| 4908 | { 0x11, 0x411111f0 }, | ||
| 4909 | { 0x14, 0x411111f0 }, | ||
| 4910 | { 0x15, 0x411111f0 }, | ||
| 4911 | { 0x16, 0x411111f0 }, | ||
| 4912 | { 0x17, 0x411111f0 }, | ||
| 4913 | { 0x19, 0x411111f0 }, | ||
| 4914 | { } | ||
| 4915 | }; | ||
| 4916 | |||
| 4917 | switch (action) { | ||
| 4918 | case ALC_FIXUP_ACT_PRE_PROBE: | ||
| 4919 | alc_apply_pincfgs(codec, pincfgs); | ||
| 4920 | break; | ||
| 4921 | case ALC_FIXUP_ACT_PROBE: | ||
| 4922 | spec->init_amp = ALC_INIT_NONE; | ||
| 4923 | break; | ||
| 4924 | } | ||
| 4925 | } | ||
| 4926 | |||
| 4891 | static const struct alc_fixup alc260_fixups[] = { | 4927 | static const struct alc_fixup alc260_fixups[] = { |
| 4892 | [ALC260_FIXUP_HP_DC5750] = { | 4928 | [ALC260_FIXUP_HP_DC5750] = { |
| 4893 | .type = ALC_FIXUP_PINS, | 4929 | .type = ALC_FIXUP_PINS, |
| @@ -4938,7 +4974,11 @@ static const struct alc_fixup alc260_fixups[] = { | |||
| 4938 | .v.func = alc260_fixup_gpio1_toggle, | 4974 | .v.func = alc260_fixup_gpio1_toggle, |
| 4939 | .chained = true, | 4975 | .chained = true, |
| 4940 | .chain_id = ALC260_FIXUP_COEF, | 4976 | .chain_id = ALC260_FIXUP_COEF, |
| 4941 | } | 4977 | }, |
| 4978 | [ALC260_FIXUP_KN1] = { | ||
| 4979 | .type = ALC_FIXUP_FUNC, | ||
| 4980 | .v.func = alc260_fixup_kn1, | ||
| 4981 | }, | ||
| 4942 | }; | 4982 | }; |
| 4943 | 4983 | ||
| 4944 | static const struct snd_pci_quirk alc260_fixup_tbl[] = { | 4984 | static const struct snd_pci_quirk alc260_fixup_tbl[] = { |
| @@ -4948,6 +4988,7 @@ static const struct snd_pci_quirk alc260_fixup_tbl[] = { | |||
| 4948 | SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750), | 4988 | SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750), |
| 4949 | SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900), | 4989 | SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900), |
| 4950 | SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1), | 4990 | SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1), |
| 4991 | SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1), | ||
| 4951 | SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER), | 4992 | SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER), |
| 4952 | SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF), | 4993 | SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF), |
| 4953 | {} | 4994 | {} |
