diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-11-11 09:34:25 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-11 09:37:08 +0100 |
commit | a2f6309e8392e2c14c04594fca8b4876c8c9bc36 (patch) | |
tree | 78db71701660196181768b898bcc80db8bc10009 /sound/pci/hda/hda_codec.h | |
parent | ALSA: hda - Add missing export for snd_hda_bus_reboot_notify (diff) | |
download | linux-a2f6309e8392e2c14c04594fca8b4876c8c9bc36.tar.xz linux-a2f6309e8392e2c14c04594fca8b4876c8c9bc36.zip |
ALSA: hda - Add power on/off counter
Added the power on/off counter and expose via sysfs files.
The sysfs files, power_on_acct and power_off_acct, are created under
each codec hwdep sysfs directory (e.g. /sys/class/sound/hwC0D0).
The files show the msec length of the codec power-on and power-off,
respectively.
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.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index cbf199a98ab2..b16678cade18 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h @@ -812,6 +812,9 @@ struct hda_codec { unsigned int power_transition :1; /* power-state in transition */ int power_count; /* current (global) power refcount */ struct delayed_work power_work; /* delayed task for powerdown */ + unsigned long power_on_acct; + unsigned long power_off_acct; + unsigned long power_jiffies; #endif /* codec-specific additional proc output */ @@ -936,6 +939,7 @@ const char *snd_hda_get_jack_location(u32 cfg); void snd_hda_power_up(struct hda_codec *codec); void snd_hda_power_down(struct hda_codec *codec); #define snd_hda_codec_needs_resume(codec) codec->power_count +void snd_hda_update_power_acct(struct hda_codec *codec); #else static inline void snd_hda_power_up(struct hda_codec *codec) {} static inline void snd_hda_power_down(struct hda_codec *codec) {} |