diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-04-19 11:17:59 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-04-19 11:20:13 -0400 |
commit | d39801105722c9aef9eae180656190c399c576a9 (patch) | |
tree | c999d56c418920a9fda656259afb3f13dfd7616e /sound/pci/hda/patch_conexant.c | |
parent | 83b0c6ba999643ee8ad6329f26e1cdc870e1a920 (diff) | |
parent | c817eebec5971febab86d397582954bd52f403a8 (diff) |
Merge branch 'fix/hda' into topic/hda
Conflicts:
sound/pci/hda/patch_conexant.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index abb59f472d48..6e04c2bf06de 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -3972,9 +3972,14 @@ static void cx_auto_init_output(struct hda_codec *codec) | |||
3972 | int i; | 3972 | int i; |
3973 | 3973 | ||
3974 | mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids); | 3974 | mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids); |
3975 | for (i = 0; i < cfg->hp_outs; i++) | 3975 | for (i = 0; i < cfg->hp_outs; i++) { |
3976 | unsigned int val = PIN_OUT; | ||
3977 | if (snd_hda_query_pin_caps(codec, cfg->hp_pins[i]) & | ||
3978 | AC_PINCAP_HP_DRV) | ||
3979 | val |= AC_PINCTL_HP_EN; | ||
3976 | snd_hda_codec_write(codec, cfg->hp_pins[i], 0, | 3980 | snd_hda_codec_write(codec, cfg->hp_pins[i], 0, |
3977 | AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP); | 3981 | AC_VERB_SET_PIN_WIDGET_CONTROL, val); |
3982 | } | ||
3978 | mute_outputs(codec, cfg->hp_outs, cfg->hp_pins); | 3983 | mute_outputs(codec, cfg->hp_outs, cfg->hp_pins); |
3979 | mute_outputs(codec, cfg->line_outs, cfg->line_out_pins); | 3984 | mute_outputs(codec, cfg->line_outs, cfg->line_out_pins); |
3980 | mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins); | 3985 | mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins); |
@@ -4431,6 +4436,7 @@ static void apply_pincfg(struct hda_codec *codec, const struct cxt_pincfg *cfg) | |||
4431 | 4436 | ||
4432 | enum { | 4437 | enum { |
4433 | CXT_PINCFG_LENOVO_X200, | 4438 | CXT_PINCFG_LENOVO_X200, |
4439 | CXT_PINCFG_LENOVO_TP410, | ||
4434 | CXT_FIXUP_STEREO_DMIC, | 4440 | CXT_FIXUP_STEREO_DMIC, |
4435 | }; | 4441 | }; |
4436 | 4442 | ||
@@ -4455,6 +4461,7 @@ static void apply_fixup(struct hda_codec *codec, | |||
4455 | } | 4461 | } |
4456 | } | 4462 | } |
4457 | 4463 | ||
4464 | /* ThinkPad X200 & co with cxt5051 */ | ||
4458 | static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = { | 4465 | static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = { |
4459 | { 0x16, 0x042140ff }, /* HP (seq# overridden) */ | 4466 | { 0x16, 0x042140ff }, /* HP (seq# overridden) */ |
4460 | { 0x17, 0x21a11000 }, /* dock-mic */ | 4467 | { 0x17, 0x21a11000 }, /* dock-mic */ |
@@ -4463,13 +4470,31 @@ static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = { | |||
4463 | {} | 4470 | {} |
4464 | }; | 4471 | }; |
4465 | 4472 | ||
4473 | /* ThinkPad 410/420/510/520, X201 & co with cxt5066 */ | ||
4474 | static const struct cxt_pincfg cxt_pincfg_lenovo_tp410[] = { | ||
4475 | { 0x19, 0x042110ff }, /* HP (seq# overridden) */ | ||
4476 | { 0x1a, 0x21a190f0 }, /* dock-mic */ | ||
4477 | { 0x1c, 0x212140ff }, /* dock-HP */ | ||
4478 | {} | ||
4479 | }; | ||
4480 | |||
4466 | static const struct cxt_pincfg *cxt_pincfg_tbl[] = { | 4481 | static const struct cxt_pincfg *cxt_pincfg_tbl[] = { |
4467 | [CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200, | 4482 | [CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200, |
4483 | [CXT_PINCFG_LENOVO_TP410] = cxt_pincfg_lenovo_tp410, | ||
4468 | [CXT_FIXUP_STEREO_DMIC] = NULL, | 4484 | [CXT_FIXUP_STEREO_DMIC] = NULL, |
4469 | }; | 4485 | }; |
4470 | 4486 | ||
4471 | static const struct snd_pci_quirk cxt_fixups[] = { | 4487 | static const struct snd_pci_quirk cxt5051_fixups[] = { |
4472 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200), | 4488 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200), |
4489 | {} | ||
4490 | }; | ||
4491 | |||
4492 | static const struct snd_pci_quirk cxt5066_fixups[] = { | ||
4493 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410), | ||
4494 | SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410), | ||
4495 | SND_PCI_QUIRK(0x17aa, 0x215f, "Lenovo T510", CXT_PINCFG_LENOVO_TP410), | ||
4496 | SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410), | ||
4497 | SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410), | ||
4473 | SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), | 4498 | SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), |
4474 | {} | 4499 | {} |
4475 | }; | 4500 | }; |
@@ -4510,13 +4535,13 @@ static int patch_conexant_auto(struct hda_codec *codec) | |||
4510 | case 0x14f15051: | 4535 | case 0x14f15051: |
4511 | add_cx5051_fake_mutes(codec); | 4536 | add_cx5051_fake_mutes(codec); |
4512 | codec->pin_amp_workaround = 1; | 4537 | codec->pin_amp_workaround = 1; |
4538 | apply_fixup(codec, cxt5051_fixups, cxt_pincfg_tbl); | ||
4513 | break; | 4539 | break; |
4514 | default: | 4540 | default: |
4515 | codec->pin_amp_workaround = 1; | 4541 | codec->pin_amp_workaround = 1; |
4542 | apply_fixup(codec, cxt5066_fixups, cxt_pincfg_tbl); | ||
4516 | } | 4543 | } |
4517 | 4544 | ||
4518 | apply_fixup(codec, cxt_fixups, cxt_pincfg_tbl); | ||
4519 | |||
4520 | /* Show mute-led control only on HP laptops | 4545 | /* Show mute-led control only on HP laptops |
4521 | * This is a sort of white-list: on HP laptops, EAPD corresponds | 4546 | * This is a sort of white-list: on HP laptops, EAPD corresponds |
4522 | * only to the mute-LED without actualy amp function. Meanwhile, | 4547 | * only to the mute-LED without actualy amp function. Meanwhile, |