Skip to content

Commit

Permalink
ALSA: hda - Fix click noises at suspend/free with Realtek codecs
Browse files Browse the repository at this point in the history
Call snd_hda_shutup_pins() at suspend and free for avoiding click noises.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Dec 27, 2009
1 parent 92ee616 commit a4e09aa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -3693,6 +3693,11 @@ static int alc_build_pcms(struct hda_codec *codec)
return 0;
}

static inline void alc_shutup(struct hda_codec *codec)
{
snd_hda_shutup_pins(codec);
}

static void alc_free_kctls(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
Expand All @@ -3713,6 +3718,7 @@ static void alc_free(struct hda_codec *codec)
if (!spec)
return;

alc_shutup(codec);
alc_free_kctls(codec);
kfree(spec);
snd_hda_detach_beep_device(codec);
Expand All @@ -3722,6 +3728,7 @@ static void alc_free(struct hda_codec *codec)
static int alc_suspend(struct hda_codec *codec, pm_message_t state)
{
struct alc_spec *spec = codec->spec;
alc_shutup(codec);
if (spec && spec->power_hook)
spec->power_hook(codec, 0);
return 0;
Expand Down

0 comments on commit a4e09aa

Please sign in to comment.