Skip to contentSkip to conversation

Audio support for Simtec Hermes

PATCH Ben Dooks 2 participants 2 messages Aug 6, 2009 – Aug 7, 2009

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

Add support for the TLV320AIC33 codec on the Simtec Hermes board, using the core work done for the TLV320AIC23 codecs.

---
 sound/soc/s3c24xx/Kconfig                 |    7 +
 sound/soc/s3c24xx/Makefile                |    3 
 sound/soc/s3c24xx/s3c24xx_simtec_hermes.c |  151 ++++++++++++++++++++++++++++++
 3 files changed, 161 insertions(+)
sound/soc/s3c24xx/Kconfig +7 -0
Index: b/sound/soc/s3c24xx/Kconfig
===================================================================
@@ -127,3 +127,10 @@ config SND_S3C24XX_SOC_SIMTEC_TLV320AIC2
 	select SND_S3C24XX_SOC_I2S
 	select SND_SOC_TLV320AIC23
 	select SND_S3C24XX_SOC_SIMTEC
+
+config SND_S3C24XX_SOC_SIMTEC_HERMES
+	tristate "SoC I2S Audio support for Simtec Hermes board"
+	depends on SND_S3C24XX_SOC
+	select SND_S3C24XX_SOC_I2S
+	select SND_SOC_TLV320AIC3X
+	select SND_S3C24XX_SOC_SIMTEC
sound/soc/s3c24xx/s3c24xx_simtec_hermes.c new file +151 -0

151 lines not on this page · raw message

sound/soc/s3c24xx/Makefile +3 -0
Index: b/sound/soc/s3c24xx/Makefile
===================================================================
@@ -24,6 +24,7 @@ snd-soc-ln2440sbc-alc650-objs := ln2440s
 snd-soc-neo1973-gta02-wm8753-objs := neo1973_gta02_wm8753.o
 snd-soc-s3c24xx-uda134x-objs := s3c24xx_uda134x.o
 snd-soc-s3c24xx-simtec-objs := s3c24xx_simtec.o
+snd-soc-s3c24xx-simtec-hermes-objs := s3c24xx_simtec_hermes.o
 snd-soc-s3c24xx-simtec-tlv320aic23-objs := s3c24xx_simtec_tlv320aic23.o
 
 obj-$(CONFIG_SND_S3C24XX_SOC_JIVE_WM8750) += snd-soc-jive-wm8750.o
@@ -36,4 +37,6 @@ obj-$(CONFIG_SND_S3C24XX_SOC_LN2440SBC_A
 obj-$(CONFIG_SND_S3C24XX_SOC_NEO1973_GTA02_WM8753) += snd-soc-neo1973-gta02-wm8753.o
 obj-$(CONFIG_SND_S3C24XX_SOC_S3C24XX_UDA134X) += snd-soc-s3c24xx-uda134x.o
 obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC) += snd-soc-s3c24xx-simtec.o
+obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC_HERMES) += snd-soc-s3c24xx-simtec-hermes.o
 obj-$(CONFIG_SND_S3C24XX_SOC_SIMTEC_TLV320AIC23) += snd-soc-s3c24xx-simtec-tlv320aic23.o
+
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/)

  'a smiley only costs 4 bytes'
#1 lore raw

sound/soc/s3c24xx/s3c24xx_simtec_hermes.c line 63

Quoted 3 lines · Ben Dooks
sound/soc/s3c24xx/s3c24xx_simtec_hermes.c new file +3 -0
+
+	/* Speaker is connected to LINEOUT{LN,LP,RN,RP} */
+};

Missing routes? The comment should at least be a bit clearer about why they're not there.

sound/soc/s3c24xx/s3c24xx_simtec_hermes.c line 82

Quoted 4 lines
sound/soc/s3c24xx/s3c24xx_simtec_hermes.c new file +4 -0
+	snd_soc_dapm_enable_pin(codec, "Headphone Jack");
+	snd_soc_dapm_enable_pin(codec, "Line In");
+	snd_soc_dapm_enable_pin(codec, "Line Out");
+	snd_soc_dapm_enable_pin(codec, "Mic Jack");

This is not required since pins are enabled by default but it's OK to leave this here for documentation.

sound/soc/s3c24xx/s3c24xx_simtec_hermes.c line 94

Quoted 5 lines
sound/soc/s3c24xx/s3c24xx_simtec_hermes.c new file +5 -0
+static struct aic3x_setup_data codec_setup = {
+	.i2c_bus	= 0,
+	.i2c_already	= 1,
+};
+

This patch should have been submitted after your previous patch to the CODEC driver since it depends on it.

sound/soc/s3c24xx/s3c24xx_simtec_hermes.c line 122

Quoted 5 lines
sound/soc/s3c24xx/s3c24xx_simtec_hermes.c new file +5 -0
+static int __devinit simtec_audio_hermes_probe(struct platform_device *pd)
+{
+	dev_info(&pd->dev, "probing....\n");
+	return simtec_audio_core_probe(pd, &simtec_snd_devdata_aic33);
+}

Please remove the printk() here.