aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-07-24 08:31:50 -0400
committerTakashi Iwai <tiwai@suse.de>2013-07-24 08:31:50 -0400
commit9bfb2844a2f9e6eab52aed1eca0d03f4398c755f (patch)
treeac2e5cd7c1a0bc7f1d0a9b9efbc610c8495cbf8a /sound/pci/hda/patch_realtek.c
parentb785a492c6eef578520594d5c4d6e9f2cb47cbeb (diff)
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: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 8bd226149868..dbd59dfc746e 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -282,6 +282,7 @@ static void alc_eapd_shutup(struct hda_codec *codec)
282{ 282{
283 alc_auto_setup_eapd(codec, false); 283 alc_auto_setup_eapd(codec, false);
284 msleep(200); 284 msleep(200);
285 snd_hda_shutup_pins(codec);
285} 286}
286 287
287/* generic EAPD initialization */ 288/* generic EAPD initialization */
@@ -826,7 +827,8 @@ static inline void alc_shutup(struct hda_codec *codec)
826 827
827 if (spec && spec->shutup) 828 if (spec && spec->shutup)
828 spec->shutup(codec); 829 spec->shutup(codec);
829 snd_hda_shutup_pins(codec); 830 else
831 snd_hda_shutup_pins(codec);
830} 832}
831 833
832#define alc_free snd_hda_gen_free 834#define alc_free snd_hda_gen_free
@@ -2573,15 +2575,13 @@ static void alc269_shutup(struct hda_codec *codec)
2573{ 2575{
2574 struct alc_spec *spec = codec->spec; 2576 struct alc_spec *spec = codec->spec;
2575 2577
2576 if (spec->codec_variant != ALC269_TYPE_ALC269VB)
2577 return;
2578
2579 if (spec->codec_variant == ALC269_TYPE_ALC269VB) 2578 if (spec->codec_variant == ALC269_TYPE_ALC269VB)
2580 alc269vb_toggle_power_output(codec, 0); 2579 alc269vb_toggle_power_output(codec, 0);
2581 if (spec->codec_variant == ALC269_TYPE_ALC269VB && 2580 if (spec->codec_variant == ALC269_TYPE_ALC269VB &&
2582 (alc_get_coef0(codec) & 0x00ff) == 0x018) { 2581 (alc_get_coef0(codec) & 0x00ff) == 0x018) {
2583 msleep(150); 2582 msleep(150);
2584 } 2583 }
2584 snd_hda_shutup_pins(codec);
2585} 2585}
2586 2586
2587static void alc5505_coef_set(struct hda_codec *codec, unsigned int index_reg, 2587static void alc5505_coef_set(struct hda_codec *codec, unsigned int index_reg,