[alsa-devel] [PATCH 2/3] ASoC: multi-comp: OMAP McBSP: Enable audio on OMAP1 platform
Peter Ujfalusi
peter.ujfalusi at nokia.com
Fri Aug 6 09:39:14 CEST 2010
OMAP1 class has 3 McBSP ports, if I'm not mistaken.
Enable the audio with multi-comp on OMAP1 class.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi at nokia.com>
---
arch/arm/mach-omap1/devices.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 379100c..523bbc4 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -267,6 +267,29 @@ static inline void omap_init_sti(void)
static inline void omap_init_sti(void) {}
#endif
+#if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE)
+
+static struct platform_device omap_pcm = {
+ .name = "omap-pcm-audio",
+ .id = -1,
+};
+
+OMAP_MCBSP_PLATFORM_DEVICE(1);
+OMAP_MCBSP_PLATFORM_DEVICE(2);
+OMAP_MCBSP_PLATFORM_DEVICE(3);
+
+static void omap_init_audio(void)
+{
+ platform_device_register(&omap_mcbsp1);
+ platform_device_register(&omap_mcbsp2);
+ platform_device_register(&omap_mcbsp3);
+ platform_device_register(&omap_pcm);
+}
+
+#else
+static inline void omap_init_audio(void) {}
+#endif
+
/*-------------------------------------------------------------------------*/
/*
@@ -299,6 +322,7 @@ static int __init omap1_init_devices(void)
omap_init_rtc();
omap_init_spi100k();
omap_init_sti();
+ omap_init_audio();
return 0;
}
--
1.7.2
More information about the Alsa-devel
mailing list