Skip to contentSkip to conversation

ASoC: DAPM: Allow multiple mixer sources to be routed via the same switch

PATCH In review Lars-Peter Clausen 3 participants 17 messages Aug 10, 2011 – Aug 14, 2011

Subsystems (3)
lore
Share & tools
lore

Lars-Peter Clausen

author maintainer
#0 lore raw

PATCH 1/4 ASoC: DAPM: Allow multiple mixer sources to be routed via the same switch

Currently it is only possible to route one source per switch into a mixer. This patch modifies the code, so that it is possible to route multiple sources into a mixer via the same switch. One use-case for this is routing a stereo channel pair into a mono-mixer via the same switch.

---
 sound/soc/soc-dapm.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
sound/soc/soc-dapm.c +5 -1
index c265311..170c4ff 100644
@@ -443,6 +443,11 @@ static int dapm_new_mixer(struct snd_soc_dapm_widget *w)
 			if (path->name != (char *)w->kcontrol_news[i].name)
 				continue;
 
+			if (w->kcontrols[i]) {
+				path->kcontrol = w->kcontrols[i];
+				continue;
+			}
+
 			wlistsize = sizeof(struct snd_soc_dapm_widget_list) +
 				    sizeof(struct snd_soc_dapm_widget *),
 			wlist = kzalloc(wlistsize, GFP_KERNEL);
@@ -1556,7 +1561,6 @@ static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
 		/* found, now check type */
 		found = 1;
 		path->connect = connect;
-		break;
 	}
 
 	if (found)
Signature · 1 line
1.7.2.5
author maintainer
#1 lore raw

PATCH 2/4 ASoC: Add ADAU1373 codec support

This patch adds support for the Analog Devices ADAU1373 audio codec.

---
 include/sound/adau1373.h    |   22 +
 sound/soc/codecs/Kconfig    |    3 +
 sound/soc/codecs/Makefile   |    2 +
 sound/soc/codecs/adau1373.c | 1374 +++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/adau1373.h |   29 +
 5 files changed, 1430 insertions(+), 0 deletions(-)
 create mode 100644 include/sound/adau1373.h
 create mode 100644 sound/soc/codecs/adau1373.c
 create mode 100644 sound/soc/codecs/adau1373.h
include/sound/adau1373.h new file +22 -0
new file mode 100644
index 0000000..41a622e
@@ -0,0 +1,22 @@
+/*
+ * Analog Devices ADAU1373 Audio Codec drive
+ *
+ * Copyright 2011 Analog Devices Inc.
+ * Author: Lars-Peter Clausen <[email protected]>
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef __SOUND_ADAU1373_H__
+#define __SOUND_ADAU1373_H__
+
+struct adau1373_platform_data {
+	bool input_differential[4];
+	bool lineout_differential;
+	bool lineout_ground_sense;
+
+	unsigned int num_drc;
+	uint8_t drc_setting[3][13];
+};
+
+#endif
sound/soc/codecs/Kconfig +3 -0
index 665d924..bac0edb 100644
@@ -139,6 +139,9 @@ config SND_SOC_ADAU1701
 	select SIGMA
 	tristate
 
+config SND_SOC_ADAU1373
+	tristate
+
 config SND_SOC_ADAV80X
 	tristate
 
sound/soc/codecs/Makefile +2 -0
index 5119a7e..70c1769 100644
@@ -5,6 +5,7 @@ snd-soc-ad193x-objs := ad193x.o
 snd-soc-ad1980-objs := ad1980.o
 snd-soc-ad73311-objs := ad73311.o
 snd-soc-adau1701-objs := adau1701.o
+snd-soc-adau1373-objs := adau1373.o
 snd-soc-adav80x-objs := adav80x.o
 snd-soc-ads117x-objs := ads117x.o
 snd-soc-ak4104-objs := ak4104.o
@@ -100,6 +101,7 @@ obj-$(CONFIG_SND_SOC_AD1836)	+= snd-soc-ad1836.o
 obj-$(CONFIG_SND_SOC_AD193X)	+= snd-soc-ad193x.o
 obj-$(CONFIG_SND_SOC_AD1980)	+= snd-soc-ad1980.o
 obj-$(CONFIG_SND_SOC_AD73311) += snd-soc-ad73311.o
+obj-$(CONFIG_SND_SOC_ADAU1373)	+= snd-soc-adau1373.o
 obj-$(CONFIG_SND_SOC_ADAU1701)  += snd-soc-adau1701.o
 obj-$(CONFIG_SND_SOC_ADAV80X)  += snd-soc-adav80x.o
 obj-$(CONFIG_SND_SOC_ADS117X)	+= snd-soc-ads117x.o
sound/soc/codecs/adau1373.c new file +1374 -0

1,374 lines not on this page · raw message

sound/soc/codecs/adau1373.h new file +29 -0
new file mode 100644
index 0000000..c6ab553
@@ -0,0 +1,29 @@
+#ifndef __ADAU1373_H__
+#define __ADAU1373_H__
+
+enum adau1373_pll_src {
+	ADAU1373_PLL_SRC_MCLK1 = 0,
+	ADAU1373_PLL_SRC_BCLK1 = 1,
+	ADAU1373_PLL_SRC_BCLK2 = 2,
+	ADAU1373_PLL_SRC_BCLK3 = 3,
+	ADAU1373_PLL_SRC_LRCLK1 = 4,
+	ADAU1373_PLL_SRC_LRCLK2 = 5,
+	ADAU1373_PLL_SRC_LRCLK3 = 6,
+	ADAU1373_PLL_SRC_GPIO1 = 7,
+	ADAU1373_PLL_SRC_GPIO2 = 8,
+	ADAU1373_PLL_SRC_GPIO3 = 9,
+	ADAU1373_PLL_SRC_GPIO4 = 10,
+	ADAU1373_PLL_SRC_MCLK2 = 11,
+};
+
+enum adau1373_pll {
+	ADAU1373_PLL1 = 0,
+	ADAU1373_PLL2 = 1,
+};
+
+enum adau1373_clk_src {
+	ADAU1373_CLK_SRC_PLL1 = 0,
+	ADAU1373_CLK_SRC_PLL2 = 1,
+};
+
+#endif
Signature · 1 line
1.7.2.5
author maintainer
#2 lore raw

Re: [PATCH 2/4] ASoC: Add ADAU1373 codec support

Quoted 20 lines · Lars-Peter Clausen

This patch adds support for the Analog Devices ADAU1373 audio codec.

---
 include/sound/adau1373.h    |   22 +
 sound/soc/codecs/Kconfig    |    3 +
 sound/soc/codecs/Makefile   |    2 +
 sound/soc/codecs/adau1373.c | 1374 +++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/adau1373.h |   29 +
 5 files changed, 1430 insertions(+), 0 deletions(-)
 create mode 100644 include/sound/adau1373.h
 create mode 100644 sound/soc/codecs/adau1373.c
 create mode 100644 sound/soc/codecs/adau1373.h

[...]

sound/soc/codecs/Kconfig +0 -0
index 665d924..bac0edb 100644

sound/soc/codecs/Kconfig config SND_SOC_ADAU1701 · line 144

Quoted 6 lines
sound/soc/codecs/Kconfig +3 -0
@@ -139,6 +139,9 @@ config SND_SOC_ADAU1701
 	select SIGMA
 	tristate
 
+config SND_SOC_ADAU1373
+	tristate
+

Forgot to add it to SND_SOC_ALL_CODECS. Will be in v2.

Quoted 4 lines
sound/soc/codecs/Kconfig +0 -0
 config SND_SOC_ADAV80X
 	tristate
 
[...]
#3 lore raw

Re: [PATCH 2/4] ASoC: Add ADAU1373 codec support

In reply to Lars-Peter Clausen

sound/soc/codecs/adau1373.c line 297

Quoted 6 lines · Lars-Peter Clausen
sound/soc/codecs/adau1373.c new file +6 -0
+static const char *adau1373_micbias_text[] = {
+	"2.9 V",
+	"2.2 V",
+	"2.6 V",
+	"1.8 V",
+};

This should be controlled by platform data and/or the machine driver, not interactively by the user. With some microphone technologies there is actually a risk of damage with higher micbiases.

Quoted 5 lines
sound/soc/codecs/adau1373.c new file +5 -0
+	SOC_DOUBLE("AIF3 Playback Boost(+6dB)", ADAU1373_VOL_GAIN1, 4, 5, 1, 0),
+	SOC_DOUBLE("AIF2 Playback Boost(+6dB)", ADAU1373_VOL_GAIN1, 2, 3, 1, 0),
+	SOC_DOUBLE("AIF1 Playback Boost(+6dB)", ADAU1373_VOL_GAIN1, 0, 1, 1, 0),
+	SOC_DOUBLE("AIF3 Capture Boost(+6dB)", ADAU1373_VOL_GAIN2, 4, 5, 1, 0),
+	SOC_DOUBLE("AIF2 Capture Boost(+6dB)", ADAU1373_VOL_GAIN2, 2, 3, 1, 0),

sound/soc/codecs/adau1373.c line 362

Quoted 10 lines
sound/soc/codecs/adau1373.c new file +10 -0
+	SOC_DOUBLE("AIF1 Capture Boost(+6dB)", ADAU1373_VOL_GAIN2, 0, 1, 1, 0),
+	SOC_DOUBLE("DMIC Capture Boost(+6dB)", ADAU1373_VOL_GAIN3, 6, 7, 1, 0),
+	SOC_DOUBLE("ADC Capture Boost(+6dB)", ADAU1373_VOL_GAIN3, 4, 5, 1, 0),
+	SOC_DOUBLE("DAC2 Playback Boost(+6dB)", ADAU1373_VOL_GAIN3, 2, 3, 1, 0),
+	SOC_DOUBLE("DAC1 Playback Boost(+6dB)", ADAU1373_VOL_GAIN3, 0, 1, 1, 0),
+
+	SOC_DOUBLE("Input1 Boost(+20dB)", ADAU1373_ADC_GAIN, 0, 4, 1, 0),
+	SOC_DOUBLE("Input2 Boost(+20dB)", ADAU1373_ADC_GAIN, 1, 5, 1, 0),
+	SOC_DOUBLE("Input3 Boost(+20dB)", ADAU1373_ADC_GAIN, 2, 6, 1, 0),
+	SOC_DOUBLE("Input4 Boost(+20dB)", ADAU1373_ADC_GAIN, 3, 7, 1, 0),

All this stuff should be TLV.

sound/soc/codecs/adau1373.c line 365

Quoted 2 lines
sound/soc/codecs/adau1373.c new file +2 -0
+	SOC_ENUM("Lineout1 Mono Stereo", adau1373_lineout1_mode_enum),
+	SOC_ENUM("Speaker Mono Stereo", adau1373_speaker_mode_enum),

I'd expect these to be platform data/machine data rather than user control? The speaker wiring isn't going to vary dynamically...

sound/soc/codecs/adau1373.c line 904

Quoted 7 lines
sound/soc/codecs/adau1373.c new file +7 -0
+	switch (freq / params_rate(params)) {
+	case 1024: /* fs */
+		div = 0;
+		break;
+	case 1536: /* 2/3 fs */
+		div = 1;
+		break;

These comments look inaccuate, fs is the sample rate so a divide of 1 would be fs.

sound/soc/codecs/adau1373.c line 1203

Quoted 7 lines
sound/soc/codecs/adau1373.c new file +7 -0
+static void adau1373_load_drc_settings(struct snd_soc_codec *codec,
+	unsigned int nr, uint8_t *drc)
+{
+	unsigned int i;
+
+	for (i = 0; i < 13; ++i)
+		snd_soc_write(codec, ADAU1373_DRC(nr) + i, drc[i]);

ARRAY_SIZE() or a #define or something rather than a magic number.

author maintainer
#4 lore raw

Re: [PATCH 2/4] ASoC: Add ADAU1373 codec support

Quoted 7 lines

sound/soc/codecs/adau1373.c line 365

Quoted 3 lines
sound/soc/codecs/adau1373.c new file +2 -0
+	SOC_ENUM("Lineout1 Mono Stereo", adau1373_lineout1_mode_enum),
+	SOC_ENUM("Speaker Mono Stereo", adau1373_speaker_mode_enum),

I'd expect these to be platform data/machine data rather than user control? The speaker wiring isn't going to vary dynamically...

You still might want to switch, for whatever particular reason, between mono and stereo at runtime.

Quoted 10 lines

sound/soc/codecs/adau1373.c line 904

Quoted 7 lines
sound/soc/codecs/adau1373.c new file +7 -0
+	switch (freq / params_rate(params)) {
+	case 1024: /* fs */
+		div = 0;
+		break;
+	case 1536: /* 2/3 fs */
+		div = 1;
+		break;

These comments look inaccuate, fs is the sample rate so a divide of 1 would be fs.

div contains the register value representation of that particular divider.

#5 lore raw

Re: [PATCH 2/4] ASoC: Add ADAU1373 codec support

Quoted 8 lines · Lars-Peter Clausen
Quoted 5 lines

sound/soc/codecs/adau1373.c line 365

Quoted 2 lines
sound/soc/codecs/adau1373.c new file +2 -0
+	SOC_ENUM("Lineout1 Mono Stereo", adau1373_lineout1_mode_enum),
+	SOC_ENUM("Speaker Mono Stereo", adau1373_speaker_mode_enum),

I'd expect these to be platform data/machine data rather than user control? The speaker wiring isn't going to vary dynamically...

You still might want to switch, for whatever particular reason, between mono and stereo at runtime.

Sorry, what does this actually control? I guess I've been mislead but from the name of the control I'd expect it to control if the outputs were physically connected as mono or stereo outputs.

Quoted 11 lines
Quoted 10 lines

sound/soc/codecs/adau1373.c line 904

Quoted 7 lines
sound/soc/codecs/adau1373.c new file +7 -0
+	switch (freq / params_rate(params)) {
+	case 1024: /* fs */
+		div = 0;
+		break;
+	case 1536: /* 2/3 fs */
+		div = 1;
+		break;

These comments look inaccuate, fs is the sample rate so a divide of 1 would be fs.

Quoted 1 line

div contains the register value representation of that particular divider.

div isn't the issue here. The comments seem to indicate that the result of the divisions are some multiple of fs but fs usually means some multiple of the sample rate. For example 2/3fs for 44.1kHz would be 29.4kHz.

author maintainer
#6 lore raw

Re: [PATCH 2/4] ASoC: Add ADAU1373 codec support

Quoted 7 lines · Mark Brown
Quoted 5 lines · Lars-Peter Clausen
Quoted 5 lines

sound/soc/codecs/adau1373.c line 365

Quoted 2 lines
sound/soc/codecs/adau1373.c new file +2 -0
+	SOC_ENUM("Lineout1 Mono Stereo", adau1373_lineout1_mode_enum),
+	SOC_ENUM("Speaker Mono Stereo", adau1373_speaker_mode_enum),

I'd expect these to be platform data/machine data rather than user control? The speaker wiring isn't going to vary dynamically...

Quoted 6 lines
Quoted 2 lines

You still might want to switch, for whatever particular reason, between mono and stereo at runtime.

Sorry, what does this actually control? I guess I've been mislead but from the name of the control I'd expect it to control if the outputs were physically connected as mono or stereo outputs.

It controls how Lineout and Speaker mixers distribute the left and right input channels to their output channels.

Quoted 12 lines
Quoted 11 lines
Quoted 11 lines

sound/soc/codecs/adau1373.c line 904

Quoted 8 lines
sound/soc/codecs/adau1373.c new file +7 -0
+	switch (freq / params_rate(params)) {
+	case 1024: /* fs */
+		div = 0;
+		break;
+	case 1536: /* 2/3 fs */
+		div = 1;
+		break;

These comments look inaccuate, fs is the sample rate so a divide of 1 would be fs.

Quoted 7 lines
Quoted 1 line

div contains the register value representation of that particular divider.

div isn't the issue here. The comments seem to indicate that the result of the divisions are some multiple of fs but fs usually means some multiple of the sample rate. For example 2/3fs for 44.1kHz would be 29.4kHz.

Ah, ok. Yes, I guess the comments are a bit confusing since fs refers to the internal sample rate and not to the sample rate of the DAI. I'll try to clarify it.

#7 lore raw

Re: [PATCH 2/4] ASoC: Add ADAU1373 codec support

Quoted 8 lines · Lars-Peter Clausen
Quoted 3 lines · Mark Brown

Sorry, what does this actually control? I guess I've been mislead but from the name of the control I'd expect it to control if the outputs were physically connected as mono or stereo outputs.

It controls how Lineout and Speaker mixers distribute the left and right input channels to their output channels.

Ah, I see. I guess that should really be represented in DAPM so that if we're playing a mono signal out we figure out that both left and right channels are connected even if there's only input for one of them, especially for the line outputs which may be connected to external speaker drivers or something that needs power management.

author maintainer
#8 lore raw

Re: [PATCH 2/4] ASoC: Add ADAU1373 codec support

Quoted 7 lines · Mark Brown
Quoted 5 lines · Lars-Peter Clausen
Quoted 3 lines · Mark Brown

Sorry, what does this actually control? I guess I've been mislead but from the name of the control I'd expect it to control if the outputs were physically connected as mono or stereo outputs.

Quoted 9 lines
Quoted 2 lines

It controls how Lineout and Speaker mixers distribute the left and right input channels to their output channels.

Ah, I see. I guess that should really be represented in DAPM so that if we're playing a mono signal out we figure out that both left and right channels are connected even if there's only input for one of them, especially for the line outputs which may be connected to external speaker drivers or something that needs power management.

Looks as if both my understanding and my explanation on how this controls works were a bit inaccurate.

So here is how it works: There are 4 possible settings
Mute: Both the left and the right mixer are muted
Left Channel (L+R): The right mixer is muted. The left mixer is unmuted and for the input bypass signals both the left and the right channel are mixed into the output.
Right Channel (L+R): Similar to Left Channel (L+R), only for the right mixer.
Stereo: Both the left and the right mixer are unmuted. For the left mixer the left channels of the input bypass signals are mixed into the output and for the right mixer the right channels.

Since this driver's DAPM already doesn't distinguish between the left and the right channel of the input bypass signals none of the outputs or mixers are not powered when they should be.

So I would like to keep these as enums, as they are right now.

- Lars

#9 lore raw

Re: [PATCH 2/4] ASoC: Add ADAU1373 codec support

Quoted 5 lines · Lars-Peter Clausen

Since this driver's DAPM already doesn't distinguish between the left and the right channel of the input bypass signals none of the outputs or mixers are not powered when they should be.

So I would like to keep these as enums, as they are right now.

OK.

author maintainer
#10 lore raw

PATCH 3/4 ASoC: Blackfin: ADAU1373 eval board support

In reply to Lars-Peter Clausen

Add a machine driver to support the EVAL-ADAU1373 board connected to a Analog Devices BF5XX evaluation board.

---
 sound/soc/blackfin/Kconfig              |   14 ++
 sound/soc/blackfin/Makefile             |    2 +
 sound/soc/blackfin/bfin-eval-adau1373.c |  202 +++++++++++++++++++++++++++++++
 3 files changed, 218 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/blackfin/bfin-eval-adau1373.c
sound/soc/blackfin/Kconfig +14 -0
index fe9d548..9f537b4 100644
@@ -27,6 +27,20 @@ config SND_SOC_BFIN_EVAL_ADAU1701
 	  board connected to one of the Blackfin evaluation boards like the
 	  BF5XX-STAMP or BF5XX-EZKIT.
 
+config SND_SOC_BFIN_EVAL_ADAU1373
+	tristate "Support for the EVAL-ADAU1373 board on Blackfin eval boards"
+	depends on SND_BF5XX_I2S
+	select SND_BF5XX_SOC_I2S
+	select SND_SOC_ADAU1373
+	select I2C
+	help
+	  Say Y if you want to add support for the Analog Devices EVAL-ADAU1373
+	  board connected to one of the Blackfin evaluation boards like the
+	  BF5XX-STAMP or BF5XX-EZKIT.
+
+	  Note: This driver assumes that first ADAU1373 DAI is connected to the
+	  first SPORT port on the BF5XX board.
+
 config SND_SOC_BFIN_EVAL_ADAV80X
 	tristate "Support for the EVAL-ADAV80X boards on Blackfin eval boards"
 	depends on SND_BF5XX_I2S && (SPI_MASTER || I2C)
sound/soc/blackfin/Makefile +2 -0
index 6018bf5..1bf86cc 100644
@@ -21,6 +21,7 @@ snd-ad1980-objs := bf5xx-ad1980.o
 snd-ssm2602-objs := bf5xx-ssm2602.o
 snd-ad73311-objs := bf5xx-ad73311.o
 snd-ad193x-objs := bf5xx-ad193x.o
+snd-soc-bfin-eval-adau1373-objs := bfin-eval-adau1373.o
 snd-soc-bfin-eval-adau1701-objs := bfin-eval-adau1701.o
 snd-soc-bfin-eval-adav80x-objs := bfin-eval-adav80x.o
 
@@ -29,5 +30,6 @@ 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_AD193X) += snd-ad193x.o
+obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) += snd-soc-bfin-eval-adau1373.o
 obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) += snd-soc-bfin-eval-adau1701.o
 obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) += snd-soc-bfin-eval-adav80x.o
sound/soc/blackfin/bfin-eval-adau1373.c new file +202 -0

202 lines not on this page · raw message

Signature · 1 line
1.7.2.5
#11 lore raw

Re: [alsa-devel] [PATCH 3/4] ASoC: Blackfin: ADAU1373 eval board support

Quoted 6 lines

+config SND_SOC_BFIN_EVAL_ADAU1373
+       tristate "Support for the EVAL-ADAU1373 board on Blackfin eval boards"
+       depends on SND_BF5XX_I2S
+       select SND_BF5XX_SOC_I2S
+       select SND_SOC_ADAU1373
+       select I2C

Is it better to use depends on I2C?

Quoted 4 lines

+       help
+         Say Y if you want to add support for the Analog Devices EVAL-ADAU1373
+         board connected to one of the Blackfin evaluation boards like the
+         BF5XX-STAMP or BF5XX-EZKIT.

author maintainer
#12 lore raw

Re: [alsa-devel] [PATCH 3/4] ASoC: Blackfin: ADAU1373 eval board support

Quoted 9 lines · Scott Jiang

sound/soc/blackfin/Kconfig config SND_SOC_BFIN_EVAL_ADAU1701 · line 35

Quoted 6 lines
sound/soc/blackfin/Kconfig +6 -0
+config SND_SOC_BFIN_EVAL_ADAU1373
+       tristate "Support for the EVAL-ADAU1373 board on Blackfin eval boards"
+       depends on SND_BF5XX_I2S
+       select SND_BF5XX_SOC_I2S
+       select SND_SOC_ADAU1373
+       select I2C

Is it better to use depends on I2C?

Not sure, I just kept the scheme used by the other blackfin board drivers. But I guess it makes some sense change it to 'depends'. Especially if we consider that there are going to be board drivers with support for both I2C and SPI.

- Lars

author maintainer
#13 lore raw

PATCH 4/4 Blackfin: bf537: Stamp: Register ASoC EVAL-ADAU1373 board driver

In reply to Lars-Peter Clausen
---
 arch/blackfin/mach-bf537/boards/stamp.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
arch/blackfin/mach-bf537/boards/stamp.c +12 -0
index 4037043..6662c37 100644
@@ -2674,6 +2674,13 @@ static struct platform_device iio_gpio_trigger = {
 };
 #endif
 
+#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) || \
+	defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373_MODULE)
+static struct platform_device bf5xx_adau1373_device = {
+	.name = "bfin-eval-adau1373",
+};
+#endif
+
 #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \
 	defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE)
 static struct platform_device bf5xx_adau1701_device = {
@@ -2842,6 +2849,11 @@ static struct platform_device *stamp_devices[] __initdata = {
 	&iio_gpio_trigger,
 #endif
 
+#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) || \
+	defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373_MODULE)
+	&bf5xx_adau1373_device,
+#endif
+
 #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \
 	defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE)
 	&bf5xx_adau1701_device,
Signature · 1 line
1.7.2.5
#14 lore raw
In reply to Lars-Peter Clausen
Quoted 4 lines · Lars-Peter Clausen

Currently it is only possible to route one source per switch into a mixer. This patch modifies the code, so that it is possible to route multiple sources into a mixer via the same switch. One use-case for this is routing a stereo channel pair into a mono-mixer via the same switch.

I'd have thought the dapm_is_shared_control() stuff should handle this?

author maintainer
#15 lore raw
Quoted 7 lines · Mark Brown
Quoted 4 lines · Lars-Peter Clausen

Currently it is only possible to route one source per switch into a mixer. This patch modifies the code, so that it is possible to route multiple sources into a mixer via the same switch. One use-case for this is routing a stereo channel pair into a mono-mixer via the same switch.

I'd have thought the dapm_is_shared_control() stuff should handle this?

The dapm_is_shared_control() stuff is about sharing kcontrols between multiple muxes. This is about sharing the same kcontrol between multiple paths of the same mixer.

i.e

{ "Mono Mixer", "DAC", "Left DAC" },
{ "Mono Mixer", "DAC", "Right DAC" },

doesn't work without this patch.

#16 lore raw
Quoted 10 lines · Lars-Peter Clausen

The dapm_is_shared_control() stuff is about sharing kcontrols between multiple muxes. This is about sharing the same kcontrol between multiple paths of the same mixer.

i.e

{ "Mono Mixer", "DAC", "Left DAC" },
{ "Mono Mixer", "DAC", "Right DAC" },

doesn't work without this patch.

OK, makes sense.