aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index b3554df740ff..94ae69f20925 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -899,6 +899,25 @@ static void restore_pincfgs(struct hda_codec *codec)
899 } 899 }
900} 900}
901 901
902/**
903 * snd_hda_shutup_pins - Shut up all pins
904 * @codec: the HDA codec
905 *
906 * Clear all pin controls to shup up before suspend for avoiding click noise.
907 * The controls aren't cached so that they can be resumed properly.
908 */
909void snd_hda_shutup_pins(struct hda_codec *codec)
910{
911 int i;
912 for (i = 0; i < codec->init_pins.used; i++) {
913 struct hda_pincfg *pin = snd_array_elem(&codec->init_pins, i);
914 /* use read here for syncing after issuing each verb */
915 snd_hda_codec_read(codec, pin->nid, 0,
916 AC_VERB_SET_PIN_WIDGET_CONTROL, 0);
917 }
918}
919EXPORT_SYMBOL_HDA(snd_hda_shutup_pins);
920
902static void init_hda_cache(struct hda_cache_rec *cache, 921static void init_hda_cache(struct hda_cache_rec *cache,
903 unsigned int record_size); 922 unsigned int record_size);
904static void free_hda_cache(struct hda_cache_rec *cache); 923static void free_hda_cache(struct hda_cache_rec *cache);