aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_controller.c
diff options
context:
space:
mode:
authorMengdong Lin <mengdong.lin@intel.com>2015-04-29 17:43:29 +0800
committerTakashi Iwai <tiwai@suse.de>2015-04-29 12:27:53 +0200
commit17eccb27fce7cac8469dd9e828645a3ba256fc1e (patch)
tree847fcecfd604da3b7b57746258bbd7509a6a34af /sound/pci/hda/hda_controller.c
parentALSA: hda - allow a codec to control the link power (diff)
downloadlinux-dev-17eccb27fce7cac8469dd9e828645a3ba256fc1e.tar.xz
linux-dev-17eccb27fce7cac8469dd9e828645a3ba256fc1e.zip
ALSA: hda - implement link_power ops for i915 display power control
This patch implements the bus link_power ops to request/release i915 display power well. It can be used by the display codec which shares this power well with GPU on Intel platforms. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_controller.c')
-rw-r--r--sound/pci/hda/hda_controller.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index e0bb6231ff0c..120854ebd054 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -775,9 +775,20 @@ static int azx_get_response(struct hdac_bus *bus, unsigned int addr,
return azx_rirb_get_response(bus, addr, res);
}
+static int azx_link_power(struct hdac_bus *bus, bool enable)
+{
+ struct azx *chip = bus_to_azx(bus);
+
+ if (chip->ops->link_power)
+ return chip->ops->link_power(chip, enable);
+ else
+ return -EINVAL;
+}
+
static const struct hdac_bus_ops bus_core_ops = {
.command = azx_send_cmd,
.get_response = azx_get_response,
+ .link_power = azx_link_power,
};
#ifdef CONFIG_SND_HDA_DSP_LOADER