JIVE: Add ASoC audio support
Add support for the Jive's WM8750 codec attached
to the S3C2412 IIS controller.
sound/soc/s3c24xx/Kconfig +9 -0
@@ -28,6 +28,15 @@ config SND_S3C24XX_SOC_NEO1973_WM8753 Say Y if you want to add support for SoC audio on smdk2440 with the WM8753. +config SND_S3C24XX_SOC_JIVE_WM8750 + tristate "SoC I2S Audio support for Jive" + depends on SND_S3C24XX_SOC && MACH_JIVE + select SND_SOC_WM8750 + select SND_SOC_WM8750_SPI + select SND_S3C2412_SOC_I2S + help + Sat Y if you want to add support for SoC audio on the Jive. + config SND_S3C24XX_SOC_SMDK2443_WM9710 tristate "SoC AC97 Audio support for SMDK2443 - WM9710" depends on SND_S3C24XX_SOC && MACH_SMDK2443
sound/soc/s3c24xx/Makefile +2 -0
@@ -10,10 +10,12 @@ obj-$(CONFIG_SND_S3C2443_SOC_AC97) += sn obj-$(CONFIG_SND_S3C2412_SOC_I2S) += snd-soc-s3c2412-i2s.o # S3C24XX Machine Support +snd-soc-jive-wm8750-objs := jive_wm8750.o snd-soc-neo1973-wm8753-objs := neo1973_wm8753.o snd-soc-smdk2443-wm9710-objs := smdk2443_wm9710.o snd-soc-ln2440sbc-alc650-objs := ln2440sbc_alc650.o +obj-$(CONFIG_SND_S3C24XX_SOC_JIVE_WM8750) += snd-soc-jive-wm8750.o obj-$(CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753) += snd-soc-neo1973-wm8753.o obj-$(CONFIG_SND_S3C24XX_SOC_SMDK2443_WM9710) += snd-soc-smdk2443-wm9710.o obj-$(CONFIG_SND_S3C24XX_SOC_LN2440SBC_ALC650) += snd-soc-ln2440sbc-alc650.o
sound/soc/s3c24xx/jive_wm8750.c new file +266 -0
266 lines not on this page · raw message
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/) 'a smiley only costs 4 bytes'
On Mon, Jun 23, 2008 at 12:54:23PM +0100, Ben Dooks wrote:
This looks mostly good - a few nits:
sound/soc/s3c24xx/jive_wm8750.c line 1
Quoted 4 lines
sound/soc/s3c24xx/jive_wm8750.c new file +1
-0@@ -0,0 +1,266 @@ +/* sound/soc/s3c24xx/jive_wm8705.c
Typo :)
sound/soc/s3c24xx/jive_wm8750.c line 69
Quoted 5 lines
sound/soc/s3c24xx/jive_wm8750.c new file +5
-0+static inline int codec_set_dai_fmt (struct snd_soc_codec_dai *dai, +unsigned int format) +{ +return dai->dai_ops.set_fmt (dai, format); +}
These functions are a good idea - the equivalents are already in ASoC v2 but haven't been backported into mainline yet - but they should be in the ASoC core rather than in a machine driver. Please either remove them or integrate them into the core (obviously the latter would be nice but the former is less work).
sound/soc/s3c24xx/jive_wm8750.c line 165
Quoted 3 lines
sound/soc/s3c24xx/jive_wm8750.c new file +3
-0+static const struct snd_kcontrol_new wm8750_jive_controls[] = { + +};
This (and the code to process it) could go since it's empty.
sound/soc/s3c24xx/jive_wm8750.c line 190
Quoted 5 lines
sound/soc/s3c24xx/jive_wm8750.c new file +5
-0+ +/* Add jive specific widgets */ +for (i =0 ; i <ARRAY_SIZE (wm8750_dapm_widgets); i++) { +snd_soc_dapm_new_control (codec, &wm8750_dapm_widgets[i]); + }
These should all be updated to use the new bulk registration APIs (these were added to the ASoC core this year, after the driver appears to have been written). Here the equivalent is snd_soc_dapm_new_controls().
sound/soc/s3c24xx/jive_wm8750.c line 197
Quoted 6 lines
sound/soc/s3c24xx/jive_wm8750.c new file +6
-0+/* Set up jive specific audio path audio_map */ +for (i =0 ; audio_map[i][0 ] !=NULL ; i++) { +printk (KERN_INFO "mapping %s => %s\n" , audio_map[i][0 ], audio_map[i][1 ]); +snd_soc_dapm_connect_input (codec, audio_map[i][0 ],NULL , + audio_map[i][1 ]); + }
Here it's snd_soc_dapm_add_routes().
sound/soc/s3c24xx/jive_wm8750.c line 237
Quoted 5 lines
sound/soc/s3c24xx/jive_wm8750.c new file +5
-0+static int __init jive_init (void ) +{ +int ret; + +printk ("JIVE WM8750 Audio support\n" );
This should have a KERN_INFO?