aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-07-05 10:50:13 -0400
committerTakashi Iwai <tiwai@suse.de>2010-07-09 02:42:29 -0400
commitac0547dc62e67a3e0b0c1628b6e49efba8f517db (patch)
treedafd1c8283cc09c3eda5d8fc2a1d06ffeb0141c8 /sound/pci/hda/hda_codec.h
parentf189efcd1cc06b75fe18642c9751d26aa5ed2b54 (diff)
ALSA: hda - Restore cleared pin controls on resume
Many codecs now clear the pin controls at suspend via snd_hda_shutup_pins() for reducing the click noise at power-off. But this leaves some pins uninitialized, and they'll be never recovered after resume. This patch adds the proper recovery of cleared pin controls on resume. Also it adds a check of bus->shutdown so that pins won't be cleared at module unloading. Reference: Kernel bug 16339 http://bugzilla.kernel.org/show_bug.cgi?id=16339 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r--sound/pci/hda/hda_codec.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 49e939e7e5cd..5991d14e1ec0 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -821,6 +821,7 @@ struct hda_codec {
821 unsigned int pin_amp_workaround:1; /* pin out-amp takes index 821 unsigned int pin_amp_workaround:1; /* pin out-amp takes index
822 * (e.g. Conexant codecs) 822 * (e.g. Conexant codecs)
823 */ 823 */
824 unsigned int pins_shutup:1; /* pins are shut up */
824 unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */ 825 unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */
825#ifdef CONFIG_SND_HDA_POWER_SAVE 826#ifdef CONFIG_SND_HDA_POWER_SAVE
826 unsigned int power_on :1; /* current (global) power-state */ 827 unsigned int power_on :1; /* current (global) power-state */
@@ -897,7 +898,9 @@ void snd_hda_codec_resume_cache(struct hda_codec *codec);
897/* the struct for codec->pin_configs */ 898/* the struct for codec->pin_configs */
898struct hda_pincfg { 899struct hda_pincfg {
899 hda_nid_t nid; 900 hda_nid_t nid;
900 unsigned int cfg; 901 unsigned char ctrl; /* current pin control value */
902 unsigned char pad; /* reserved */
903 unsigned int cfg; /* default configuration */
901}; 904};
902 905
903unsigned int snd_hda_codec_get_pincfg(struct hda_codec *codec, hda_nid_t nid); 906unsigned int snd_hda_codec_get_pincfg(struct hda_codec *codec, hda_nid_t nid);