Skip to contentSkip to conversation

ASoC updates

PATCH In review Mark Brown 2 participants 6 messages Nov 6, 2008

Subsystems (5)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

cover ASoC updates

The following changes since commit 0ee4663617fb0f78cec4cc6558a096ccbd8c3ffc:
Takashi Iwai (1):
ALSA: ASoC - Remove unnecessary inclusion of linux/version.h

are available in the git repository at:

git://opensource.wolfsonmicro.com/linux-2.6-asoc for-tiwai

This series drops the TLV320AIC23 patch for now and makes the Palm driver non-modular for the time being due to the platform data dodge being used.

David Anders (1):
ASoC: Add new parameter to s3c24xx_pcm_enqueue

Grazvydas Ignotas (1):
ALSA: ASoC: TWL4030 codec - fix 256*Fs clock

Marek Vasut (1):
ASoC: Add Palm/PXA27x unified ASoC audio driver

Mark Brown (1):
ASoC: Remove core version number

 arch/arm/mach-pxa/include/mach/palmasoc.h |   13 ++
 include/sound/soc.h                       |    2 -
 sound/soc/codecs/twl4030.c                |    4 +-
 sound/soc/pxa/Kconfig                     |    9 +
 sound/soc/pxa/Makefile                    |    2 +
 sound/soc/pxa/palm27x.c                   |  269 +++++++++++++++++++++++++++++
 sound/soc/s3c24xx/s3c24xx-pcm.c           |   12 +-
 sound/soc/soc-core.c                      |    1 -
 8 files changed, 303 insertions(+), 9 deletions(-)
 create mode 100644 arch/arm/mach-pxa/include/mach/palmasoc.h
 create mode 100644 sound/soc/pxa/palm27x.c
author
#1 lore raw

PATCH 1/4 ASoC: Add Palm/PXA27x unified ASoC audio driver

From: Marek Vasut <[email protected]>

this patch adds asoc audio driver for pxa27x based Palm PDAs. I tested it for palmtx, t5 and ld, it should work with palmz72 as well (slapin, please test). I sent it here some time ago, but now I got to fixing bugs in it. It should be somehow mostly ok and ready for applying.

[Converted to use snd_soc_dapm_nc_pin() and use bool in Kconfig due to the dodge used to work around platform data -- broonie]

---
 arch/arm/mach-pxa/include/mach/palmasoc.h |   13 ++
 sound/soc/pxa/Kconfig                     |    9 +
 sound/soc/pxa/Makefile                    |    2 +
 sound/soc/pxa/palm27x.c                   |  269 +++++++++++++++++++++++++++++
 4 files changed, 293 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-pxa/include/mach/palmasoc.h
 create mode 100644 sound/soc/pxa/palm27x.c
arch/arm/mach-pxa/include/mach/palmasoc.h new file +13 -0
new file mode 100644
index 0000000..6c4b1f7
@@ -0,0 +1,13 @@
+#ifndef _INCLUDE_PALMASOC_H_
+#define _INCLUDE_PALMASOC_H_
+struct palm27x_asoc_info {
+	int	jack_gpio;
+};
+
+#ifdef CONFIG_SND_PXA2XX_SOC_PALM27X
+void __init palm27x_asoc_set_pdata(struct palm27x_asoc_info *data);
+#else
+static inline void palm27x_asoc_set_pdata(struct palm27x_asoc_info *data) {}
+#endif
+
+#endif
sound/soc/pxa/Kconfig +9 -0
index 4235524..f82e106 100644
@@ -79,6 +79,15 @@ config SND_PXA2XX_SOC_EM_X270
 	  Say Y if you want to add support for SoC audio on
 	  CompuLab EM-x270.
 
+config SND_PXA2XX_SOC_PALM27X
+	bool "SoC Audio support for Palm T|X, T5 and LifeDrive"
+	depends on SND_PXA2XX_SOC && (MACH_PALMLD || MACH_PALMTX || MACH_PALMT5)
+	select SND_PXA2XX_SOC_AC97
+	select SND_SOC_WM9712
+	help
+	  Say Y if you want to add support for SoC audio on
+	  Palm T|X, T5 or LifeDrive handheld computer.
+
 config SND_SOC_ZYLONITE
 	tristate "SoC Audio support for Marvell Zylonite"
 	depends on SND_PXA2XX_SOC && MACH_ZYLONITE
sound/soc/pxa/Makefile +2 -0
index 00258ab..1a3a36e 100644
@@ -16,6 +16,7 @@ snd-soc-tosa-objs := tosa.o
 snd-soc-e800-objs := e800_wm9712.o
 snd-soc-spitz-objs := spitz.o
 snd-soc-em-x270-objs := em-x270.o
+snd-soc-palm27x-objs := palm27x.o
 
 obj-$(CONFIG_SND_PXA2XX_SOC_CORGI) += snd-soc-corgi.o
 obj-$(CONFIG_SND_PXA2XX_SOC_POODLE) += snd-soc-poodle.o
@@ -23,3 +24,4 @@ obj-$(CONFIG_SND_PXA2XX_SOC_TOSA) += snd-soc-tosa.o
 obj-$(CONFIG_SND_PXA2XX_SOC_E800) += snd-soc-e800.o
 obj-$(CONFIG_SND_PXA2XX_SOC_SPITZ) += snd-soc-spitz.o
 obj-$(CONFIG_SND_PXA2XX_SOC_EM_X270) += snd-soc-em-x270.o
+obj-$(CONFIG_SND_PXA2XX_SOC_PALM27X) += snd-soc-palm27x.o
sound/soc/pxa/palm27x.c new file +269 -0

269 lines not on this page · raw message

Signature · 1 line
1.5.6.5
author
#2 lore raw

PATCH 2/4 ASoC: Remove core version number

Rather than try to remember to keep the core version number updated (which hasn't been happening) just remove it. It was much more useful when ASoC was out of tree.

---
 include/sound/soc.h  |    2 --
 sound/soc/soc-core.c |    1 -
 2 files changed, 0 insertions(+), 3 deletions(-)
include/sound/soc.h +0 -2
index da0040b..fa1b99b 100644
@@ -21,8 +21,6 @@
 #include <sound/control.h>
 #include <sound/ac97_codec.h>
 
-#define SND_SOC_VERSION "0.13.2"
-
 /*
  * Convenience kcontrol builders
  */
sound/soc/soc-core.c +0 -1
index 1a17368..9feaa7b 100644
@@ -1965,7 +1965,6 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_digital_mute);
 
 static int __devinit snd_soc_init(void)
 {
-	printk(KERN_INFO "ASoC version %s\n", SND_SOC_VERSION);
 	return platform_driver_register(&soc_driver);
 }
 
Signature · 1 line
1.5.6.5
author
#3 lore raw

PATCH 3/4 ASoC: Add new parameter to s3c24xx_pcm_enqueue

From: David Anders <[email protected]>

The S3C24xx dma does not allow more than one buffer to be enqueue prior to the dma transfers starting. This patch adds an additional parameter to s3c24xx_pcm_enqueue() to allow for passing an initial dma maximum load value.

Signed-off-by David Anders <danders at amltd.com>
---
 sound/soc/s3c24xx/s3c24xx-pcm.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
sound/soc/s3c24xx/s3c24xx-pcm.c +8 -4
index e13e614..341198b 100644
@@ -78,7 +78,8 @@ struct s3c24xx_runtime_data {
  * place a dma buffer onto the queue for the dma system
  * to handle.
 */
-static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream)
+static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream,
+				int dma_max)
 {
 	struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;
 	dma_addr_t pos = prtd->dma_pos;
@@ -86,7 +87,10 @@ static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream)
 
 	DBG("Entered %s\n", __func__);
 
-	while (prtd->dma_loaded < prtd->dma_limit) {
+	if (!dma_max)
+		dma_max = prtd->dma_limit;
+
+	while (prtd->dma_loaded < dma_max) {
 		unsigned long len = prtd->dma_period;
 
 		DBG("dma_loaded: %d\n", prtd->dma_loaded);
@@ -132,7 +136,7 @@ static void s3c24xx_audio_buffdone(struct s3c2410_dma_chan *channel,
 	spin_lock(&prtd->lock);
 	if (prtd->state & ST_RUNNING) {
 		prtd->dma_loaded--;
-		s3c24xx_pcm_enqueue(substream);
+		s3c24xx_pcm_enqueue(substream, 0);
 	}
 
 	spin_unlock(&prtd->lock);
@@ -249,7 +253,7 @@ static int s3c24xx_pcm_prepare(struct snd_pcm_substream *substream)
 	prtd->dma_pos = prtd->dma_start;
 
 	/* enqueue dma buffers */
-	s3c24xx_pcm_enqueue(substream);
+	s3c24xx_pcm_enqueue(substream, 1);
 
 	return ret;
 }
Signature · 1 line
1.5.6.5
author
#4 lore raw

PATCH 4/4 ALSA: ASoC: TWL4030 codec - fix 256*Fs clock

From: Grazvydas Ignotas <[email protected]>

According to TRM, 256*Fs clock output should be enabled when TWL4030 is in slave mode, not master. This allows sound to work on OMAP3 Pandora, which uses 256*Fs clock.

---
 sound/soc/codecs/twl4030.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/twl4030.c +2 -2
index ee2f0d3..90f3b4d 100644
@@ -469,11 +469,11 @@ static int twl4030_set_dai_fmt(struct snd_soc_dai *codec_dai,
 	switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
 	case SND_SOC_DAIFMT_CBM_CFM:
 		format &= ~(TWL4030_AIF_SLAVE_EN);
-		format |= TWL4030_CLK256FS_EN;
+		format &= ~(TWL4030_CLK256FS_EN);
 		break;
 	case SND_SOC_DAIFMT_CBS_CFS:
-		format &= ~(TWL4030_CLK256FS_EN);
 		format |= TWL4030_AIF_SLAVE_EN;
+		format |= TWL4030_CLK256FS_EN;
 		break;
 	default:
 		return -EINVAL;
Signature · 1 line
1.5.6.5
#5 lore raw
In reply to Mark Brown

At Thu, 6 Nov 2008 11:38:32 +0000,

Quoted 8 lines · Mark Brown

The following changes since commit 0ee4663617fb0f78cec4cc6558a096ccbd8c3ffc:
Takashi Iwai (1):
ALSA: ASoC - Remove unnecessary inclusion of linux/version.h

are available in the git repository at:

git://opensource.wolfsonmicro.com/linux-2.6-asoc for-tiwai

Thanks, pulled now.

Takashi

Quoted 29 lines

This series drops the TLV320AIC23 patch for now and makes the Palm driver non-modular for the time being due to the platform data dodge being used.

David Anders (1):
ASoC: Add new parameter to s3c24xx_pcm_enqueue

Grazvydas Ignotas (1):
ALSA: ASoC: TWL4030 codec - fix 256*Fs clock

Marek Vasut (1):
ASoC: Add Palm/PXA27x unified ASoC audio driver

Mark Brown (1):
ASoC: Remove core version number

 arch/arm/mach-pxa/include/mach/palmasoc.h |   13 ++
 include/sound/soc.h                       |    2 -
 sound/soc/codecs/twl4030.c                |    4 +-
 sound/soc/pxa/Kconfig                     |    9 +
 sound/soc/pxa/Makefile                    |    2 +
 sound/soc/pxa/palm27x.c                   |  269 +++++++++++++++++++++++++++++
 sound/soc/s3c24xx/s3c24xx-pcm.c           |   12 +-
 sound/soc/soc-core.c                      |    1 -
 8 files changed, 303 insertions(+), 9 deletions(-)
 create mode 100644 arch/arm/mach-pxa/include/mach/palmasoc.h
 create mode 100644 sound/soc/pxa/palm27x.c