summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-07-26 09:52:50 +0200
committerTakashi Iwai <tiwai@suse.de>2011-07-26 17:21:18 +0200
commit2a43952a99072f43c92355882b7965c8762ae3f3 (patch)
treed51d4f3623d5f9fd6682ed0823ed8bdf05b76b20 /sound/pci/hda/hda_codec.h
parent7df1ce1a8197a4afec78584f56e74ab84dcab97c (diff)
ALSA: hda - Make CONFIG_SND_HDA_POWER_SAVE depending on CONFIG_PM
It makes little sense to enable power-saving without PM. This removes SND_HDA_NEEDS_RESUME define so that we can use CONFIG_PM in all places. 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.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 82161466d3b..663aa4fc384 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -26,10 +26,6 @@
#include <sound/pcm.h>
#include <sound/hwdep.h>
-#if defined(CONFIG_PM) || defined(CONFIG_SND_HDA_POWER_SAVE)
-#define SND_HDA_NEEDS_RESUME /* resume control code is required */
-#endif
-
/*
* nodes
*/
@@ -704,17 +700,15 @@ struct hda_codec_ops {
int (*init)(struct hda_codec *codec);
void (*free)(struct hda_codec *codec);
void (*unsol_event)(struct hda_codec *codec, unsigned int res);
-#ifdef SND_HDA_NEEDS_RESUME
+#ifdef CONFIG_PM
int (*suspend)(struct hda_codec *codec, pm_message_t state);
+ int (*pre_resume)(struct hda_codec *codec);
int (*resume)(struct hda_codec *codec);
#endif
#ifdef CONFIG_SND_HDA_POWER_SAVE
int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid);
#endif
void (*reboot_notify)(struct hda_codec *codec);
-#ifdef SND_HDA_NEEDS_RESUME
- int (*pre_resume)(struct hda_codec *codec);
-#endif
};
/* record for amp information cache */
@@ -930,7 +924,7 @@ void snd_hda_sequence_write(struct hda_codec *codec,
int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex);
/* cached write */
-#ifdef SND_HDA_NEEDS_RESUME
+#ifdef CONFIG_PM
int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid,
int direct, unsigned int verb, unsigned int parm);
void snd_hda_sequence_write_cache(struct hda_codec *codec,