Skip to contentSkip to conversation

ad1938 dai and board driver clean-up according to feedback

PATCH In review Barry Song 3 participants 5 messages Jul 20, 2009

Subsystems (2)
lore
Share & tools
lore

Barry Song

author
#0 lore raw

cover ad1938 dai and board driver clean-up according to feedback

Hi Mark,
Update bf5xx-tdm dai(patch 1) and bf5xx-ad1938 machine(patch 2) drivers according to your feedback.
Thanks
Barry

author
#1 lore raw

PATCH 1/2 clean-up according to feedback

---
 sound/soc/blackfin/Kconfig         |   15 ++-
 sound/soc/blackfin/Makefile        |    4 +
 sound/soc/blackfin/bf5xx-tdm-pcm.c |  332 ++++++++++++++++++++++++++++++++++
 sound/soc/blackfin/bf5xx-tdm-pcm.h |   21 +++
 sound/soc/blackfin/bf5xx-tdm.c     |  342 ++++++++++++++++++++++++++++++++++++
 sound/soc/blackfin/bf5xx-tdm.h     |   14 ++
 6 files changed, 727 insertions(+), 1 deletions(-)
 create mode 100644 sound/soc/blackfin/bf5xx-tdm-pcm.c
 create mode 100644 sound/soc/blackfin/bf5xx-tdm-pcm.h
 create mode 100644 sound/soc/blackfin/bf5xx-tdm.c
 create mode 100644 sound/soc/blackfin/bf5xx-tdm.h
sound/soc/blackfin/Kconfig +14 -1
index 811596f..2ab6d2f 100644
@@ -7,6 +7,15 @@ config SND_BF5XX_I2S
 	  mode (supports single stereo In/Out).
 	  You will also need to select the audio interfaces to support below.
 
+config SND_BF5XX_TDM
+	tristate "SoC I2S(TDM mode) Audio for the ADI BF5xx chip"
+	depends on (BLACKFIN && SND_SOC)
+	help
+	  Say Y or M if you want to add support for codecs attached to
+	  the Blackfin SPORT (synchronous serial ports) interface in TDM
+	  mode.
+	  You will also need to select the audio interfaces to support below.
+
 config SND_BF5XX_SOC_SSM2602
 	tristate "SoC SSM2602 Audio support for BF52x ezkit"
 	depends on SND_BF5XX_I2S
@@ -69,6 +78,10 @@ config SND_BF5XX_SOC_I2S
 	tristate
 	select SND_BF5XX_SOC_SPORT
 
+config SND_BF5XX_SOC_TDM
+	tristate
+	select SND_BF5XX_SOC_SPORT
+
 config SND_BF5XX_SOC_AC97
 	tristate
 	select AC97_BUS
@@ -85,7 +98,7 @@ config SND_BF5XX_SOC_AD1980
 
 config SND_BF5XX_SPORT_NUM
 	int "Set a SPORT for Sound chip"
-	depends on (SND_BF5XX_I2S || SND_BF5XX_AC97)
+	depends on (SND_BF5XX_I2S || SND_BF5XX_AC97 || SND_BF5XX_TDM)
 	range 0 3 if BF54x
 	range 0 1 if !BF54x
 	default 0
sound/soc/blackfin/Makefile +4 -0
index 97bb37a..f861926 100644
@@ -1,15 +1,19 @@
 # Blackfin Platform Support
 snd-bf5xx-ac97-objs := bf5xx-ac97-pcm.o
 snd-bf5xx-i2s-objs := bf5xx-i2s-pcm.o
+snd-bf5xx-tdm-objs := bf5xx-tdm-pcm.o
 snd-soc-bf5xx-sport-objs := bf5xx-sport.o
 snd-soc-bf5xx-ac97-objs := bf5xx-ac97.o
 snd-soc-bf5xx-i2s-objs := bf5xx-i2s.o
+snd-soc-bf5xx-tdm-objs := bf5xx-tdm.o
 
 obj-$(CONFIG_SND_BF5XX_AC97) += snd-bf5xx-ac97.o
 obj-$(CONFIG_SND_BF5XX_I2S) += snd-bf5xx-i2s.o
+obj-$(CONFIG_SND_BF5XX_TDM) += snd-bf5xx-tdm.o
 obj-$(CONFIG_SND_BF5XX_SOC_SPORT) += snd-soc-bf5xx-sport.o
 obj-$(CONFIG_SND_BF5XX_SOC_AC97) += snd-soc-bf5xx-ac97.o
 obj-$(CONFIG_SND_BF5XX_SOC_I2S) += snd-soc-bf5xx-i2s.o
+obj-$(CONFIG_SND_BF5XX_SOC_TDM) += snd-soc-bf5xx-tdm.o
 
 # Blackfin Machine Support
 snd-ad1980-objs := bf5xx-ad1980.o
sound/soc/blackfin/bf5xx-tdm-pcm.c new file +332 -0

332 lines not on this page · raw message

sound/soc/blackfin/bf5xx-tdm-pcm.h new file +21 -0
new file mode 100644
index 0000000..493e6df
@@ -0,0 +1,21 @@
+/*
+ * linux/sound/arm/bf5xx-tdm-pcm.h -- ALSA PCM interface for the Blackfin
+ *
+ * Copyright 2009 Analog Device Inc.
+ *
+ * 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 _BF5XX_TDM_PCM_H
+#define _BF5XX_TDM_PCM_H
+
+struct bf5xx_pcm_dma_params {
+	char *name;			/* stream identifier */
+};
+
+/* platform data */
+extern struct snd_soc_platform bf5xx_tdm_soc_platform;
+
+#endif
sound/soc/blackfin/bf5xx-tdm.c new file +342 -0

342 lines not on this page · raw message

sound/soc/blackfin/bf5xx-tdm.h new file +14 -0
new file mode 100644
index 0000000..e5157cd
@@ -0,0 +1,14 @@
+/*
+ * linux/sound/arm/bf5xx-i2s.h
+ *
+ * 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 _BF5XX_TDM_H
+#define _BF5XX_TDM_H
+
+extern struct snd_soc_dai bf5xx_tdm_dai;
+
+#endif
Signature · 1 line
1.5.6.3
#2 lore raw

Re: [PATCH 1/2] clean-up according to feedback

At Mon, 20 Jul 2009 18:28:03 +0800,

Quoted 2 lines · Barry Song

Could you give a proper changelog and subject lines at each post please? Both are very important for later reviews.

thanks,

Takashi

#3 lore raw

Re: [PATCH 1/2] clean-up according to feedback

Quoted 6 lines · Takashi Iwai
Quoted 1 line · Barry Song

Could you give a proper changelog and subject lines at each post please? Both are very important for later reviews.

Yes, please. If you could also answer the questions I asked about why you're creating a new DAI that'd be helpful.

author
#4 lore raw

PATCH 2/2 clean-up according to feedback

In reply to Barry Song
---
 sound/soc/blackfin/Kconfig        |    8 ++
 sound/soc/blackfin/Makefile       |    2 +
 sound/soc/blackfin/bf5xx-ad1938.c |  142 +++++++++++++++++++++++++++++++++++++
 3 files changed, 152 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/blackfin/bf5xx-ad1938.c
sound/soc/blackfin/Kconfig +8 -0
index 2ab6d2f..8a4de4d 100644
@@ -96,6 +96,14 @@ config SND_BF5XX_SOC_AD1980
 	help
 	  Say Y if you want to add support for SoC audio on BF5xx STAMP/EZKIT.
 
+config SND_BF5XX_SOC_AD1938
+        tristate "SoC AD1938 Audio support for Blackfin"
+        depends on SND_BF5XX_TDM
+        select SND_BF5XX_SOC_TDM
+        select SND_SOC_AD1938
+        help
+          Say Y if you want to add support for AD1938 codec on Blackfin.
+
 config SND_BF5XX_SPORT_NUM
 	int "Set a SPORT for Sound chip"
 	depends on (SND_BF5XX_I2S || SND_BF5XX_AC97 || SND_BF5XX_TDM)
sound/soc/blackfin/Makefile +2 -0
index f861926..f4d7607 100644
@@ -19,7 +19,9 @@ obj-$(CONFIG_SND_BF5XX_SOC_TDM) += snd-soc-bf5xx-tdm.o
 snd-ad1980-objs := bf5xx-ad1980.o
 snd-ssm2602-objs := bf5xx-ssm2602.o
 snd-ad73311-objs := bf5xx-ad73311.o
+snd-ad1938-objs := bf5xx-ad1938.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_AD1938) += snd-ad1938.o
sound/soc/blackfin/bf5xx-ad1938.c new file +142 -0

142 lines not on this page · raw message

Signature · 1 line
1.5.6.3