@@ -3971,9 +3971,14 @@ static void cx_auto_init_output(struct hda_codec *codec)
3971
3971
int i ;
3972
3972
3973
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
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
3982
mute_outputs (codec , cfg -> hp_outs , cfg -> hp_pins );
3978
3983
mute_outputs (codec , cfg -> line_outs , cfg -> line_out_pins );
3979
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
4392
4397
enum {
4393
4398
CXT_PINCFG_LENOVO_X200 ,
4399
+ CXT_PINCFG_LENOVO_TP410 ,
4394
4400
};
4395
4401
4402
+ /* ThinkPad X200 & co with cxt5051 */
4396
4403
static const struct cxt_pincfg cxt_pincfg_lenovo_x200 [] = {
4397
4404
{ 0x16 , 0x042140ff }, /* HP (seq# overridden) */
4398
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 */
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
+
4404
4419
static const struct cxt_pincfg * cxt_pincfg_tbl [] = {
4405
4420
[CXT_PINCFG_LENOVO_X200 ] = cxt_pincfg_lenovo_x200 ,
4421
+ [CXT_PINCFG_LENOVO_TP410 ] = cxt_pincfg_lenovo_tp410 ,
4406
4422
};
4407
4423
4408
- static const struct snd_pci_quirk cxt_fixups [] = {
4424
+ static const struct snd_pci_quirk cxt5051_fixups [] = {
4409
4425
SND_PCI_QUIRK (0x17aa , 0x20f2 , "Lenovo X200" , CXT_PINCFG_LENOVO_X200 ),
4410
4426
{}
4411
4427
};
4412
4428
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
+
4413
4438
/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches
4414
4439
* can be created (bko#42825)
4415
4440
*/
@@ -4446,13 +4471,13 @@ static int patch_conexant_auto(struct hda_codec *codec)
4446
4471
case 0x14f15051 :
4447
4472
add_cx5051_fake_mutes (codec );
4448
4473
codec -> pin_amp_workaround = 1 ;
4474
+ apply_pin_fixup (codec , cxt5051_fixups , cxt_pincfg_tbl );
4449
4475
break ;
4450
4476
default :
4451
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
4481
/* Show mute-led control only on HP laptops
4457
4482
* This is a sort of white-list: on HP laptops, EAPD corresponds
4458
4483
* only to the mute-LED without actualy amp function. Meanwhile,
0 commit comments