ASoC: Add support for OMAP3 Pandora
PATCH 1/1 ASoC: Add support for OMAP3 Pandora
This patch adds basic support for OMAP3 Pandora.
---
I'm not sure if splitting DAPM and widgets was good idea, I can adjust if needed.
The map is also not quite right, it says headphone jack is connected to TWL4030 codec OUTL and OUTR, but that is not really the case. It is connected to external DAC, and DAC is connected to OMAP. However DAC uses clock from TWL4030, so TWL needs to be active. I've basically done that connection to get event callback, where I can switch DAC and headphone amp on/off.
sound/soc/omap/Kconfig | 8 + sound/soc/omap/Makefile | 2 + sound/soc/omap/omap3pandora.c | 293 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 303 insertions(+), 0 deletions(-) create mode 100644 sound/soc/omap/omap3pandora.c
sound/soc/omap/Kconfig +8 -0
@@ -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
@@ -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 +293 -0
293 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
Quoted 2 lines · Grazvydas Ignotas
I'm not sure if splitting DAPM and widgets was good idea, I can adjust if needed.
That's a bit odd but fine - since the init is done per-DAI it makes some sense, especially given that the output path is going via this external DAC so is almost a separate device.
Quoted 6 lines
The map is also not quite right, it says headphone jack is connected to TWL4030 codec OUTL and OUTR, but that is not really the case. It is connected to external DAC, and DAC is connected to OMAP. However DAC uses clock from TWL4030, so TWL needs to be active. I've basically done that connection to get event callback, where I can switch DAC and headphone amp on/off.
Hrm, interesting configuration. It'd be good to put this in the driver as comments somewhere so that someone picking up the driver knows what's going on. It'd be a bit nicer to handle this by adding widgets for the DAC and amplifier but we don't have GPIO based DAPM widgets currently.
Also, I suspect that you'll get better pop/click performance if you power the amp off before the DAC on teardown - as things stand you'll amplify any artefacts you get when disabling the DAC.
sound/soc/omap/omap3pandora.c line 215
Quoted 6 lines
sound/soc/omap/omap3pandora.c new file +6
-0+/* Audio subsystem */ +static struct snd_soc_device omap3pandora_snd_data = { + .card = &snd_soc_card_omap3pandora, + .platform = &omap_soc_platform, + .codec_dev = &soc_codec_dev_twl4030, +};
Current git moves platform to the card structure.