aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorMaxim Levitsky <maximlevitsky@gmail.com>2007-09-03 09:28:04 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:59:47 -0400
commitd804ad9258c1460916a5e5854655a0dc543fd8a5 (patch)
tree783900a809c48f73bb5849d11cb7fce8e88d4484 /sound/pci/hda/hda_codec.h
parent2e4924628ad957f702631a7a049c586a780f00f8 (diff)
[ALSA] hda-intel - Fix resume logic, when dynamic power managment is on
Comment in hda_intel.c states that 'the explicit resume is needed only when POWER_SAVE isn't set', but this is not true. There is no code that will automaticly power up the codec on resume, but only code that powers it up when user accesses it. So if user leaves a sound playing, codec will not be powered To fix that I check if there are any codecs that should be powered codec->power_count, and if so I power them up together with main controller. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r--sound/pci/hda/hda_codec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index ca157e5100c9..2bce925d84ef 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -686,9 +686,13 @@ int snd_hda_resume(struct hda_bus *bus);
686#ifdef CONFIG_SND_HDA_POWER_SAVE 686#ifdef CONFIG_SND_HDA_POWER_SAVE
687void snd_hda_power_up(struct hda_codec *codec); 687void snd_hda_power_up(struct hda_codec *codec);
688void snd_hda_power_down(struct hda_codec *codec); 688void snd_hda_power_down(struct hda_codec *codec);
689#define snd_hda_codec_needs_resume(codec) codec->power_count
690int snd_hda_codecs_inuse(struct hda_bus *bus);
689#else 691#else
690static inline void snd_hda_power_up(struct hda_codec *codec) {} 692static inline void snd_hda_power_up(struct hda_codec *codec) {}
691static inline void snd_hda_power_down(struct hda_codec *codec) {} 693static inline void snd_hda_power_down(struct hda_codec *codec) {}
694#define snd_hda_codec_needs_resume(codec) 1
695#define snd_hda_codecs_inuse(bus) 1
692#endif 696#endif
693 697
694#endif /* __SOUND_HDA_CODEC_H */ 698#endif /* __SOUND_HDA_CODEC_H */