Skip to contentSkip to conversation

ASoC: Add support for OMAP3 Pandora

PATCH In review Grazvydas Ignotas 2 participants 4 messages Dec 4, 2008 – Dec 5, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Add support for OMAP3 Pandora

This patch adds basic support for OMAP3 Pandora.

---
 sound/soc/omap/Kconfig        |    8 +
 sound/soc/omap/Makefile       |    2 +
 sound/soc/omap/omap3pandora.c |  311 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 321 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/omap/omap3pandora.c
sound/soc/omap/Kconfig +8 -0
index da39f27..a7b1d77 100644
@@ -46,3 +46,11 @@ config SND_OMAP_SOC_SDP3430
 	help
 	  Say Y if you want to add support for SoC audio on Texas Instruments
 	  SDP3430.
+
+config SND_OMAP_SOC_OMAP3_PANDORA
+	tristate "SoC Audio support for OMAP3 Pandora"
+	depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3_PANDORA
+	select SND_OMAP_SOC_MCBSP
+	select SND_SOC_TWL4030
+	help
+	  Say Y if you want to add support for SoC audio on the OMAP3 Pandora.
sound/soc/omap/Makefile +2 -0
index 29cf3a8..76fedd9 100644
@@ -11,9 +11,11 @@ snd-soc-osk5912-objs := osk5912.o
 snd-soc-overo-objs := overo.o
 snd-soc-omap2evm-objs := omap2evm.o
 snd-soc-sdp3430-objs := sdp3430.o
+snd-soc-omap3pandora-objs := omap3pandora.o
 
 obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
 obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o
 obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o
 obj-$(CONFIG_MACH_OMAP2EVM) += snd-soc-omap2evm.o
 obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o
+obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o
sound/soc/omap/omap3pandora.c new file +311 -0

311 lines not on this page · raw message

Signature · 1 line
1.5.4.3

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw

2008/12/4 Grazvydas Ignotas <[email protected]>

Quoted 10 lines

This patch adds basic support for OMAP3 Pandora.

---
 sound/soc/omap/Kconfig        |    8 +
 sound/soc/omap/Makefile       |    2 +
 sound/soc/omap/omap3pandora.c |  311
+++++++++++++++++++++++++++++++++++++++++
 3 files changed, 321 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/omap/omap3pandora.c

Hi

I like this board file! It definetely deserves a place in sound/soc/omap.

Quoted 4 lines
(quoted diff) +2 -0
+       /* Set McBSP clock to external */
+       ret = snd_soc_dai_set_sysclk(cpu_dai, OMAP_MCBSP_SYSCLK_CLKS_EXT,

0,
+ SND_SOC_CLOCK_IN);

I'm glad to see external clocking using with McBSP. Never tested feature :-)

+/* Digital audio interface glue - connects codec <--> CPU */

Quoted 7 lines
sound/soc/omap/omap3pandora.c new file +7 -0
+static struct snd_soc_dai_link omap3pandora_dai[] = {
+       {
+               .name = "PCM1773",
+               .stream_name = "HiFi Out",
+               .cpu_dai = &omap_mcbsp_dai[0],
+               .codec_dai = &twl4030_dai,
+               .ops = &omap3pandora_out_ops,

sound/soc/omap/omap3pandora.c line 219

Quoted 10 lines
sound/soc/omap/omap3pandora.c new file +10 -0
+               .init = omap3pandora_out_init,
+       }, {
+               .name = "TWL4030",
+               .stream_name = "Line/Mic In",
+               .cpu_dai = &omap_mcbsp_dai[1],
+               .codec_dai = &twl4030_dai,
+               .ops = &omap3pandora_in_ops,
+               .init = omap3pandora_in_init,
+       }
+};

Nice, first OMAP machine driver using McBSP in multilink configuration.

sound/soc/omap/omap3pandora.c line 246

Quoted 6 lines
sound/soc/omap/omap3pandora.c new file +6 -0
+       if (!machine_is_omap3_pandora()) {
+               pr_debug(PREFIX "Not OMAP3 Pandora\n");
+               return -ENODEV;
+       }
+       pr_info("OMAP3 Pandora SoC init\n");
+

Minor muttering, but I don't see very much use for these debug prints.

Jarkko

#2 lore raw
Quoted 8 lines · Jarkko Nikula

2008/12/4 Grazvydas Ignotas <[email protected]>

Quoted 5 lines
(quoted diff) +2 -0
+       /* Set McBSP clock to external */
+       ret = snd_soc_dai_set_sysclk(cpu_dai, OMAP_MCBSP_SYSCLK_CLKS_EXT,

0,
+ SND_SOC_CLOCK_IN);

I'm glad to see external clocking using with McBSP. Never tested feature :-)

Yup, and in works fine. Thanks for adding support for that!.

Quoted 13 lines
Quoted 13 lines
sound/soc/omap/omap3pandora.c new file +12 -0
+/* Digital audio interface glue - connects codec <--> CPU */
+static struct snd_soc_dai_link omap3pandora_dai[] = {
+       {
+               .name = "PCM1773",
+               .stream_name = "HiFi Out",
+               .cpu_dai = &omap_mcbsp_dai[0],
+               .codec_dai = &twl4030_dai,
+               .ops = &omap3pandora_out_ops,
+               .init = omap3pandora_out_init,
+       }, {
+               .name = "TWL4030",
+               .stream_name = "Line/Mic In",
Quoted 8 lines

sound/soc/omap/omap3pandora.c line 219

Quoted 6 lines
sound/soc/omap/omap3pandora.c new file +6 -0
+               .cpu_dai = &omap_mcbsp_dai[1],
+               .codec_dai = &twl4030_dai,
+               .ops = &omap3pandora_in_ops,
+               .init = omap3pandora_in_init,
+       }
+};

Nice, first OMAP machine driver using McBSP in multilink configuration.

We also have bluetooth path, but I've left that for another time.

Quoted 8 lines

sound/soc/omap/omap3pandora.c line 246

Quoted 6 lines
sound/soc/omap/omap3pandora.c new file +6 -0
+       if (!machine_is_omap3_pandora()) {
+               pr_debug(PREFIX "Not OMAP3 Pandora\n");
+               return -ENODEV;
+       }
+       pr_info("OMAP3 Pandora SoC init\n");
+

Minor muttering, but I don't see very much use for these debug prints.

Well, every other OMAP3 board file has this. Do I need to resend?

#3 lore raw
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
sound/soc/omap/omap3pandora.c new file +6 -0
+       if (!machine_is_omap3_pandora()) {
+               pr_debug(PREFIX "Not OMAP3 Pandora\n");
+               return -ENODEV;
+       }
+       pr_info("OMAP3 Pandora SoC init\n");
+
Quoted 4 lines
Quoted 1 line

Minor muttering, but I don't see very much use for these debug prints.

Well, every other OMAP3 board file has this. Do I need to resend?

Not necessary but if doing another modifications.

Jarkko