Skip to content

Commit d70f363

Browse files
committed
ALSA: hda/conexant - Set up the missing docking-station pins
ThinkPad 410,420,510,520 and X201 with cx50585 & co chips have the docking-station ports, but BIOS doesn't initialize for these pins. Thus, like the former X200, we need to set up the pins manually in the driver. The odd part is that the same PCI SSID is used for X200 and T400, thus we need to prepare individual fixup tables for cx5051 and others. Bugzilla entries: https://bugzilla.redhat.com/show_bug.cgi?id=808559 https://bugzilla.redhat.com/show_bug.cgi?id=806217 https://bugzilla.redhat.com/show_bug.cgi?id=810697 Reported-by: Josh Boyer <[email protected]> Reported-by: Jens Taprogge <[email protected]> Tested-by: Jens Taprogge <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent ca3649d commit d70f363

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

sound/pci/hda/patch_conexant.c

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4367,24 +4367,44 @@ static void apply_pin_fixup(struct hda_codec *codec,
43674367

43684368
enum {
43694369
CXT_PINCFG_LENOVO_X200,
4370+
CXT_PINCFG_LENOVO_TP410,
43704371
};
43714372

4373+
/* ThinkPad X200 & co with cxt5051 */
43724374
static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = {
43734375
{ 0x16, 0x042140ff }, /* HP (seq# overridden) */
43744376
{ 0x17, 0x21a11000 }, /* dock-mic */
43754377
{ 0x19, 0x2121103f }, /* dock-HP */
43764378
{}
43774379
};
43784380

4381+
/* ThinkPad 410/420/510/520, X201 & co with cxt5066 */
4382+
static 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+
43794389
static const struct cxt_pincfg *cxt_pincfg_tbl[] = {
43804390
[CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200,
4391+
[CXT_PINCFG_LENOVO_TP410] = cxt_pincfg_lenovo_tp410,
43814392
};
43824393

4383-
static const struct snd_pci_quirk cxt_fixups[] = {
4394+
static const struct snd_pci_quirk cxt5051_fixups[] = {
43844395
SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200),
43854396
{}
43864397
};
43874398

4399+
static 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+
43884408
/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches
43894409
* can be created (bko#42825)
43904410
*/
@@ -4421,11 +4441,13 @@ static int patch_conexant_auto(struct hda_codec *codec)
44214441
break;
44224442
case 0x14f15051:
44234443
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);
44244448
break;
44254449
}
44264450

4427-
apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl);
4428-
44294451
err = cx_auto_search_adcs(codec);
44304452
if (err < 0)
44314453
return err;

0 commit comments

Comments
 (0)