Skip to contentSkip to conversation

ALSA: x86: hdmi: Add audio support for BYT and CHT

RFC PATCH Superseded Jerome Anand 1 participant 1 message Dec 2, 2016 Sound

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH v4 4/7 ALSA: x86: hdmi: Add audio support for BYT and CHT

Hdmi audio driver based on the child platform device created by gfx driver is implemented.
This audio driver is derived from legacy intel hdmi audio driver.

The interfaces for interaction between gfx and audio are updated and the driver implementation updated to derive interrupts in its own address space based on irq chip framework

---
 sound/x86/Makefile               |    2 +
 sound/x86/intel_hdmi_audio.c     | 1907 ++++++++++++++++++++++++++++++++++++++
 sound/x86/intel_hdmi_audio.h     |  201 ++++
 sound/x86/intel_hdmi_audio_if.c  |  551 +++++++++++
 sound/x86/intel_hdmi_lpe_audio.c |   16 +-
 5 files changed, 2671 insertions(+), 6 deletions(-)
 create mode 100644 sound/x86/intel_hdmi_audio.c
 create mode 100644 sound/x86/intel_hdmi_audio.h
 create mode 100644 sound/x86/intel_hdmi_audio_if.c
sound/x86/Makefile +2 -0
index 78b2ae1..bc074d0 100644
@@ -3,6 +3,8 @@ DRIVER_NAME := hdmi_lpe_audio
 ccflags-y += -Idrivers/gpu/drm/i915
 
 $(DRIVER_NAME)-objs += \
+	intel_hdmi_audio.o \
+	intel_hdmi_audio_if.o \
 	intel_hdmi_lpe_audio.o
 
 obj-$(CONFIG_HDMI_LPE_AUDIO) += $(DRIVER_NAME).o
sound/x86/intel_hdmi_audio.c new file +1907 -0

1,907 lines not on this page · raw message

sound/x86/intel_hdmi_audio.h new file +201 -0

201 lines not on this page · raw message

sound/x86/intel_hdmi_audio_if.c new file +551 -0

551 lines not on this page · raw message

sound/x86/intel_hdmi_lpe_audio.c +10 -6
index f31ab72..16194c6 100644
@@ -36,6 +36,7 @@
 #include <sound/initval.h>
 #include <drm/intel_lpe_audio.h>
 #include "intel_hdmi_lpe_audio.h"
+#include "intel_hdmi_audio.h"
 
 /* globals*/
 struct platform_device *gpdev;
@@ -461,9 +462,9 @@ static void notify_audio_lpe(void *audio_ptr)
 /**
  * hdmi_lpe_audio_probe - start bridge with i915
  *
- * This function is called when the i915 driver creates the hdmi-lpe-audio
- * platform device. Card creation is deferred until a hot plug event is
- * received
+ * This function is called when the i915 driver creates the
+ * hdmi-lpe-audio platform device. Card creation is deferred until a
+ * hot plug event is received
  */
 static int hdmi_lpe_audio_probe(struct platform_device *pdev)
 {
@@ -505,8 +506,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
 		(unsigned int)res_mmio->start, (unsigned int)res_mmio->end);
 
 	mmio_start = ioremap_nocache(res_mmio->start,
-				(size_t)((res_mmio->end - res_mmio->start)
-						+ 1));
+				(size_t)((res_mmio->end -
+					res_mmio->start) + 1));
 	if (!mmio_start) {
 		pr_err("Could not get ioremap\n");
 		return -EACCES;
@@ -556,11 +557,12 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, ctx);
 
+	ret = hdmi_audio_probe((void *)pdev);
+
 	pr_debug("hdmi lpe audio: setting pin eld notify callback\n");
 
 	spin_lock_irqsave(&pdata->lpe_audio_slock, flag_irq);
 	pdata->notify_audio_lpe = notify_audio_lpe;
-
 	if (pdata->notify_pending) {
 
 		pr_debug("%s: handle pending notification\n", __func__);
@@ -584,6 +586,8 @@ static int hdmi_lpe_audio_remove(struct platform_device *pdev)
 
 	pr_debug("Enter %s\n", __func__);
 
+	hdmi_audio_remove(pdev);
+
 	/* get context, release resources */
 	ctx = platform_get_drvdata(pdev);
 	iounmap(ctx->mmio_start);
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx