diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-01-24 20:23:35 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-24 20:23:35 +0400 |
commit | 9419ab6b72325e20789a61004cf68dc9e909a009 (patch) | |
tree | f9c7a7ddaec6208153716ae798e4374ae49f06a0 /sound/pci/hda/hda_codec.h | |
parent | 25368c47aee6d909923001918041f2e94bfa02ef (diff) | |
download | linux-9419ab6b72325e20789a61004cf68dc9e909a009.tar.xz |
ALSA: hda - Add power state filtering
Add a hook to struct hda_codec for filtering the target power state of
each widget when powering up/down. The current hackish EAPD check is
implemented as the default hook pointer, too.
This allows codec drivers to implement own power filter. In the
upcoming changes, the generic parser will have the better power filter
based on the active paths.
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 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index cc73287341de..fbedcf3c9d0b 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h @@ -886,6 +886,10 @@ struct hda_codec { spinlock_t power_lock; #endif + /* filter the requested power state per nid */ + unsigned int (*power_filter)(struct hda_codec *codec, hda_nid_t nid, + unsigned int power_state); + /* codec-specific additional proc output */ void (*proc_widget_hook)(struct snd_info_buffer *buffer, struct hda_codec *codec, hda_nid_t nid); @@ -1047,8 +1051,7 @@ extern const struct snd_pcm_chmap_elem snd_pcm_2_1_chmaps[]; void snd_hda_get_codec_name(struct hda_codec *codec, char *name, int namelen); void snd_hda_bus_reboot_notify(struct hda_bus *bus); void snd_hda_codec_set_power_to_all(struct hda_codec *codec, hda_nid_t fg, - unsigned int power_state, - bool eapd_workaround); + unsigned int power_state); int snd_hda_lock_devices(struct hda_bus *bus); void snd_hda_unlock_devices(struct hda_bus *bus); |