Skip to contentSkip to conversation

ASoC: Add ADAU1701 codec driver

PATCH Superseded Lars-Peter Clausen 3 participants 6 messages Jun 13, 2011 – Jun 17, 2011

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Lars-Peter Clausen

author maintainer
#0 lore raw

PATCH v2 1/3 ASoC: Add ADAU1701 codec driver

This patch adds support for the Analog Devices ADAU1701 SigmaDSP.

---
Changes since v1:
Move the error message for unsupported register addresses to adau1701_register_size.

---
 sound/soc/codecs/Kconfig    |    7 +-
 sound/soc/codecs/Makefile   |    2 +
 sound/soc/codecs/adau1701.c |  548 +++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/adau1701.h |   17 ++
 4 files changed, 573 insertions(+), 1 deletions(-)
 create mode 100644 sound/soc/codecs/adau1701.c
 create mode 100644 sound/soc/codecs/adau1701.h
sound/soc/codecs/Kconfig +6 -1
index 98175a0..f745e55 100644
@@ -17,6 +17,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_AD193X if SND_SOC_I2C_AND_SPI
 	select SND_SOC_AD1980 if SND_SOC_AC97_BUS
 	select SND_SOC_AD73311
+	select SND_SOC_ADAU1701 if I2C
 	select SND_SOC_ADS117X
 	select SND_SOC_AK4104 if SPI_MASTER
 	select SND_SOC_AK4535 if I2C
@@ -130,7 +131,11 @@ config SND_SOC_AD1980
 
 config SND_SOC_AD73311
 	tristate
-	
+
+config SND_SOC_ADAU1701
+	select SIGMA
+	tristate
+
 config SND_SOC_ADS117X
 	tristate
 
sound/soc/codecs/Makefile +2 -0
index fd85584..30a4c63 100644
@@ -4,6 +4,7 @@ snd-soc-ad1836-objs := ad1836.o
 snd-soc-ad193x-objs := ad193x.o
 snd-soc-ad1980-objs := ad1980.o
 snd-soc-ad73311-objs := ad73311.o
+snd-soc-adau1701-objs := adau1701.o
 snd-soc-ads117x-objs := ads117x.o
 snd-soc-ak4104-objs := ak4104.o
 snd-soc-ak4535-objs := ak4535.o
@@ -95,6 +96,7 @@ obj-$(CONFIG_SND_SOC_AD1836)	+= snd-soc-ad1836.o
 obj-$(CONFIG_SND_SOC_AD193X)	+= snd-soc-ad193x.o
 obj-$(CONFIG_SND_SOC_AD1980)	+= snd-soc-ad1980.o
 obj-$(CONFIG_SND_SOC_AD73311) += snd-soc-ad73311.o
+obj-$(CONFIG_SND_SOC_ADAU1701)  += snd-soc-adau1701.o
 obj-$(CONFIG_SND_SOC_ADS117X)	+= snd-soc-ads117x.o
 obj-$(CONFIG_SND_SOC_AK4104)	+= snd-soc-ak4104.o
 obj-$(CONFIG_SND_SOC_AK4535)	+= snd-soc-ak4535.o
sound/soc/codecs/adau1701.c new file +548 -0

548 lines not on this page · raw message

sound/soc/codecs/adau1701.h new file +17 -0
new file mode 100644
index 0000000..8d0949a
@@ -0,0 +1,17 @@
+/*
+ * header file for ADAU1701 SigmaDSP processor
+ *
+ * Copyright 2011 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef _ADAU1701_H
+#define _ADAU1701_H
+
+enum adau1701_clk_src {
+	ADAU1701_CLK_SRC_OSC,
+	ADAU1701_CLK_SRC_MCLK,
+};
+
+#endif
Signature · 1 line
1.7.2.5
author maintainer
#1 lore raw

PATCH 3/3 Blackfin: bf537: Stamp: Register adau1701 codec and ASoC machine driver

---
 arch/blackfin/mach-bf537/boards/stamp.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
arch/blackfin/mach-bf537/boards/stamp.c +17 -0
index 76db1d4..95a8260 100644
@@ -2390,6 +2390,11 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
 		I2C_BOARD_INFO("adau1361", 0x38),
 	},
 #endif
+#if defined(CONFIG_SND_SOC_ADAU1701) || defined(CONFIG_SND_SOC_ADAU1701_MODULE)
+	{
+		I2C_BOARD_INFO("adau1701", 0x34),
+	},
+#endif
 #if defined(CONFIG_AD525X_DPOT) || defined(CONFIG_AD525X_DPOT_MODULE)
 	{
 		I2C_BOARD_INFO("ad5258", 0x18),
@@ -2760,6 +2765,13 @@ static struct platform_device iio_gpio_trigger = {
 };
 #endif
 
+#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \
+	defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE)
+static struct platform_device bf5xx_adau1701_device = {
+	.name = "bfin-eval-adau1701",
+};
+#endif
+
 static struct platform_device *stamp_devices[] __initdata = {
 
 	&bfin_dpmc,
@@ -2914,6 +2926,11 @@ static struct platform_device *stamp_devices[] __initdata = {
 	defined(CONFIG_IIO_GPIO_TRIGGER_MODULE)
 	&iio_gpio_trigger,
 #endif
+
+#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \
+	defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE)
+	&bf5xx_adau1701_device,
+#endif
 };
 
 static int __init stamp_init(void)
Signature · 1 line
1.7.2.5
author maintainer
#2 lore raw

PATCH v2 2/3 ASoC: Blackfin: Add bf5xx-adau1701 machine driver

In reply to Lars-Peter Clausen

Add a machine driver to support the ADAU1701 SigmaDSP processors on Analog Devices BF5XX evaluation boards.

---
Changes since v1:
* Renamed the module to bfin-eval-adau1701.
* Added eval board specific speaker and line widgets.
* Reworked the Kconfig text to make it more clear that this driver is for the adau1701 eval board.

---
 sound/soc/blackfin/Kconfig              |   11 +++
 sound/soc/blackfin/Makefile             |    2 +
 sound/soc/blackfin/bfin-eval-adau1701.c |  139 +++++++++++++++++++++++++++++++
 3 files changed, 152 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/blackfin/bfin-eval-adau1701.c
sound/soc/blackfin/Kconfig +11 -0
index ae40359..dcac889 100644
@@ -17,6 +17,17 @@ config SND_BF5XX_SOC_SSM2602
 	help
 	  Say Y if you want to add support for SoC audio on BF527-EZKIT.
 
+config SND_SOC_BFIN_EVAL_ADAU1701
+	tristate "Support for the EVAL-ADAU1701MINIZ board on Blackfin eval boards"
+	depends on SND_BF5XX_I2S
+	select SND_BF5XX_SOC_I2S
+	select SND_SOC_ADAU1701
+	select I2C
+	help
+	  Say Y if you want to add support for the Analog Devices EVAL-ADAU1701MINIZ
+	  board connected to one of the Blackfin evaluation boards like the
+	  BF5XX-STAMP or BF5XX-EZKIT.
+
 config SND_BF5XX_SOC_AD73311
 	tristate "SoC AD73311 Audio support for Blackfin"
 	depends on SND_BF5XX_I2S
sound/soc/blackfin/Makefile +2 -0
index 49af3f3..f01bff6 100644
@@ -21,9 +21,11 @@ snd-ad1980-objs := bf5xx-ad1980.o
 snd-ssm2602-objs := bf5xx-ssm2602.o
 snd-ad73311-objs := bf5xx-ad73311.o
 snd-ad193x-objs := bf5xx-ad193x.o
+snd-soc-bfin-eval-adau1701-objs := bfin-eval-adau1701.o
 
 obj-$(CONFIG_SND_BF5XX_SOC_AD1836) += snd-ad1836.o
 obj-$(CONFIG_SND_BF5XX_SOC_AD1980) += snd-ad1980.o
 obj-$(CONFIG_SND_BF5XX_SOC_SSM2602) += snd-ssm2602.o
 obj-$(CONFIG_SND_BF5XX_SOC_AD73311) += snd-ad73311.o
 obj-$(CONFIG_SND_BF5XX_SOC_AD193X) += snd-ad193x.o
+obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) += snd-soc-bfin-eval-adau1701.o
sound/soc/blackfin/bfin-eval-adau1701.c new file +139 -0

139 lines not on this page · raw message

Signature · 1 line
1.7.2.5
#3 lore raw

Re: [PATCH 2/3 v2] ASoC: Blackfin: Add bf5xx-adau1701 machine driver

Quoted 1 line · Lars-Peter Clausen

+static int bfin_eval_adau1701_probe(struct platform_device *pdev)

__devinit

seems all of the Blackfin machine drivers could use this fix ... -mike

Acked-by on v2 1/3
#4 lore raw
In reply to Lars-Peter Clausen
Quoted 8 lines · Lars-Peter Clausen

This patch adds support for the Analog Devices ADAU1701 SigmaDSP.

---
Changes since v1:
Move the error message for unsupported register addresses to adau1701_register_size.

Quoted 8 lines
---
 sound/soc/codecs/Kconfig    |    7 +-
 sound/soc/codecs/Makefile   |    2 +
 sound/soc/codecs/adau1701.c |  548 +++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/adau1701.h |   17 ++
 4 files changed, 573 insertions(+), 1 deletions(-)
 create mode 100644 sound/soc/codecs/adau1701.c
 create mode 100644 sound/soc/codecs/adau1701.h

Patches 1 & 2