Skip to contentSkip to conversation

new ad1836 codec driver based on asoc

PATCH In review Barry Song 2 participants 2 messages Aug 13, 2009

Subsystems (3)
lore
Share & tools
lore

Barry Song

author
#0 lore raw

PATCH v2 1/3 new ad1836 codec driver based on asoc

There has been an ad1836 driver in sound/blackfin based on traditional alsa. The new driver is based on asoc. The architecture of ad1836 codec driver is very much like ad1938.

---
 sound/soc/codecs/Kconfig  |    3 +
 sound/soc/codecs/Makefile |    2 +
 sound/soc/codecs/ad1836.c |  451 +++++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/ad1836.h |   64 +++++++
 4 files changed, 520 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/codecs/ad1836.c
 create mode 100644 sound/soc/codecs/ad1836.h
sound/soc/codecs/Kconfig +3 -0
index 31a6d21..05e2279 100644
@@ -68,6 +68,9 @@ config SND_SOC_AC97_CODEC
 	tristate
 	select SND_AC97_CODEC
 
+config SND_SOC_AD1836
+	tristate
+
 config SND_SOC_AD1938
 	tristate
 
sound/soc/codecs/Makefile +2 -0
index 78dce5d..9cbcf8f 100644
@@ -1,4 +1,5 @@
 snd-soc-ac97-objs := ac97.o
+snd-soc-ad1836-objs := ad1836.o
 snd-soc-ad1938-objs := ad1938.o
 snd-soc-ad1980-objs := ad1980.o
 snd-soc-ad73311-objs := ad73311.o
@@ -45,6 +46,7 @@ snd-soc-wm9713-objs := wm9713.o
 snd-soc-max9877-objs := max9877.o
 
 obj-$(CONFIG_SND_SOC_AC97_CODEC)	+= snd-soc-ac97.o
+obj-$(CONFIG_SND_SOC_AD1836)	+= snd-soc-ad1836.o
 obj-$(CONFIG_SND_SOC_AD1938)	+= snd-soc-ad1938.o
 obj-$(CONFIG_SND_SOC_AD1980)	+= snd-soc-ad1980.o
 obj-$(CONFIG_SND_SOC_AD73311) += snd-soc-ad73311.o
sound/soc/codecs/ad1836.c new file +451 -0

451 lines not on this page · raw message

sound/soc/codecs/ad1836.h new file +64 -0

64 lines not on this page · raw message

Signature · 1 line
1.5.6.3
#1 lore raw
Quoted 5 lines · Barry Song

There has been an ad1836 driver in sound/blackfin based on traditional alsa. The new driver is based on asoc. The architecture of ad1836 codec driver is very much like ad1938.

This is pretty much there - the issues below are very small so I'll apply this and fix up everything except the driver name as I do.

sound/soc/codecs/Kconfig config SND_SOC_AC97_CODEC · line 75

Quoted 11 lines
sound/soc/codecs/Kconfig +3 -0
@@ -68,6 +68,9 @@ config SND_SOC_AC97_CODEC
 	tristate
 	select SND_AC97_CODEC
 
+config SND_SOC_AD1836
+	tristate
+
 config SND_SOC_AD1938
 	tristate

Sorry, missed this first time round - this should also add to SND_SOC_ALL_CODECS.

sound/soc/codecs/Kconfig config SND_SOC_AC97_CODEC

Quoted 3 lines
sound/soc/codecs/Kconfig +3 -0
+static struct spi_driver ad1836_spi_driver = {
+	.driver = {
+		.name	= "ad1836-spi",

I thought the conclusion from the discussion earlier was that this should have the -spi dropped (or did that discussion cross in the post with the patch)?

sound/soc/codecs/Kconfig

Quoted 8 lines
sound/soc/codecs/Kconfig +8 -0
+struct snd_soc_codec_device soc_codec_dev_ad1836 = {
+	.probe = 	ad1836_probe,
+	.remove = 	ad1836_remove,
+	/* The power management of ad1836 is very simple. There are
+	 * only adc&dac 2 components to control. Dapm handles them.
+	 */
+	.suspend =      NULL,
+	.resume =       NULL,

I'll remove the suspend/resume methods here.