ARM: DaVinci: ASoC: Add dummy codec support
PATCH v3 4/6 ARM: DaVinci: ASoC: Add dummy codec support
McASP on DM646x can operate in DIT (S/PDIF) where no codec is needed. This patch provides stub codec that can be used in these configurations. On DM646x EVM the McASP1 is connected to the S/PDIF out.
Signed-off-by Steve Chen <[email protected]>
Signed-off-by Pavel Kiryukhin <[email protected]>
Signed-off-by Naresh Medisetty <[email protected]>
Signed-off-by Chaithrika U S <[email protected]>
---
This patch applies against ALSA mainline - that's the topic/asoc branch of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
sound/soc/codecs/Kconfig | 4 ++ sound/soc/codecs/Makefile | 2 + sound/soc/codecs/spdif_transciever.c | 69 ++++++++++++++++++++++++++++++++++ sound/soc/codecs/spdif_transciever.h | 17 ++++++++ 4 files changed, 92 insertions(+), 0 deletions(-) create mode 100644 sound/soc/codecs/spdif_transciever.c create mode 100644 sound/soc/codecs/spdif_transciever.h
sound/soc/codecs/Kconfig +4 -0
@@ -18,6 +18,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_AK4535 if I2C select SND_SOC_CS4270 if I2C select SND_SOC_PCM3008 + select SND_SOC_SPDIF select SND_SOC_SSM2602 if I2C select SND_SOC_STAC9766 if SND_SOC_AC97_BUS select SND_SOC_TLV320AIC23 if I2C
@@ -91,6 +92,9 @@ config SND_SOC_L3 config SND_SOC_PCM3008 tristate +config SND_SOC_SPDIF + tristate + config SND_SOC_SSM2602 tristate
sound/soc/codecs/Makefile +2 -0
@@ -6,6 +6,7 @@ snd-soc-ak4535-objs := ak4535.o snd-soc-cs4270-objs := cs4270.o snd-soc-l3-objs := l3.o snd-soc-pcm3008-objs := pcm3008.o +snd-soc-spdif-objs := spdif_transciever.o snd-soc-ssm2602-objs := ssm2602.o snd-soc-stac9766-objs := stac9766.o snd-soc-tlv320aic23-objs := tlv320aic23.o
@@ -42,6 +43,7 @@ obj-$(CONFIG_SND_SOC_AK4535) += snd-soc-ak4535.o obj-$(CONFIG_SND_SOC_CS4270) += snd-soc-cs4270.o obj-$(CONFIG_SND_SOC_L3) += snd-soc-l3.o obj-$(CONFIG_SND_SOC_PCM3008) += snd-soc-pcm3008.o +obj-$(CONFIG_SND_SOC_SPDIF) += snd-soc-spdif.o obj-$(CONFIG_SND_SOC_SSM2602) += snd-soc-ssm2602.o obj-$(CONFIG_SND_SOC_STAC9766) += snd-soc-stac9766.o obj-$(CONFIG_SND_SOC_TLV320AIC23) += snd-soc-tlv320aic23.o
sound/soc/codecs/spdif_transciever.c new file +69 -0
69 lines not on this page · raw message
sound/soc/codecs/spdif_transciever.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* ALSA SoC DIT/DIR driver header +* +* Author: Steve Chen, <[email protected]> +* Copyright: (C) 2008 MontaVista Software, Inc., <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef CODEC_STUBS_H +#define CODEC_STUBS_H + +extern struct snd_soc_dai dit_stub_dai; + +#endif /* CODEC_STUBS_H */
Signature · 1 line
1.5.6
sound/soc/codecs/spdif_transciever.c line 40
Quoted 4 lines · Chaithrika U S
sound/soc/codecs/spdif_transciever.c new file +4
-0+static int spdif_dit_probe (struct platform_device *pdev) +{ +return snd_soc_register_dai (&dit_stub_dai); +}
This driver is good except that the DAI should have ->dev filled in with the struct device for the platform device. I'll apply the patch and fix this myself, no need to resubmit.
Thanks!