Skip to content

Commit c817eeb

Browse files
committed
Merge branch 'fix/cxt-stable' into fix/hda
Merge fixes for Thinkpad docking-station regressions for 3.3 kernels back to 3.4. These were committed in that branch to make the stable merging easier. Conflicts: sound/pci/hda/patch_conexant.c
2 parents 590b477 + d70f363 commit c817eeb

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

sound/pci/hda/patch_conexant.c

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3971,9 +3971,14 @@ static void cx_auto_init_output(struct hda_codec *codec)
39713971
int i;
39723972

39733973
mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids);
3974-
for (i = 0; i < cfg->hp_outs; i++)
3974+
for (i = 0; i < cfg->hp_outs; i++) {
3975+
unsigned int val = PIN_OUT;
3976+
if (snd_hda_query_pin_caps(codec, cfg->hp_pins[i]) &
3977+
AC_PINCAP_HP_DRV)
3978+
val |= AC_PINCTL_HP_EN;
39753979
snd_hda_codec_write(codec, cfg->hp_pins[i], 0,
3976-
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP);
3980+
AC_VERB_SET_PIN_WIDGET_CONTROL, val);
3981+
}
39773982
mute_outputs(codec, cfg->hp_outs, cfg->hp_pins);
39783983
mute_outputs(codec, cfg->line_outs, cfg->line_out_pins);
39793984
mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins);
@@ -4391,8 +4396,10 @@ static void apply_pin_fixup(struct hda_codec *codec,
43914396

43924397
enum {
43934398
CXT_PINCFG_LENOVO_X200,
4399+
CXT_PINCFG_LENOVO_TP410,
43944400
};
43954401

4402+
/* ThinkPad X200 & co with cxt5051 */
43964403
static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = {
43974404
{ 0x16, 0x042140ff }, /* HP (seq# overridden) */
43984405
{ 0x17, 0x21a11000 }, /* dock-mic */
@@ -4401,15 +4408,33 @@ static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = {
44014408
{}
44024409
};
44034410

4411+
/* ThinkPad 410/420/510/520, X201 & co with cxt5066 */
4412+
static const struct cxt_pincfg cxt_pincfg_lenovo_tp410[] = {
4413+
{ 0x19, 0x042110ff }, /* HP (seq# overridden) */
4414+
{ 0x1a, 0x21a190f0 }, /* dock-mic */
4415+
{ 0x1c, 0x212140ff }, /* dock-HP */
4416+
{}
4417+
};
4418+
44044419
static const struct cxt_pincfg *cxt_pincfg_tbl[] = {
44054420
[CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200,
4421+
[CXT_PINCFG_LENOVO_TP410] = cxt_pincfg_lenovo_tp410,
44064422
};
44074423

4408-
static const struct snd_pci_quirk cxt_fixups[] = {
4424+
static const struct snd_pci_quirk cxt5051_fixups[] = {
44094425
SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200),
44104426
{}
44114427
};
44124428

4429+
static const struct snd_pci_quirk cxt5066_fixups[] = {
4430+
SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
4431+
SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410),
4432+
SND_PCI_QUIRK(0x17aa, 0x215f, "Lenovo T510", CXT_PINCFG_LENOVO_TP410),
4433+
SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410),
4434+
SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410),
4435+
{}
4436+
};
4437+
44134438
/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches
44144439
* can be created (bko#42825)
44154440
*/
@@ -4446,13 +4471,13 @@ static int patch_conexant_auto(struct hda_codec *codec)
44464471
case 0x14f15051:
44474472
add_cx5051_fake_mutes(codec);
44484473
codec->pin_amp_workaround = 1;
4474+
apply_pin_fixup(codec, cxt5051_fixups, cxt_pincfg_tbl);
44494475
break;
44504476
default:
44514477
codec->pin_amp_workaround = 1;
4478+
apply_pin_fixup(codec, cxt5066_fixups, cxt_pincfg_tbl);
44524479
}
44534480

4454-
apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl);
4455-
44564481
/* Show mute-led control only on HP laptops
44574482
* This is a sort of white-list: on HP laptops, EAPD corresponds
44584483
* only to the mute-LED without actualy amp function. Meanwhile,

0 commit comments

Comments
 (0)