Skip to contentSkip to conversation

asoc: add sport driver for bf6xx soc

PATCH Applied Scott Jiang 3 participants 4 messages Jun 20, 2012 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH v2 2/2 asoc: add i2s dai driver for bf6xx soc

In reply to Scott Jiang

This driver enables i2s mode support on blackfin bf6xx platform. We reuse bf5xx-i2s-pcm.c as its i2s pcm driver because it's the same for both bf5xx and bf6xx soc.

---
 sound/soc/blackfin/Kconfig     |   11 ++-
 sound/soc/blackfin/Makefile    |    2 +
 sound/soc/blackfin/bf6xx-i2s.c |  234 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 244 insertions(+), 3 deletions(-)
 create mode 100644 sound/soc/blackfin/bf6xx-i2s.c
sound/soc/blackfin/Kconfig +8 -3
index 0374a39..16b88f5 100644
@@ -10,12 +10,14 @@ config SND_BF5XX_I2S
 	  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"
+	tristate "SoC SSM2602 Audio Codec Add-On Card support"
 	depends on SND_BF5XX_I2S && (SPI_MASTER || I2C)
-	select SND_BF5XX_SOC_I2S
+	select SND_BF5XX_SOC_I2S if !BF60x
+	select SND_BF6XX_SOC_I2S if BF60x
 	select SND_SOC_SSM2602
 	help
-	  Say Y if you want to add support for SoC audio on BF527-EZKIT.
+	  Say Y if you want to add support for the Analog Devices
+	  SSM2602 Audio Codec Add-On Card.
 
 config SND_SOC_BFIN_EVAL_ADAU1701
 	tristate "Support for the EVAL-ADAU1701MINIZ board on Blackfin eval boards"
@@ -169,6 +171,9 @@ config SND_BF6XX_SOC_SPORT
 config SND_BF5XX_SOC_I2S
 	tristate
 
+config SND_BF6XX_SOC_I2S
+	tristate
+
 config SND_BF5XX_SOC_TDM
 	tristate
 
sound/soc/blackfin/Makefile +2 -0
index 13b0922..6fea1f4 100644
@@ -6,6 +6,7 @@ snd-soc-bf5xx-sport-objs := bf5xx-sport.o
 snd-soc-bf6xx-sport-objs := bf6xx-sport.o
 snd-soc-bf5xx-ac97-objs := bf5xx-ac97.o
 snd-soc-bf5xx-i2s-objs := bf5xx-i2s.o
+snd-soc-bf6xx-i2s-objs := bf6xx-i2s.o
 snd-soc-bf5xx-tdm-objs := bf5xx-tdm.o
 
 obj-$(CONFIG_SND_BF5XX_AC97) += snd-bf5xx-ac97.o
@@ -15,6 +16,7 @@ obj-$(CONFIG_SND_BF5XX_SOC_SPORT) += snd-soc-bf5xx-sport.o
 obj-$(CONFIG_SND_BF6XX_SOC_SPORT) += snd-soc-bf6xx-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_BF6XX_SOC_I2S) += snd-soc-bf6xx-i2s.o
 obj-$(CONFIG_SND_BF5XX_SOC_TDM) += snd-soc-bf5xx-tdm.o
 
 # Blackfin Machine Support
sound/soc/blackfin/bf6xx-i2s.c new file +234 -0

234 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#0 lore raw

PATCH v2 1/2 asoc: add sport driver for bf6xx soc

The SPORT(Serial Port) module on bf6xx soc has a totally different ip comparing to bf5xx soc. An individual SPORT module consists of two independently configurable SPORT halves with identical functionality. Each SPORT half can be configured for either transmitter or receiver.

---
 sound/soc/blackfin/Kconfig       |   10 +-
 sound/soc/blackfin/Makefile      |    2 +
 sound/soc/blackfin/bf6xx-sport.c |  422 ++++++++++++++++++++++++++++++++++++++
 sound/soc/blackfin/bf6xx-sport.h |   82 ++++++++
 4 files changed, 513 insertions(+), 3 deletions(-)
 create mode 100644 sound/soc/blackfin/bf6xx-sport.c
 create mode 100644 sound/soc/blackfin/bf6xx-sport.h
sound/soc/blackfin/Kconfig +7 -3
index 9f6bc55..0374a39 100644
@@ -1,7 +1,8 @@
 config SND_BF5XX_I2S
-	tristate "SoC I2S Audio for the ADI BF5xx chip"
+	tristate "SoC I2S Audio for the ADI Blackfin chip"
 	depends on BLACKFIN
-	select SND_BF5XX_SOC_SPORT
+	select SND_BF5XX_SOC_SPORT if !BF60x
+	select SND_BF6XX_SOC_SPORT if BF60x
 	help
 	  Say Y or M if you want to add support for codecs attached to
 	  the Blackfin SPORT (synchronous serial ports) interface in I2S
@@ -162,6 +163,9 @@ config SND_BF5XX_SOC_AD1980
 config SND_BF5XX_SOC_SPORT
 	tristate
 
+config SND_BF6XX_SOC_SPORT
+	tristate
+
 config SND_BF5XX_SOC_I2S
 	tristate
 
@@ -173,7 +177,7 @@ config SND_BF5XX_SOC_AC97
 
 config SND_BF5XX_SPORT_NUM
 	int "Set a SPORT for Sound chip"
-	depends on (SND_BF5XX_I2S || SND_BF5XX_AC97 || SND_BF5XX_TDM)
+	depends on (SND_BF5XX_SOC_SPORT || SND_BF6XX_SOC_SPORT)
 	range 0 3 if BF54x
 	range 0 1 if !BF54x
 	default 0
sound/soc/blackfin/Makefile +2 -0
index 1bf86cc..13b0922 100644
@@ -3,6 +3,7 @@ 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-bf6xx-sport-objs := bf6xx-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
@@ -11,6 +12,7 @@ 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_BF6XX_SOC_SPORT) += snd-soc-bf6xx-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
sound/soc/blackfin/bf6xx-sport.c new file +422 -0

422 lines not on this page · raw message

sound/soc/blackfin/bf6xx-sport.h new file +82 -0

82 lines not on this page · raw message

Signature · 1 line
1.7.0.4
Applied
#4 lore raw
In reply to a message not in the archive

On Wed, Jun 20, 2012 at 05:00:30PM -0400, Scott Jiang wrote:

Applied, thanks. There is one minor fixup below - please send an incremental patch for that.

Quoted 4 lines

The SPORT(Serial Port) module on bf6xx soc has a totally different ip comparing to bf5xx soc. An individual SPORT module consists of two independently configurable SPORT halves with identical functionality. Each SPORT half can be configured for either transmitter or receiver.

Please take more care with the formatting of your changelogs, they should be wrapped to within 80 columns and the subject line should correspond to the subsystem style. I reflowed.

sound/soc/blackfin/bf6xx-sport.c line 261

Quoted 9 lines
sound/soc/blackfin/bf6xx-sport.c new file +9 -0
+static irqreturn_t sport_err_irq(int irq, void *dev_id)
+{
+	struct sport_device *sport = dev_id;
+	struct device *dev = &sport->pdev->dev;
+
+	if (sport->tx_regs->spctl & SPORT_CTL_DERRPRI)
+		dev_dbg(dev, "sport error: TUVF\n");
+	if (sport->rx_regs->spctl & SPORT_CTL_DERRPRI)
+		dev_dbg(dev, "sport error: ROVF\n");

These should be dev_err() not dev_dbg() - they're errors.

_______________________________________________
Uclinux-dist-devel mailing list Uclinux-dist-devel-ZG0+EudsQA8dtHy/[email protected]
https://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel

Applied
#2 lore raw

Re: [PATCH 2/2 v2] asoc: add i2s dai driver for bf6xx soc

In reply to Scott Jiang
Quoted 3 lines · Scott Jiang

This driver enables i2s mode support on blackfin bf6xx platform. We reuse bf5xx-i2s-pcm.c as its i2s pcm driver because it's the same for both bf5xx and bf6xx soc.

Applied, thanks.