Commit d70f3632 authored by Takashi Iwai's avatar Takashi Iwai

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=810697Reported-by: default avatarJosh Boyer <jwboyer@redhat.com>
Reported-by: default avatarJens Taprogge <jens.taprogge@taprogge.org>
Tested-by: default avatarJens Taprogge <jens.taprogge@taprogge.org>
Cc: <stable@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ca3649de
...@@ -4367,8 +4367,10 @@ static void apply_pin_fixup(struct hda_codec *codec, ...@@ -4367,8 +4367,10 @@ static void apply_pin_fixup(struct hda_codec *codec,
enum { enum {
CXT_PINCFG_LENOVO_X200, CXT_PINCFG_LENOVO_X200,
CXT_PINCFG_LENOVO_TP410,
}; };
/* ThinkPad X200 & co with cxt5051 */
static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = { static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = {
{ 0x16, 0x042140ff }, /* HP (seq# overridden) */ { 0x16, 0x042140ff }, /* HP (seq# overridden) */
{ 0x17, 0x21a11000 }, /* dock-mic */ { 0x17, 0x21a11000 }, /* dock-mic */
...@@ -4376,15 +4378,33 @@ static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = { ...@@ -4376,15 +4378,33 @@ static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = {
{} {}
}; };
/* ThinkPad 410/420/510/520, X201 & co with cxt5066 */
static const struct cxt_pincfg cxt_pincfg_lenovo_tp410[] = {
{ 0x19, 0x042110ff }, /* HP (seq# overridden) */
{ 0x1a, 0x21a190f0 }, /* dock-mic */
{ 0x1c, 0x212140ff }, /* dock-HP */
{}
};
static const struct cxt_pincfg *cxt_pincfg_tbl[] = { static const struct cxt_pincfg *cxt_pincfg_tbl[] = {
[CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200, [CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200,
[CXT_PINCFG_LENOVO_TP410] = cxt_pincfg_lenovo_tp410,
}; };
static const struct snd_pci_quirk cxt_fixups[] = { static const struct snd_pci_quirk cxt5051_fixups[] = {
SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200), SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200),
{} {}
}; };
static const struct snd_pci_quirk cxt5066_fixups[] = {
SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410),
SND_PCI_QUIRK(0x17aa, 0x215f, "Lenovo T510", CXT_PINCFG_LENOVO_TP410),
SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410),
SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410),
{}
};
/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches /* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches
* can be created (bko#42825) * can be created (bko#42825)
*/ */
...@@ -4421,11 +4441,13 @@ static int patch_conexant_auto(struct hda_codec *codec) ...@@ -4421,11 +4441,13 @@ static int patch_conexant_auto(struct hda_codec *codec)
break; break;
case 0x14f15051: case 0x14f15051:
add_cx5051_fake_mutes(codec); add_cx5051_fake_mutes(codec);
apply_pin_fixup(codec, cxt5051_fixups, cxt_pincfg_tbl);
break;
default:
apply_pin_fixup(codec, cxt5066_fixups, cxt_pincfg_tbl);
break; break;
} }
apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl);
err = cx_auto_search_adcs(codec); err = cx_auto_search_adcs(codec);
if (err < 0) if (err < 0)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment