diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-07-26 10:33:10 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-07-26 17:21:24 +0200 |
commit | 4d7fbdbcb1d563b1822c74da3c9e4aa4523d8d6d (patch) | |
tree | e8b38eb8d7c67388595f11b140c97382a1384b1d /sound/pci/hda/hda_codec.h | |
parent | e581f3dba509f6d48e4939aa70e9b768aa5fd4f3 (diff) |
ALSA: hda - Allow codec-specific set_power_state ops
The procedure for codec D-state change may have exceptional cases
depending on the codec chip, such as a longer delay or suppressing D3.
This patch adds a new codec ops, set_power_state() to override the system
default function. For ease of porting, snd_hda_codec_set_power_to_all()
helper function is extracted from the default set_power_state() function.
As an example, the Conexant codec-specific delay is removed from the
default routine but moved to patch_conexant.c.
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 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index c7ca753d94ee..755f2b0f9d8e 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h @@ -700,6 +700,8 @@ 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); + void (*set_power_state)(struct hda_codec *codec, hda_nid_t fg, + unsigned int power_state); #ifdef CONFIG_PM int (*suspend)(struct hda_codec *codec, pm_message_t state); int (*post_suspend)(struct hda_codec *codec); @@ -1006,6 +1008,9 @@ int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid, */ 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); /* * power management |