Commit 9bfb2844 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda/realtek - Selectively call snd_hda_shutup_pins()

Instead of calling snd_hda_shutup_pins() unconditionally, allow it be
called in spec->shutup callback.  In this way, we can avoid calling
this function if it causes a problem like we see in the next patch
following this.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent b785a492
...@@ -282,6 +282,7 @@ static void alc_eapd_shutup(struct hda_codec *codec) ...@@ -282,6 +282,7 @@ static void alc_eapd_shutup(struct hda_codec *codec)
{ {
alc_auto_setup_eapd(codec, false); alc_auto_setup_eapd(codec, false);
msleep(200); msleep(200);
snd_hda_shutup_pins(codec);
} }
/* generic EAPD initialization */ /* generic EAPD initialization */
...@@ -826,7 +827,8 @@ static inline void alc_shutup(struct hda_codec *codec) ...@@ -826,7 +827,8 @@ static inline void alc_shutup(struct hda_codec *codec)
if (spec && spec->shutup) if (spec && spec->shutup)
spec->shutup(codec); spec->shutup(codec);
snd_hda_shutup_pins(codec); else
snd_hda_shutup_pins(codec);
} }
#define alc_free snd_hda_gen_free #define alc_free snd_hda_gen_free
...@@ -2573,15 +2575,13 @@ static void alc269_shutup(struct hda_codec *codec) ...@@ -2573,15 +2575,13 @@ static void alc269_shutup(struct hda_codec *codec)
{ {
struct alc_spec *spec = codec->spec; struct alc_spec *spec = codec->spec;
if (spec->codec_variant != ALC269_TYPE_ALC269VB)
return;
if (spec->codec_variant == ALC269_TYPE_ALC269VB) if (spec->codec_variant == ALC269_TYPE_ALC269VB)
alc269vb_toggle_power_output(codec, 0); alc269vb_toggle_power_output(codec, 0);
if (spec->codec_variant == ALC269_TYPE_ALC269VB && if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
(alc_get_coef0(codec) & 0x00ff) == 0x018) { (alc_get_coef0(codec) & 0x00ff) == 0x018) {
msleep(150); msleep(150);
} }
snd_hda_shutup_pins(codec);
} }
static void alc5505_coef_set(struct hda_codec *codec, unsigned int index_reg, static void alc5505_coef_set(struct hda_codec *codec, unsigned int index_reg,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment