Skip to contentSkip to conversation

ASoC updates

PATCH New Mark Brown 2 participants 7 messages Oct 2, 2008

Subsystems (4)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

The following changes since commit 2e2ed79f64e935540b0d148f7e2c3ebefafe133e:
Vladimir Barinov (1):
ALSA: Correct Vladimir Barinov's e-mail address

are available in the git repository at:

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

Of these only the patch from Rob is 2.6.27 material.

Arun KS (1):
ASoC: Add destination and source port for DMA on OMAP1

Frank Mandarino (1):
ASoC: Remove references to Endrelia ETI-B1 board

Jonas Bonn (2):
ASoC: Add widgets before setting endpoints on GTA01
ASoC: Drop device registration from GTA01 lm4857 driver

Rob Sims (1):
ASoC: Set correct name for WM8753 rec mixer output

 sound/soc/at91/Kconfig             |   17 --
 sound/soc/at91/Makefile            |    5 -
 sound/soc/at91/eti_b1_wm8731.c     |  349 ------------------------------------
 sound/soc/codecs/wm8753.c          |    4 +-
 sound/soc/omap/omap-pcm.c          |    4 +-
 sound/soc/s3c24xx/neo1973_wm8753.c |   57 +-----
 6 files changed, 14 insertions(+), 422 deletions(-)
 delete mode 100644 sound/soc/at91/eti_b1_wm8731.c
author
#1 lore raw

PATCH 1/5 ASoC: Add destination and source port for DMA on OMAP1

From: Arun KS <[email protected]>

Adds destination and source port for dma in platform driver as required by OMAP1

---
 sound/soc/omap/omap-pcm.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
sound/soc/omap/omap-pcm.c +3 -1
index 690bfea..e9084fd 100644
@@ -97,7 +97,7 @@ static int omap_pcm_hw_params(struct snd_pcm_substream *substream,
 	prtd->dma_data = dma_data;
 	err = omap_request_dma(dma_data->dma_req, dma_data->name,
 			       omap_pcm_dma_irq, substream, &prtd->dma_ch);
-	if (!cpu_is_omap1510()) {
+	if (!err & !cpu_is_omap1510()) {
 		/*
 		 * Link channel with itself so DMA doesn't need any
 		 * reprogramming while looping the buffer
@@ -147,12 +147,14 @@ static int omap_pcm_prepare(struct snd_pcm_substream *substream)
 		dma_params.src_or_dst_synch	= OMAP_DMA_DST_SYNC;
 		dma_params.src_start		= runtime->dma_addr;
 		dma_params.dst_start		= dma_data->port_addr;
+		dma_params.dst_port		= OMAP_DMA_PORT_MPUI;
 	} else {
 		dma_params.src_amode		= OMAP_DMA_AMODE_CONSTANT;
 		dma_params.dst_amode		= OMAP_DMA_AMODE_POST_INC;
 		dma_params.src_or_dst_synch	= OMAP_DMA_SRC_SYNC;
 		dma_params.src_start		= dma_data->port_addr;
 		dma_params.dst_start		= runtime->dma_addr;
+		dma_params.src_port		= OMAP_DMA_PORT_MPUI;
 	}
 	/*
 	 * Set DMA transfer frame size equal to ALSA period size and frame
Signature · 1 line
1.5.6.5
author
#2 lore raw

PATCH 2/5 ASoC: Remove references to Endrelia ETI-B1 board

From: Frank Mandarino <[email protected]>

The ASoC machine drivers for this board were only provided as examples for the new AT91 ASoC platform driver. Since the ETI-B1 board is proprietary and there are other AT91 ASoC machine drivers available, it makes sense to remove these drivers.

---
 sound/soc/at91/Kconfig         |   17 --
 sound/soc/at91/Makefile        |    5 -
 sound/soc/at91/eti_b1_wm8731.c |  349 ----------------------------------------
 3 files changed, 0 insertions(+), 371 deletions(-)
 delete mode 100644 sound/soc/at91/eti_b1_wm8731.c
sound/soc/at91/Kconfig +0 -17
index 9051865..85a8832 100644
@@ -8,20 +8,3 @@ config SND_AT91_SOC
 
 config SND_AT91_SOC_SSC
 	tristate
-
-config SND_AT91_SOC_ETI_B1_WM8731
-	tristate "SoC Audio support for WM8731-based Endrelia ETI-B1 boards"
-	depends on SND_AT91_SOC && (MACH_ETI_B1 || MACH_ETI_C1)
-	select SND_AT91_SOC_SSC
-	select SND_SOC_WM8731
-	help
-	  Say Y if you want to add support for SoC audio on WM8731-based
-	  Endrelia Technologies Inc ETI-B1 or ETI-C1 boards.
-
-config SND_AT91_SOC_ETI_SLAVE
-	bool "Run codec in slave Mode on Endrelia boards"
-	depends on SND_AT91_SOC_ETI_B1_WM8731
-	default n
-	help
-	  Say Y if you want to run with the AT91 SSC generating the BCLK
-	  and LRC signals on Endrelia boards.
sound/soc/at91/Makefile +0 -5
index f23da17..b817f11 100644
@@ -4,8 +4,3 @@ snd-soc-at91-ssc-objs := at91-ssc.o
 
 obj-$(CONFIG_SND_AT91_SOC) += snd-soc-at91.o
 obj-$(CONFIG_SND_AT91_SOC_SSC) += snd-soc-at91-ssc.o
-
-# AT91 Machine Support
-snd-soc-eti-b1-wm8731-objs := eti_b1_wm8731.o
-
-obj-$(CONFIG_SND_AT91_SOC_ETI_B1_WM8731) += snd-soc-eti-b1-wm8731.o
sound/soc/at91/eti_b1_wm8731.c deleted +0 -349

349 lines not on this page · raw message

Signature · 1 line
1.5.6.5
author
#3 lore raw

PATCH 3/5 ASoC: Add widgets before setting endpoints on GTA01

From: Jonas Bonn <[email protected]>

This prevents error messages at startup where the endpoints are being set before the widgets/controls have even been added.

---
 sound/soc/s3c24xx/neo1973_wm8753.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/s3c24xx/neo1973_wm8753.c +3 -3
index 41fc69c..f3ac449 100644
@@ -517,13 +517,13 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec)
 	snd_soc_dapm_nc_pin(codec, "LINE1");
 	snd_soc_dapm_nc_pin(codec, "LINE2");
 
-	/* set endpoints to default mode */
-	set_scenario_endpoints(codec, NEO_AUDIO_OFF);
-
 	/* Add neo1973 specific widgets */
 	snd_soc_dapm_new_controls(codec, wm8753_dapm_widgets,
 				  ARRAY_SIZE(wm8753_dapm_widgets));
 
+	/* set endpoints to default mode */
+	set_scenario_endpoints(codec, NEO_AUDIO_OFF);
+
 	/* add neo1973 specific controls */
 	for (i = 0; i < ARRAY_SIZE(wm8753_neo1973_controls); i++) {
 		err = snd_ctl_add(codec->card,
Signature · 1 line
1.5.6.5
author
#4 lore raw

PATCH 4/5 ASoC: Set correct name for WM8753 rec mixer output

From: Rob Sims <[email protected]>

Rob Sims wrote:

"I can't seem to turn on register 0x17, bit 3 in the sound chip, except by codec_reg_write; the mixer lacks direct or indirect control. It seems there are two names for the output of the rec mixer:
Capture ST Mixer
Playback Mixer

Would the following do the trick?"

I confirm that this solves the audio problems I was having.

---

This is a bugfix which could be applied to 2.6.27 - without it the WM8753 driver will fail to set up some audio paths.

 sound/soc/codecs/wm8753.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8753.c +2 -2
index b3e1b37..8c4df44 100644
@@ -583,7 +583,7 @@ static const struct snd_soc_dapm_route audio_map[] = {
 
 	/* out 4 */
 	{"Out4 Mux", "VREF", "VREF"},
-	{"Out4 Mux", "Capture ST", "Capture ST Mixer"},
+	{"Out4 Mux", "Capture ST", "Playback Mixer"},
 	{"Out4 Mux", "LOUT2", "LOUT2"},
 	{"Out 4", NULL, "Out4 Mux"},
 	{"OUT4", NULL, "Out 4"},
@@ -607,7 +607,7 @@ static const struct snd_soc_dapm_route audio_map[] = {
 	/* Capture Right Mux */
 	{"Capture Right Mux", "PGA", "Right Capture Volume"},
 	{"Capture Right Mux", "Line or RXP-RXN", "Line Right Mux"},
-	{"Capture Right Mux", "Sidetone", "Capture ST Mixer"},
+	{"Capture Right Mux", "Sidetone", "Playback Mixer"},
 
 	/* Mono Capture mixer-mux */
 	{"Capture Right Mixer", "Stereo", "Capture Right Mux"},
Signature · 1 line
1.5.6.5
author
#5 lore raw

PATCH 5/5 ASoC: Drop device registration from GTA01 lm4857 driver

From: Jonas Bonn <[email protected]>

Device registration should be handled at the machine level and not in the driver code itself. This patch removes the device registration from the driver code in preparation for moving it to the machine definition.

[Squashed down two parts to this patch for bisectability - there's also a third part adding registration of the device to the out of tree GTA01 machine driver -- broonie]

---
 sound/soc/s3c24xx/neo1973_wm8753.c |   51 ++++-------------------------------
 1 files changed, 6 insertions(+), 45 deletions(-)
sound/soc/s3c24xx/neo1973_wm8753.c +6 -45
index f3ac449..c602674 100644
@@ -601,6 +601,8 @@ static int lm4857_i2c_probe(struct i2c_client *client,
 {
 	DBG("Entered %s\n", __func__);
 
+	i2c = client;
+
 	lm4857_write_regs();
 	return 0;
 }
@@ -609,6 +611,8 @@ static int lm4857_i2c_remove(struct i2c_client *client)
 {
 	DBG("Entered %s\n", __func__);
 
+	i2c = NULL;
+
 	return 0;
 }
 
@@ -666,48 +670,6 @@ static struct i2c_driver lm4857_i2c_driver = {
 };
 
 static struct platform_device *neo1973_snd_device;
-static struct i2c_client *lm4857_client;
-
-static int __init neo1973_add_lm4857_device(struct platform_device *pdev,
-					    int i2c_bus,
-					    unsigned short i2c_address)
-{
-	struct i2c_board_info info;
-	struct i2c_adapter *adapter;
-	struct i2c_client *client;
-	int ret;
-
-	ret = i2c_add_driver(&lm4857_i2c_driver);
-	if (ret != 0) {
-		dev_err(&pdev->dev, "can't add lm4857 driver\n");
-		return ret;
-	}
-
-	memset(&info, 0, sizeof(struct i2c_board_info));
-	info.addr = i2c_address;
-	strlcpy(info.type, "neo1973_lm4857", I2C_NAME_SIZE);
-
-	adapter = i2c_get_adapter(i2c_bus);
-	if (!adapter) {
-		dev_err(&pdev->dev, "can't get i2c adapter %d\n", i2c_bus);
-		goto err_driver;
-	}
-
-	client = i2c_new_device(adapter, &info);
-	i2c_put_adapter(adapter);
-	if (!client) {
-		dev_err(&pdev->dev, "can't add lm4857 device at 0x%x\n",
-			(unsigned int)info.addr);
-		goto err_driver;
-	}
-
-	lm4857_client = client;
-	return 0;
-
-err_driver:
-	i2c_del_driver(&lm4857_i2c_driver);
-	return -ENODEV;
-}
 
 static int __init neo1973_init(void)
 {
@@ -728,8 +690,8 @@ static int __init neo1973_init(void)
 		return ret;
 	}
 
-	ret = neo1973_add_lm4857_device(neo1973_snd_device,
-					0, 0x7C);
+	ret = i2c_add_driver(&lm4857_i2c_driver);
+
 	if (ret != 0)
 		platform_device_unregister(neo1973_snd_device);
 
@@ -740,7 +702,6 @@ static void __exit neo1973_exit(void)
 {
 	DBG("Entered %s\n", __func__);
 
-	i2c_unregister_device(lm4857_client);
 	i2c_del_driver(&lm4857_i2c_driver);
 	platform_device_unregister(neo1973_snd_device);
 }
Signature · 1 line
1.5.6.5
#6 lore raw
In reply to Mark Brown

At Thu, 2 Oct 2008 11:02:00 +0100,

Quoted 10 lines · Mark Brown

The following changes since commit 2e2ed79f64e935540b0d148f7e2c3ebefafe133e:
Vladimir Barinov (1):
ALSA: Correct Vladimir Barinov's e-mail address

are available in the git repository at:

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

Of these only the patch from Rob is 2.6.27 material.

OK, then I split your commits to two parts.
Rob's patch went into asoc-fixes branch for the next (possible) pull request, and others to usual topic/asoc branch. The topic/asoc also merged asoc-fixes branch, so all are in there as results, too.

Thanks,

Takashi