@@ -510,6 +510,15 @@ static void alc256_shutup(struct hda_codec *codec)
510510 hp_pin = 0x21 ;
511511
512512 alc_update_coefex_idx (codec , 0x57 , 0x04 , 0x0007 , 0x1 ); /* Low power */
513+
514+ /* 3k pull low control for Headset jack. */
515+ /* NOTE: call this before clearing the pin, otherwise codec stalls */
516+ /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
517+ * when booting with headset plugged. So skip setting it for the codec alc257
518+ */
519+ if (spec -> en_3kpull_low )
520+ alc_update_coef_idx (codec , 0x46 , 0 , 3 << 12 );
521+
513522 hp_pin_sense = snd_hda_jack_detect (codec , hp_pin );
514523
515524 if (hp_pin_sense ) {
@@ -520,14 +529,6 @@ static void alc256_shutup(struct hda_codec *codec)
520529
521530 msleep (75 );
522531
523- /* 3k pull low control for Headset jack. */
524- /* NOTE: call this before clearing the pin, otherwise codec stalls */
525- /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
526- * when booting with headset plugged. So skip setting it for the codec alc257
527- */
528- if (spec -> en_3kpull_low )
529- alc_update_coef_idx (codec , 0x46 , 0 , 3 << 12 );
530-
531532 if (!spec -> no_shutup_pins )
532533 snd_hda_codec_write (codec , hp_pin , 0 ,
533534 AC_VERB_SET_PIN_WIDGET_CONTROL , 0x0 );
0 commit comments