[alsa-devel] [PATCH 0/3] ARM: OMAP: Add platform devices for ASoC HDMI drivers
This set of patches is intended to add the platform devices for the ASoC HDMI drivers when not using device tree. For this, I took an approach similar to DMIC and McPDM by creating a dedicated functions to create the devices.
I included the device for the CPU DAI driver, omap-hdmi-audio-dai, and the device for the machine driver, omap-hdmi-audio, in devices.c to reflect the fact that any OMAP4 (and OMAP5 in the future) has HDMI IP. I put the device for the codec in the board file to reflect the fact that not necessarily all the boards with OMAP4/5 have the HDMI output wired.
Best regards
Ricardo
Ricardo Neri (3): ARM: OMAP: devices: Register platform devices for HDMI audio ARM: OMAP4: board-4430sdp: Register platform device for HDMI audio codec ARM: OMAP4: board-omap4panda: Register platform device for HDMI audio codec
arch/arm/mach-omap2/board-4430sdp.c | 6 ++++++ arch/arm/mach-omap2/board-omap4panda.c | 6 ++++++ arch/arm/mach-omap2/devices.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 0 deletions(-)
Add platform registration for the devices HDMI audio support. The omap-hdmi-audio-dai platform device is to be used by the ASoC HDMI CPU DAI driver. The omap-hdmi-audio platform device is to be used by the ASoC HDMI machine driver that links together the ASOC CPU DAI, ASoC plaform and ASoC codec drivers.
Signed-off-by: Ricardo Neri ricardo.neri@ti.com --- arch/arm/mach-omap2/devices.c | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index e433603..17dacef 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -355,6 +355,36 @@ static void __init omap_init_dmic(void) static inline void omap_init_dmic(void) {} #endif
+#if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \ + defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE) + +static struct platform_device omap_hdmi_audio = { + .name = "omap-hdmi-audio", + .id = -1, +}; + +static void __init omap_init_hdmi_audio(void) +{ + struct omap_hwmod *oh; + struct platform_device *pdev; + + oh = omap_hwmod_lookup("dss_hdmi"); + if (!oh) { + printk(KERN_ERR "Could not look up dss_hdmi hw_mod\n"); + return; + } + + pdev = omap_device_build("omap-hdmi-audio-dai", + -1, oh, NULL, 0, NULL, 0, 0); + WARN(IS_ERR(pdev), + "Can't build omap_device for omap-hdmi-audio-dai.\n"); + + platform_device_register(&omap_hdmi_audio); +} +#else +static inline void omap_init_hdmi_audio(void) {} +#endif + #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
#include <plat/mcspi.h> @@ -704,6 +734,7 @@ static int __init omap2_init_devices(void) omap_init_mcpdm(); omap_init_dmic(); omap_init_camera(); + omap_init_hdmi_audio(); omap_init_mbox(); omap_init_mcspi(); omap_init_pmu();
Add platform device registratation for HDMI audio codec. This is to be able to transmit audio through the HDMI output featured in SDP4430 and Blaze boards.
Signed-off-by: Ricardo Neri ricardo.neri@ti.com --- arch/arm/mach-omap2/board-4430sdp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index a39fc4b..3f26da2 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -383,6 +383,11 @@ static struct platform_device sdp4430_dmic_codec = { .id = -1, };
+static struct platform_device sdp4430_hdmi_audio_codec = { + .name = "hdmi-audio-codec", + .id = -1, +}; + static struct omap_abe_twl6040_data sdp4430_abe_audio_data = { .card_name = "SDP4430", .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, @@ -417,6 +422,7 @@ static struct platform_device *sdp4430_devices[] __initdata = { &sdp4430_vbat, &sdp4430_dmic_codec, &sdp4430_abe_audio, + &sdp4430_hdmi_audio_codec, };
static struct omap_musb_board_data musb_board_data = {
Add platform device registratation for HDMI audio codec. This is to be able to transmit audio through the HDMI output featured in Pandaboard and PandaboardES boards.
Signed-off-by: Ricardo Neri ricardo.neri@ti.com --- arch/arm/mach-omap2/board-omap4panda.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index d8c0e89..07dd0e4 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -116,6 +116,11 @@ static struct platform_device panda_abe_audio = { }, };
+static struct platform_device panda_hdmi_audio_codec = { + .name = "hdmi-audio-codec", + .id = -1, +}; + static struct platform_device btwilink_device = { .name = "btwilink", .id = -1, @@ -125,6 +130,7 @@ static struct platform_device *panda_devices[] __initdata = { &leds_gpio, &wl1271_device, &panda_abe_audio, + &panda_hdmi_audio_codec, &btwilink_device, };
Hi Tony,
I was wondering if you've had the time to take a look at these patches.
Thanks!
Ricardo On 04/17/2012 07:40 PM, Ricardo Neri wrote:
This set of patches is intended to add the platform devices for the ASoC HDMI drivers when not using device tree. For this, I took an approach similar to DMIC and McPDM by creating a dedicated functions to create the devices.
I included the device for the CPU DAI driver, omap-hdmi-audio-dai, and the device for the machine driver, omap-hdmi-audio, in devices.c to reflect the fact that any OMAP4 (and OMAP5 in the future) has HDMI IP. I put the device for the codec in the board file to reflect the fact that not necessarily all the boards with OMAP4/5 have the HDMI output wired.
Best regards
Ricardo
Ricardo Neri (3): ARM: OMAP: devices: Register platform devices for HDMI audio ARM: OMAP4: board-4430sdp: Register platform device for HDMI audio codec ARM: OMAP4: board-omap4panda: Register platform device for HDMI audio codec
arch/arm/mach-omap2/board-4430sdp.c | 6 ++++++ arch/arm/mach-omap2/board-omap4panda.c | 6 ++++++ arch/arm/mach-omap2/devices.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 0 deletions(-)
Hi Tony,
This is me again; asking if you had any chance to look at these patches.
Thanks!
Ricardo On 04/25/2012 06:29 PM, Ricardo Neri wrote:
Hi Tony,
I was wondering if you've had the time to take a look at these patches.
Thanks!
Ricardo On 04/17/2012 07:40 PM, Ricardo Neri wrote:
This set of patches is intended to add the platform devices for the ASoC HDMI drivers when not using device tree. For this, I took an approach similar to DMIC and McPDM by creating a dedicated functions to create the devices.
I included the device for the CPU DAI driver, omap-hdmi-audio-dai, and the device for the machine driver, omap-hdmi-audio, in devices.c to reflect the fact that any OMAP4 (and OMAP5 in the future) has HDMI IP. I put the device for the codec in the board file to reflect the fact that not necessarily all the boards with OMAP4/5 have the HDMI output wired.
Best regards
Ricardo
Ricardo Neri (3): ARM: OMAP: devices: Register platform devices for HDMI audio ARM: OMAP4: board-4430sdp: Register platform device for HDMI audio codec ARM: OMAP4: board-omap4panda: Register platform device for HDMI audio codec
arch/arm/mach-omap2/board-4430sdp.c | 6 ++++++ arch/arm/mach-omap2/board-omap4panda.c | 6 ++++++ arch/arm/mach-omap2/devices.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 0 deletions(-)
* Ricardo Neri ricardo.neri@ti.com [120503 18:54]:
Hi Tony,
This is me again; asking if you had any chance to look at these patches.
Thanks applying into board branch finally.
Regards,
Tony
participants (2)
-
Ricardo Neri
-
Tony Lindgren