aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/patch_conexant.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index f52c9ef3cc8c..58b5de4a6eed 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -4367,8 +4367,10 @@ static void apply_pin_fixup(struct hda_codec *codec,
4367 4367
4368enum { 4368enum {
4369 CXT_PINCFG_LENOVO_X200, 4369 CXT_PINCFG_LENOVO_X200,
4370 CXT_PINCFG_LENOVO_TP410,
4370}; 4371};
4371 4372
4373/* ThinkPad X200 & co with cxt5051 */
4372static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = { 4374static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = {
4373 { 0x16, 0x042140ff }, /* HP (seq# overridden) */ 4375 { 0x16, 0x042140ff }, /* HP (seq# overridden) */
4374 { 0x17, 0x21a11000 }, /* dock-mic */ 4376 { 0x17, 0x21a11000 }, /* dock-mic */
@@ -4376,15 +4378,33 @@ static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = {
4376 {} 4378 {}
4377}; 4379};
4378 4380
4381/* ThinkPad 410/420/510/520, X201 & co with cxt5066 */
4382static const struct cxt_pincfg cxt_pincfg_lenovo_tp410[] = {
4383 { 0x19, 0x042110ff }, /* HP (seq# overridden) */
4384 { 0x1a, 0x21a190f0 }, /* dock-mic */
4385 { 0x1c, 0x212140ff }, /* dock-HP */
4386 {}
4387};
4388
4379static const struct cxt_pincfg *cxt_pincfg_tbl[] = { 4389static const struct cxt_pincfg *cxt_pincfg_tbl[] = {
4380 [CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200, 4390 [CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200,
4391 [CXT_PINCFG_LENOVO_TP410] = cxt_pincfg_lenovo_tp410,
4381}; 4392};
4382 4393
4383static const struct snd_pci_quirk cxt_fixups[] = { 4394static const struct snd_pci_quirk cxt5051_fixups[] = {
4384 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200), 4395 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200),
4385 {} 4396 {}
4386}; 4397};
4387 4398
4399static const struct snd_pci_quirk cxt5066_fixups[] = {
4400 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
4401 SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410),
4402 SND_PCI_QUIRK(0x17aa, 0x215f, "Lenovo T510", CXT_PINCFG_LENOVO_TP410),
4403 SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410),
4404 SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410),
4405 {}
4406};
4407
4388/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches 4408/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches
4389 * can be created (bko#42825) 4409 * can be created (bko#42825)
4390 */ 4410 */
@@ -4421,11 +4441,13 @@ static int patch_conexant_auto(struct hda_codec *codec)
4421 break; 4441 break;
4422 case 0x14f15051: 4442 case 0x14f15051:
4423 add_cx5051_fake_mutes(codec); 4443 add_cx5051_fake_mutes(codec);
4444 apply_pin_fixup(codec, cxt5051_fixups, cxt_pincfg_tbl);
4445 break;
4446 default:
4447 apply_pin_fixup(codec, cxt5066_fixups, cxt_pincfg_tbl);
4424 break; 4448 break;
4425 } 4449 }
4426 4450
4427 apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl);
4428
4429 err = cx_auto_search_adcs(codec); 4451 err = cx_auto_search_adcs(codec);
4430 if (err < 0) 4452 if (err < 0)
4431 return err; 4453 return err;