summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.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_intel.c
parenta5e7e07c264bb76d0b7c782766989c491833de05 (diff)
downloadlinux-17eccb27fce7cac8469dd9e828645a3ba256fc1e.tar.bz2
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_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 2b823d4ad888..d7922a6df91b 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -540,6 +540,14 @@ static int azx_position_check(struct azx *chip, struct azx_dev *azx_dev)
return 0;
}
+/* Enable/disable i915 display power for the link */
+static int azx_intel_link_power(struct azx *chip, bool enable)
+{
+ struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
+
+ return hda_display_power(hda, enable);
+}
+
/*
* Check whether the current DMA position is acceptable for updating
* periods. Returns non-zero if it's OK.
@@ -1786,6 +1794,7 @@ static const struct hda_controller_ops pci_hda_ops = {
.substream_free_pages = substream_free_pages,
.pcm_mmap_prepare = pcm_mmap_prepare,
.position_check = azx_position_check,
+ .link_power = azx_intel_link_power,
};
static int azx_probe(struct pci_dev *pci,