summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorMengdong Lin <mengdong.lin@intel.com>2012-08-23 17:32:30 +0800
committerTakashi Iwai <tiwai@suse.de>2012-08-23 14:21:32 +0200
commitb8dfc4624162c0547d7f36a9df48da2d9b4bd58a (patch)
tree55f32cd8537eb3db947282823182ed0dcc41da0a /sound/pci/hda/hda_codec.h
parent8a5354140a86b6d4057793a9ed28d29ac8ce6ba6 (diff)
ALSA: hda - add runtime PM support
Runtime PM can bring more power saving: - When the controller is suspended, its parent device will also have a chance to suspend. - PCI subsystem can choose the lowest power state the controller can signal wake up from. This state can be D3cold on platforms with ACPI PM support. And runtime PM can provide a gerneral sysfs interface for a system policy manager. Runtime PM support is based on current HDA power saving implementation. The user can enable runtime PM on platfroms that provide acceptable latency on transition from D3 to D0. Details: - When both power saving and runtime PM are enabled: -- If a codec supports 'stop-clock' in D3, it will request suspending the controller after it enters D3 and request resuming the controller before back to D0. Thus the controller will be suspended only when all codecs are suspended and support stop-clock in D3. -- User IO operations and HW wakeup signal can resume the controller back to D0. - If runtime PM is disabled, power saving just works as before. - If power saving is disabled, the controller won't be suspended because the power usage counter can never be 0. More about 'stop-clock' feature: If a codec can support targeted pass-through operations in D3 state when there is no BCLK present on the link, it will set CLKSTOP flag in the supported power states and report PS-ClkStopOk when entering D3 state. Please refer to HDA spec section 7.3.3.10 Power state and 7.3.4.12 Supported Power State. [Fixed CONFIG_PM_RUNTIME dependency in hda_intel.c by tiwai] Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> 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 92ecb2b2a05c..13c834f20440 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -616,7 +616,7 @@ struct hda_bus_ops {
void (*bus_reset)(struct hda_bus *bus);
#ifdef CONFIG_SND_HDA_POWER_SAVE
/* notify power-up/down from codec to controller */
- void (*pm_notify)(struct hda_bus *bus);
+ void (*pm_notify)(struct hda_bus *bus, struct hda_codec *codec);
#endif
};
@@ -875,6 +875,9 @@ struct hda_codec {
unsigned long power_off_acct;
unsigned long power_jiffies;
spinlock_t power_lock;
+
+ unsigned int d3_stop_clk:1; /* support D3 operation without BCLK */
+ unsigned int d3_stop_clk_ok:1; /* BCLK can stop */
#endif
/* codec-specific additional proc output */