[RFC PATCH 2/3] drm/i915: add opregion function to enable/disable audio device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_drv.h       |  6 ++++++
 drivers/gpu/drm/i915/intel_opregion.c | 10 ++++++++++
 2 files changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 2feb8215f9fa..f8e7a74a21ff 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2603,6 +2603,7 @@ extern int intel_opregion_notify_encoder(struct intel_encoder *intel_encoder,
 extern int intel_opregion_notify_adapter(struct drm_device *dev,
 					 pci_power_t state);
 extern int intel_opregion_notify_cdclk(struct drm_device *dev, int cdclk);
+extern int intel_opregion_audio_enable(struct drm_device *dev, bool enable);
 #else
 static inline int intel_opregion_setup(struct drm_device *dev) { return 0; }
 static inline void intel_opregion_init(struct drm_device *dev) { return; }
@@ -2623,6 +2624,11 @@ intel_opregion_notify_cdclk(struct drm_device *dev, int cdclk)
 {
 	return 0;
 }
+static inline int
+intel_opregion_audio_enable(struct drm_device *dev, bool enable)
+{
+	return 0;
+}
 #endif
 
 /* intel_acpi.c */
diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index 6450d2625624..7482b687ac20 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -424,6 +424,16 @@ int intel_opregion_notify_cdclk(struct drm_device *dev, int cdclk)
 	return swsci(dev, SWSCI_SBCB_CD_CLOCK_CHANGE, parm, NULL);
 }
 
+int intel_opregion_audio_enable(struct drm_device *dev, bool enable)
+{
+	u32 parm = enable ? 1 : 0;
+
+	if (!IS_HASWELL(dev) && !IS_BROADWELL(dev))
+		return 0;
+
+	return swsci(dev, SWSCI_SBCB_ENABLE_DISABLE_AUDIO, parm, NULL);
+}
+
 static u32 asle_set_backlight(struct drm_device *dev, u32 bclp)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
-- 
2.0.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux