]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs
authorTakashi Iwai <tiwai@suse.de>
Fri, 30 Jul 2010 09:28:02 +0000 (11:28 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 30 Jul 2010 09:28:02 +0000 (11:28 +0200)
Call snd_hda_shutup_pins() for power-saving and reboot-notifier in
patch_conexant.c as well as other codecs.  This will reduce the pop
noise in power-save mode.

Reference: bnc#624896
https://bugzilla.novell.com/show_bug.cgi?id=624896

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_conexant.c

index c99425ab2e703ca78d7b8e43e5c83f085db37791..d6341f3fef01bfa0da87979b6c1accc44a04b4a6 100644 (file)
@@ -611,11 +611,23 @@ static int conexant_build_controls(struct hda_codec *codec)
        return 0;
 }
 
+#ifdef CONFIG_SND_HDA_POWER_SAVE
+static int conexant_suspend(struct hda_codec *codec, pm_message_t state)
+{
+       snd_hda_shutup_pins(codec);
+       return 0;
+}
+#endif
+
 static struct hda_codec_ops conexant_patch_ops = {
        .build_controls = conexant_build_controls,
        .build_pcms = conexant_build_pcms,
        .init = conexant_init,
        .free = conexant_free,
+#ifdef CONFIG_SND_HDA_POWER_SAVE
+       .suspend = conexant_suspend,
+#endif
+       .reboot_notify = snd_hda_shutup_pins,
 };
 
 #ifdef CONFIG_SND_HDA_INPUT_BEEP