Skip to contentSkip to conversation

blackfin TDM dai and blackfin-ad1938 machine driver

PATCH Applied Barry Song 2 participants 10 messages Jul 22, 2009 – Jul 28, 2009

Subsystems (2)
lore
Share & tools
lore

Barry Song

author
#0 lore raw

cover blackfin TDM dai and blackfin-ad1938 machine driver

Hi Mark,
The following two patches are the 2nd version for the "new support for ad1938 codec" patch sequence. Since you have applied the codec driver patch([PATCH 1/3] new ad1938 codec driver based on asoc), here I only send the DAI and Board driver patches again according to your feedback. Patch 1:
blackfin I2S(TDM mode) CPU DAI driver
Patch 2:
board driver to connect bf5xx with ad1938

Detailed description about every patch and changes is included in the corresponding patch.
Thanks
Barry

author
#1 lore raw

PATCH 1/2 blackfin I2S(TDM mode) CPU DAI driver

Even though TDM mode can be a part of I2S mode, we still split bf5xx i2s and bf5xx tdm into individual files sharing same I2S DAI type in SOC core. We don't define a new DAI type, but give two instances for standard I2S and TDM, both in I2S-family DAI type.
On the one hand, I2S and TDM means two completely different interface configuration to blackfin, results in completely different hardware configuration, DMA description and data transfer flow. Merging them as a whole will be very ugly and difficult to maintain.
On the other hand, hardware board connection decides the I2S/TDM mode directly. It's needless to switch between I2S and TDM dynamically. For TDM mode, board driver can refer to the TDM instance, for I2S mode, board driver can refer to the I2S instance. It will not cause trouble to descript the hardware interface with two instances and the board driver is simple and easy.

Changes from the last patch version include:
1. Fix checkpatch issues and code-style issues
2. Add codes for restoring the bf5xx_tdm.configured while all streams are closed
3. Change snd_soc_register_dai in bfin_tdm_init to platform driver and move resource related codes to platform probe

---
 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..9e8473d
@@ -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] blackfin I2S(TDM mode) CPU DAI driver

Quoted 4 lines · Barry Song

On the one hand, I2S and TDM means two completely different interface configuration to blackfin, results in completely different hardware configuration, DMA description and data transfer flow. Merging them as a whole will be very ugly and difficult to maintain.

I'm still a bit confused about why this is required - I'm not sure where the requirement for the changes in the DMA layout come from.

Looking at the code it appears that the main difference is that your TDM mode always configures the DMA layout for 8 channel blocks. This appears to be because the SPORT code requires that you specify the block size statically when you call sport_init(). Looking at the code it seems like the SPORT hardware is capable of changing the memory layout on the fly (at least, all this stuff appears to be written down by software at various points during setup so I'd expect it to be changable at runtime) and that the restrictions here are due to the SPORT API rather than the hardware itself?

If that is the case then would it not be better to refactor the SPORT API so that it is capable of changing the configuration on the fly and then update the existing I2S driver to be able to take advantage of that? This would reduce the amount of code duplication here and I'd expect it to also make things run more efficiently when less than 8 channels are in use in TDM mode.

Quoted 3 lines

On the other hand, hardware board connection decides the I2S/TDM mode directly. It's needless to switch between I2S and TDM dynamically. For TDM mode, board driver can refer to the TDM instance, for I2S mode,

Are you saying that a physically different SPORT or other hardware configuration on the CPU is required to use TDM mode? The impression given by the drivers has always been that this is some kind of generic synchronous serial port and the way the SPORT number is set up seems to support that. Could you go into more detail here, please - this would be a very unusual implementation decision for a CPU.

sound/soc/blackfin/bf5xx-tdm-pcm.c line 172

Quoted 6 lines
sound/soc/blackfin/bf5xx-tdm-pcm.c new file +6 -0
+	if (sport_handle != NULL)
+		runtime->private_data = sport_handle;
+	else {
+		pr_err("sport_handle is NULL\n");
+		return -1;
+	}

Should return a real error code here.

sound/soc/blackfin/bf5xx-tdm-pcm.c line 285

Quoted 3 lines
sound/soc/blackfin/bf5xx-tdm-pcm.c new file +3 -0
+int bf5xx_pcm_tdm_new(struct snd_card *card, struct snd_soc_dai *dai,
+	struct snd_pcm *pcm)
+{

This should be static; any functions that are exported via operations structures should be static.

Quoted 8 lines
sound/soc/blackfin/bf5xx-tdm.c new file +8 -0
+static int bf5xx_tdm_hw_params(struct snd_pcm_substream *substream,
+	struct snd_pcm_hw_params *params,
+	struct snd_soc_dai *dai)
+{
+	int ret = 0;
+
+	bf5xx_tdm.tcr2 &= ~0x1f;
+	bf5xx_tdm.rcr2 &= ~0x1f;

sound/soc/blackfin/bf5xx-tdm.c line 143

Quoted 10 lines
sound/soc/blackfin/bf5xx-tdm.c new file +10 -0
+	switch (params_format(params)) {
+	case SNDRV_PCM_FORMAT_S32_LE:
+		bf5xx_tdm.tcr2 |= 31;
+		bf5xx_tdm.rcr2 |= 31;
+		sport_handle->wdsize = 4;
+		break;
+		/* at present, we only support 32bit transfer */
+	default:
+		pr_err("not supported PCM format yet\n");
+		break;

This should return an error.

Quoted 7 lines
sound/soc/blackfin/bf5xx-tdm.c new file +7 -0
+static int __devinit bfin_tdm_probe(struct platform_device *pdev)
+{
+	int ret = 0;
+
+	if (peripheral_request_list(&sport_req[sport_num][0], "soc-audio")) {
+		pr_err("Requesting Peripherals failed\n");
+		return -EFAULT;

sound/soc/blackfin/bf5xx-tdm.c line 324

Quoted 10 lines
sound/soc/blackfin/bf5xx-tdm.c new file +9 -0
+	}
 
+static struct platform_driver bfin_tdm_driver = {
+	.probe  = bfin_tdm_probe,
+	.remove = __devexit_p(bfin_tdm_remove),
+	.driver = {
+		.name   = "bfin-sport",
+		.owner  = THIS_MODULE,
+	},
+};

This isn't a good name for the driver - all of the Blackfin CPU audio drivers and probably some others use a SPORT so the same driver name would apply for each of them. If more than one of these drivers chose the same name then you'd not be able to have both drivers in the kernel at once. The driver name should be something that's specific to the device you're trying to register, such as bfin-tdm.

author
#3 lore raw

Re: [PATCH 1/2] blackfin I2S(TDM mode) CPU DAI driver

Hi Mark,

2009/7/25 Mark Brown <[email protected]>:

Quoted 7 lines · Barry Song
Quoted 5 lines

On the one hand, I2S and TDM means two completely different interface configuration to blackfin, results in completely different hardware configuration, DMA description and data transfer flow. Merging them as a whole will be very ugly and difficult to maintain.

Quoted 5 lines

I'm still a bit confused about why this is required - I'm not sure where the requirement for the changes in the DMA layout come from.

Looking at the code it appears that the main difference is that your TDM mode always configures the DMA layout for 8 channel blocks.  This

I2S is not a special case of TDM with only left and right two slots for SPORT interface. I2S coordinates with TDM in SPORT, but not a part of TDM. TDM require different hardware configuration with I2S, not only different slot number.
One is "Stereo Serial Operation" mode of SPORT, the other one is "Multichannel Operation" mode. They are incompatible at the same time.

Quoted 8 lines

appears to be because the SPORT code requires that you specify the block size statically when you call sport_init().  Looking at the code it seems like the SPORT hardware is capable of changing the memory layout on the fly (at least, all this stuff appears to be written down by software at various points during setup so I'd expect it to be changable at runtime) and that the restrictions here are due to the SPORT API rather than the hardware itself?

Quoted 6 lines

If that is the case then would it not be better to refactor the SPORT API so that it is capable of changing the configuration on the fly and then update the existing I2S driver to be able to take advantage of that?  This would reduce the amount of code duplication here and I'd expect it to also make things run more efficiently when less than 8 channels are in use in TDM mode.

Mainly due to hardware, it's really difficult for us to control the memory layout on the fly. That causes much trouble in hardware and driver reliability. Datasheet claims DMA buffer should be fixed while SPORT is enabled, but also claims the layout may be changed while SPORT is disabled. So it's maybe possible for us to change the SPORT api to support the configuration on the fly with a SPORT shutdown, then i2s, tdm even ac97 can all use them to reduce the amount of code duplication. But it need much work on debugging and testing to make it work and reliable. So how about to patch it later as an individual project since the changes will involve sport, i2s, ac97 and tdm?

Quoted 11 lines
Quoted 4 lines

On the other hand, hardware board connection decides the I2S/TDM mode directly. It's needless to switch between I2S and TDM dynamically. For TDM mode, board driver can refer to the TDM instance, for I2S mode,

Are you saying that a physically different SPORT or other hardware configuration on the CPU is required to use TDM mode?  The impression given by the drivers has always been that this is some kind of generic synchronous serial port and the way the SPORT number is set up seems to support that.  Could you go into more detail here, please - this would be a very unusual implementation decision for a CPU.

Here I means the different hardware configuration, and the semantic of pins has some differences too for I2S and TDM.

Quoted 10 lines
Quoted 7 lines

+     if (sport_handle != NULL)
+             runtime->private_data = sport_handle;
+     else {
+             pr_err("sport_handle is NULL\n");
+             return -1;
+     }

Should return a real error code here.

Fixed

Quoted 6 lines

sound/soc/blackfin/bf5xx-tdm-pcm.c line 285

Quoted 3 lines
sound/soc/blackfin/bf5xx-tdm-pcm.c new file +3 -0
+int bf5xx_pcm_tdm_new(struct snd_card *card, struct snd_soc_dai *dai,
+     struct snd_pcm *pcm)
+{

This should be static; any functions that are exported via operations structures should be static.

Fixed

Quoted 13 lines
Quoted 13 lines
sound/soc/blackfin/bf5xx-tdm.c new file +12 -0
+static int bf5xx_tdm_hw_params(struct snd_pcm_substream *substream,
+     struct snd_pcm_hw_params *params,
+     struct snd_soc_dai *dai)
+{
+     int ret = 0;
+
+     bf5xx_tdm.tcr2 &= ~0x1f;
+     bf5xx_tdm.rcr2 &= ~0x1f;
+     switch (params_format(params)) {
+     case SNDRV_PCM_FORMAT_S32_LE:
+             bf5xx_tdm.tcr2 |= 31;
+             bf5xx_tdm.rcr2 |= 31;
Quoted 8 lines
Quoted 6 lines

+             sport_handle->wdsize = 4;
+             break;
+             /* at present, we only support 32bit transfer */
+     default:
+             pr_err("not supported PCM format yet\n");
+             break;

This should return an error.

Fixed

Quoted 10 lines
Quoted 9 lines
sound/soc/blackfin/bf5xx-tdm.c new file +8 -0
+static int __devinit bfin_tdm_probe(struct platform_device *pdev)
+{
+     int ret = 0;
+
+     if (peripheral_request_list(&sport_req[sport_num][0], "soc-audio")) {
+             pr_err("Requesting Peripherals failed\n");
+             return -EFAULT;
+     }
Quoted 16 lines

sound/soc/blackfin/bf5xx-tdm.c line 324

Quoted 8 lines
sound/soc/blackfin/bf5xx-tdm.c new file +8 -0
+static struct platform_driver bfin_tdm_driver = {
+     .probe  = bfin_tdm_probe,
+     .remove = __devexit_p(bfin_tdm_remove),
+     .driver = {
+             .name   = "bfin-sport",
+             .owner  = THIS_MODULE,
+     },
+};

This isn't a good name for the driver - all of the Blackfin CPU audio drivers and probably some others use a SPORT so the same driver name would apply for each of them.  If more than one of these drivers chose the same name then you'd not be able to have both drivers in the kernel at once.  The driver name should be something that's specific to the device you're trying to register, such as bfin-tdm.

Fixed

Thanks
Barry
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#4 lore raw

Re: [PATCH 1/2] blackfin I2S(TDM mode) CPU DAI driver

Quoted 11 lines · Barry Song

2009/7/25 Mark Brown <[email protected]>:

Quoted 2 lines

Looking at the code it appears that the main difference is that your TDM mode always configures the DMA layout for 8 channel blocks.  This

I2S is not a special case of TDM with only left and right two slots for SPORT interface. I2S coordinates with TDM in SPORT, but not a part of TDM. TDM require different hardware configuration with I2S, not only different slot number.
One is "Stereo Serial Operation" mode of SPORT, the other one is "Multichannel Operation" mode. They are incompatible at the same time.

Right, but that's something I'd expect to be handleable at run time - and in any case, the multi-channel varaint can drop down to only two channels.

Quoted 10 lines

Mainly due to hardware, it's really difficult for us to control the memory layout on the fly. That causes much trouble in hardware and driver reliability. Datasheet claims DMA buffer should be fixed while SPORT is enabled, but also claims the layout may be changed while SPORT is disabled. So it's maybe possible for us to change the SPORT api to support the configuration on the fly with a SPORT shutdown, then i2s, tdm even ac97 can all use them to reduce the amount of code duplication. But it need much work on debugging and testing to make it work and reliable. So how about to patch it later as an individual project since the changes will involve sport, i2s, ac97 and tdm?

OK, if the hardware is as difficult to use as that I guess the current situation is adequate. I'll check over your patch later but the code was almost ready last time so I don't anticipate any problems. However...

Quoted 11 lines
Quoted 10 lines
Quoted 3 lines

On the other hand, hardware board connection decides the I2S/TDM mode directly. It's needless to switch between I2S and TDM dynamically. For TDM mode, board driver can refer to the TDM instance, for I2S mode,

Are you saying that a physically different SPORT or other hardware configuration on the CPU is required to use TDM mode?  The impression given by the drivers has always been that this is some kind of generic synchronous serial port and the way the SPORT number is set up seems to support that.  Could you go into more detail here, please - this would be a very unusual implementation decision for a CPU.

Quoted 2 lines

Here I means the different hardware configuration, and the semantic of pins has some differences too for I2S and TDM.

...are you sure there's a different meaning for the external pins - what are these differences? If they're not just related to the number of bit clock cycles per frame clock then are you sure it will interoperate with other DSP mode devices?

author
#5 lore raw

Re: [PATCH 1/2] blackfin I2S(TDM mode) CPU DAI driver

2009/7/27 Mark Brown <[email protected]>:

Quoted 44 lines · Barry Song
Quoted 11 lines

2009/7/25 Mark Brown <[email protected]>:

Quoted 2 lines

Looking at the code it appears that the main difference is that your TDM mode always configures the DMA layout for 8 channel blocks.  This

I2S is not a special case of TDM with only left and right two slots for SPORT interface. I2S coordinates with TDM in SPORT, but not a part of TDM. TDM require different hardware configuration with I2S, not only different slot number.
One is "Stereo Serial Operation" mode of SPORT, the other one is "Multichannel Operation" mode. They are incompatible at the same time.

Right, but that's something I'd expect to be handleable at run time - and in any case, the multi-channel varaint can drop down to only two channels.

Quoted 10 lines

Mainly due to hardware, it's really difficult for us to control the memory layout on the fly. That causes much trouble in hardware and driver reliability. Datasheet claims DMA buffer should be fixed while SPORT is enabled, but also claims the layout may be changed while SPORT is disabled. So it's maybe possible for us to change the SPORT api to support the configuration on the fly with a SPORT shutdown, then i2s, tdm even ac97 can all use them to reduce the amount of code duplication. But it need much work on debugging and testing to make it work and reliable. So how about to patch it later as an individual project since the changes will involve sport, i2s, ac97 and tdm?

OK, if the hardware is as difficult to use as that I guess the current situation is adequate.  I'll check over your patch later but the code was almost ready last time so I don't anticipate any problems. However...

Quoted 10 lines
Quoted 10 lines
Quoted 3 lines

On the other hand, hardware board connection decides the I2S/TDM mode directly. It's needless to switch between I2S and TDM dynamically. For TDM mode, board driver can refer to the TDM instance, for I2S mode,

Are you saying that a physically different SPORT or other hardware configuration on the CPU is required to use TDM mode?  The impression given by the drivers has always been that this is some kind of generic synchronous serial port and the way the SPORT number is set up seems to support that.  Could you go into more detail here, please - this would be a very unusual implementation decision for a CPU.

Quoted 7 lines
Quoted 2 lines

Here I means the different hardware configuration, and the semantic of pins has some differences too for I2S and TDM.

...are you sure there's a different meaning for the external pins - what are these differences?  If they're not just related to the number of bit clock cycles per frame clock then are you sure it will interoperate with other DSP mode devices?

The main differences are the usages.
For I2S mode, each SPORT has two sets of independent transmit and receive pins. Every set of pins support a stereo receive or transmit. So a typical hardware connection to support multi-channels in I2S mode is like attached "I2S.gif". Many pins are connected, and the main characteristic is using multi-sets of pins concurrently. And in the codec side, DSDATA1-n get the semantic as "DACx Data In", ASDATA1-n are "ADCx Data Out".
For TDM mode, the main characteristic is using time-sharing to a set of pins. A typical connection for TDM is like "tdm.gif". Only tx/rx/clk/sync are connected to codec. And in codec side, DSDATA1 gets the semantic as "DAC TDM Data In", DSDATA2-n are not "DACx Data In" again. ASDATA1 becomes "ADC TDM Data Out", ASDATA2-n are not "ADCx Data Out" again. And another difference is when multichannel mode is enabled on a SPORT, both the transmitter and the receiver use RFS, which is only a receive sync in I2S mode, as a frame sync. The RFS signal is used to synchronize the channels and restart each multichannel sequence. TFS, which is "Transmit Frame Sync" in I2S mode, becomes TDV "transmit data valid" for external logic in TDM. In TDM mode, the SPORT can interoperate with other DSP mode devices considering they are using "tx/rx/clk/sync" pins. That's very common.

Quoted 5 lines

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#6 lore raw

Re: [PATCH 1/2] blackfin I2S(TDM mode) CPU DAI driver

Quoted 7 lines · Barry Song

2009/7/27 Mark Brown <[email protected]>:

Quoted 4 lines

...are you sure there's a different meaning for the external pins - what are these differences?  If they're not just related to the number of bit clock cycles per frame clock then are you sure it will interoperate with other DSP mode devices?

Quoted 6 lines

For I2S mode, each SPORT has two sets of independent transmit and receive pins. Every set of pins support a stereo receive or transmit.

For TDM mode, the main characteristic is using time-sharing to a set of pins. A typical connection for TDM is like "tdm.gif". Only tx/rx/clk/sync are connected to codec. And in codec side, DSDATA1

OK, that's not really a difference as far as ASoC is concerned - all the pins have their normal meanings, it's just that your I2S mode permits additional data lines (presumably your TDM mode could also be set up to use multiple data lines). None of the pins change meaning.

author
#7 lore raw

PATCH 2/2 board driver to connect bf5xx with ad1938

In reply to Barry Song

Changes from the last patch version:
Fix the wrong mask in set tdm slot

---
 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
#8 lore raw

Re: [PATCH 2/2] board driver to connect bf5xx with ad1938

Quoted 4 lines · Barry Song

Changes from the last patch version:
Fix the wrong mask in set tdm slot

This is all OK.