aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-27 05:22:24 -0500
committerTakashi Iwai <tiwai@suse.de>2009-12-27 07:39:24 -0500
commita4e09aa3cf592d9f084ff4ceb216be40c4c265dc (patch)
tree3089d6b229720588ce66d0c18455968ea1b23f8b /sound/pci
parent92ee6162c48fab24f0676969f0f147fc12f8f21c (diff)
ALSA: hda - Fix click noises at suspend/free with Realtek codecs
Call snd_hda_shutup_pins() at suspend and free for avoiding click noises. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_realtek.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 6361e6b3c9c5..cd6d139b4fd5 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3693,6 +3693,11 @@ static int alc_build_pcms(struct hda_codec *codec)
3693 return 0; 3693 return 0;
3694} 3694}
3695 3695
3696static inline void alc_shutup(struct hda_codec *codec)
3697{
3698 snd_hda_shutup_pins(codec);
3699}
3700
3696static void alc_free_kctls(struct hda_codec *codec) 3701static void alc_free_kctls(struct hda_codec *codec)
3697{ 3702{
3698 struct alc_spec *spec = codec->spec; 3703 struct alc_spec *spec = codec->spec;
@@ -3713,6 +3718,7 @@ static void alc_free(struct hda_codec *codec)
3713 if (!spec) 3718 if (!spec)
3714 return; 3719 return;
3715 3720
3721 alc_shutup(codec);
3716 alc_free_kctls(codec); 3722 alc_free_kctls(codec);
3717 kfree(spec); 3723 kfree(spec);
3718 snd_hda_detach_beep_device(codec); 3724 snd_hda_detach_beep_device(codec);
@@ -3722,6 +3728,7 @@ static void alc_free(struct hda_codec *codec)
3722static int alc_suspend(struct hda_codec *codec, pm_message_t state) 3728static int alc_suspend(struct hda_codec *codec, pm_message_t state)
3723{ 3729{
3724 struct alc_spec *spec = codec->spec; 3730 struct alc_spec *spec = codec->spec;
3731 alc_shutup(codec);
3725 if (spec && spec->power_hook) 3732 if (spec && spec->power_hook)
3726 spec->power_hook(codec, 0); 3733 spec->power_hook(codec, 0);
3727 return 0; 3734 return 0;