aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-04-19 11:13:03 -0400
committerTakashi Iwai <tiwai@suse.de>2012-04-19 11:13:03 -0400
commitc817eebec5971febab86d397582954bd52f403a8 (patch)
treeea7b918873ff5c47e6213a7958c9623605382244 /sound
parent590b4775d6b628c7ad215fd0335a0a787032e2dd (diff)
parentd70f363222ef373c2037412f09a600357cfa1c7a (diff)
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
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_conexant.c35
1 files changed, 30 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index a36488d94aaa..d906c5b74cf0 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -3971,9 +3971,14 @@ static void cx_auto_init_output(struct hda_codec *codec)
3971 int i; 3971 int i;
3972 3972
3973 mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids); 3973 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;
3975 snd_hda_codec_write(codec, cfg->hp_pins[i], 0, 3979 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 }
3977 mute_outputs(codec, cfg->hp_outs, cfg->hp_pins); 3982 mute_outputs(codec, cfg->hp_outs, cfg->hp_pins);
3978 mute_outputs(codec, cfg->line_outs, cfg->line_out_pins); 3983 mute_outputs(codec, cfg->line_outs, cfg->line_out_pins);
3979 mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins); 3984 mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins);
@@ -4391,8 +4396,10 @@ static void apply_pin_fixup(struct hda_codec *codec,
4391 4396
4392enum { 4397enum {
4393 CXT_PINCFG_LENOVO_X200, 4398 CXT_PINCFG_LENOVO_X200,
4399 CXT_PINCFG_LENOVO_TP410,
4394}; 4400};
4395 4401
4402/* ThinkPad X200 & co with cxt5051 */
4396static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = { 4403static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = {
4397 { 0x16, 0x042140ff }, /* HP (seq# overridden) */ 4404 { 0x16, 0x042140ff }, /* HP (seq# overridden) */
4398 { 0x17, 0x21a11000 }, /* dock-mic */ 4405 { 0x17, 0x21a11000 }, /* dock-mic */
@@ -4401,15 +4408,33 @@ static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = {
4401 {} 4408 {}
4402}; 4409};
4403 4410
4411/* ThinkPad 410/420/510/520, X201 & co with cxt5066 */
4412static 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
4404static const struct cxt_pincfg *cxt_pincfg_tbl[] = { 4419static const struct cxt_pincfg *cxt_pincfg_tbl[] = {
4405 [CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200, 4420 [CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200,
4421 [CXT_PINCFG_LENOVO_TP410] = cxt_pincfg_lenovo_tp410,
4406}; 4422};
4407 4423
4408static const struct snd_pci_quirk cxt_fixups[] = { 4424static const struct snd_pci_quirk cxt5051_fixups[] = {
4409 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200), 4425 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200),
4410 {} 4426 {}
4411}; 4427};
4412 4428
4429static 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
4413/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches 4438/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches
4414 * can be created (bko#42825) 4439 * can be created (bko#42825)
4415 */ 4440 */
@@ -4446,13 +4471,13 @@ static int patch_conexant_auto(struct hda_codec *codec)
4446 case 0x14f15051: 4471 case 0x14f15051:
4447 add_cx5051_fake_mutes(codec); 4472 add_cx5051_fake_mutes(codec);
4448 codec->pin_amp_workaround = 1; 4473 codec->pin_amp_workaround = 1;
4474 apply_pin_fixup(codec, cxt5051_fixups, cxt_pincfg_tbl);
4449 break; 4475 break;
4450 default: 4476 default:
4451 codec->pin_amp_workaround = 1; 4477 codec->pin_amp_workaround = 1;
4478 apply_pin_fixup(codec, cxt5066_fixups, cxt_pincfg_tbl);
4452 } 4479 }
4453 4480
4454 apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl);
4455
4456 /* Show mute-led control only on HP laptops 4481 /* Show mute-led control only on HP laptops
4457 * This is a sort of white-list: on HP laptops, EAPD corresponds 4482 * This is a sort of white-list: on HP laptops, EAPD corresponds
4458 * only to the mute-LED without actualy amp function. Meanwhile, 4483 * only to the mute-LED without actualy amp function. Meanwhile,