@@ -3868,20 +3868,18 @@ static void alc_default_init(struct hda_codec *codec)
3868
3868
3869
3869
hp_pin_sense = snd_hda_jack_detect (codec , hp_pin );
3870
3870
3871
- if (hp_pin_sense )
3871
+ if (hp_pin_sense ) {
3872
3872
msleep (2 );
3873
3873
3874
- snd_hda_codec_write (codec , hp_pin , 0 ,
3875
- AC_VERB_SET_AMP_GAIN_MUTE , AMP_OUT_MUTE );
3876
-
3877
- if (hp_pin_sense )
3878
- msleep (85 );
3874
+ snd_hda_codec_write (codec , hp_pin , 0 ,
3875
+ AC_VERB_SET_PIN_WIDGET_CONTROL , PIN_OUT );
3879
3876
3880
- snd_hda_codec_write (codec , hp_pin , 0 ,
3881
- AC_VERB_SET_PIN_WIDGET_CONTROL , PIN_OUT );
3877
+ msleep (75 );
3882
3878
3883
- if (hp_pin_sense )
3884
- msleep (100 );
3879
+ snd_hda_codec_write (codec , hp_pin , 0 ,
3880
+ AC_VERB_SET_AMP_GAIN_MUTE , AMP_OUT_UNMUTE );
3881
+ msleep (75 );
3882
+ }
3885
3883
}
3886
3884
3887
3885
static void alc_default_shutup (struct hda_codec * codec )
@@ -3897,22 +3895,20 @@ static void alc_default_shutup(struct hda_codec *codec)
3897
3895
3898
3896
hp_pin_sense = snd_hda_jack_detect (codec , hp_pin );
3899
3897
3900
- if (hp_pin_sense )
3898
+ if (hp_pin_sense ) {
3901
3899
msleep (2 );
3902
3900
3903
- snd_hda_codec_write (codec , hp_pin , 0 ,
3904
- AC_VERB_SET_AMP_GAIN_MUTE , AMP_OUT_MUTE );
3905
-
3906
- if (hp_pin_sense )
3907
- msleep (85 );
3908
-
3909
- if (!spec -> no_shutup_pins )
3910
3901
snd_hda_codec_write (codec , hp_pin , 0 ,
3911
- AC_VERB_SET_PIN_WIDGET_CONTROL , 0x0 );
3902
+ AC_VERB_SET_AMP_GAIN_MUTE , AMP_OUT_MUTE );
3912
3903
3913
- if (hp_pin_sense )
3914
- msleep (100 );
3904
+ msleep (75 );
3915
3905
3906
+ if (!spec -> no_shutup_pins )
3907
+ snd_hda_codec_write (codec , hp_pin , 0 ,
3908
+ AC_VERB_SET_PIN_WIDGET_CONTROL , 0x0 );
3909
+
3910
+ msleep (75 );
3911
+ }
3916
3912
alc_auto_setup_eapd (codec , false);
3917
3913
alc_shutup_pins (codec );
3918
3914
}
0 commit comments