diff options
author | Mengdong Lin <mengdong.lin@intel.com> | 2015-04-29 05:43:20 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-04-29 06:27:52 -0400 |
commit | a5e7e07c264bb76d0b7c782766989c491833de05 (patch) | |
tree | 35cd2d573347f42a479f65079d17cb9562fd3f4d /include/sound | |
parent | d4b7b13e19258a848da920502e27526f36c5a59d (diff) |
ALSA: hda - allow a codec to control the link power
A flag "link_power_control" is added to indicate whether a codec needs to
control the link power. And a new bus ops link_power() is defined for the
codec to request to enable/disable the link power.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/hdaudio.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h index 6a2e030c836c..b97c59eab7ab 100644 --- a/include/sound/hdaudio.h +++ b/include/sound/hdaudio.h | |||
@@ -74,6 +74,7 @@ struct hdac_device { | |||
74 | 74 | ||
75 | /* misc flags */ | 75 | /* misc flags */ |
76 | atomic_t in_pm; /* suspend/resume being performed */ | 76 | atomic_t in_pm; /* suspend/resume being performed */ |
77 | bool link_power_control:1; | ||
77 | 78 | ||
78 | /* sysfs */ | 79 | /* sysfs */ |
79 | struct hdac_widget_tree *widgets; | 80 | struct hdac_widget_tree *widgets; |
@@ -184,6 +185,8 @@ struct hdac_bus_ops { | |||
184 | /* get a response from the last command */ | 185 | /* get a response from the last command */ |
185 | int (*get_response)(struct hdac_bus *bus, unsigned int addr, | 186 | int (*get_response)(struct hdac_bus *bus, unsigned int addr, |
186 | unsigned int *res); | 187 | unsigned int *res); |
188 | /* control the link power */ | ||
189 | int (*link_power)(struct hdac_bus *bus, bool enable); | ||
187 | }; | 190 | }; |
188 | 191 | ||
189 | /* | 192 | /* |
@@ -311,6 +314,7 @@ static inline void snd_hdac_codec_link_down(struct hdac_device *codec) | |||
311 | int snd_hdac_bus_send_cmd(struct hdac_bus *bus, unsigned int val); | 314 | int snd_hdac_bus_send_cmd(struct hdac_bus *bus, unsigned int val); |
312 | int snd_hdac_bus_get_response(struct hdac_bus *bus, unsigned int addr, | 315 | int snd_hdac_bus_get_response(struct hdac_bus *bus, unsigned int addr, |
313 | unsigned int *res); | 316 | unsigned int *res); |
317 | int snd_hdac_link_power(struct hdac_device *codec, bool enable); | ||
314 | 318 | ||
315 | bool snd_hdac_bus_init_chip(struct hdac_bus *bus, bool full_reset); | 319 | bool snd_hdac_bus_init_chip(struct hdac_bus *bus, bool full_reset); |
316 | void snd_hdac_bus_stop_chip(struct hdac_bus *bus); | 320 | void snd_hdac_bus_stop_chip(struct hdac_bus *bus); |