Skip to contentSkip to conversation

ASoC: max98090: Fix digital microphone

PATCH Applied Jarkko Nikula 2 participants 6 messages Nov 24, 2014

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

PATCH 1/3 ASoC: max98090: Fix digital microphone

Commit e409dfbfccf9 ("ASoC: dapm: Add a few supply widget sanity checks") broke digital microphone support in max98090.c:

max98090 i2c-193C9890:00: Conditional paths are not supported for supply widgets (DMICL_ENA -> [DMIC] -> DMIC Mux) max98090 i2c-193C9890:00: ASoC: no dapm match for DMICL_ENA --> DMIC --> DMIC Mux
max98090 i2c-193C9890:00: ASoC: Failed to add route DMICL_ENA -> DMIC -> DMIC Mux
max98090 i2c-193C9890:00: Conditional paths are not supported for supply widgets (DMICR_ENA -> [DMIC] -> DMIC Mux) max98090 i2c-193C9890:00: ASoC: no dapm match for DMICR_ENA --> DMIC --> DMIC Mux
max98090 i2c-193C9890:00: ASoC: Failed to add route DMICR_ENA -> DMIC -> DMIC Mux

Problem is partially caused by commit f69e3caa9e18 ("ASoC: max98090: Enable both DMIC channels also when using mono configuration") which connects "DMICL_ENA" and "DMICR_ENA" supply widgets to "DMIC Mux".

Fix the breakage by reverting f69e3caa9e18 and then by adding additional "DMICR_ENA" to "DMICL" and "DMICL_ENA" to "DMICR" cross-connections. This disconnects these supply widgets from the mux and makes sure that both DMIC data channels are still enabled together.

Cc Lars-Peter Clausen <[email protected]>
---
 sound/soc/codecs/max98090.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
sound/soc/codecs/max98090.c +4 -2
index 2ad381c4ec57..19258a910974 100644
@@ -1311,6 +1311,10 @@ static const struct snd_soc_dapm_route max98090_dapm_routes[] = {
 	{"MIC1 Input", NULL, "MIC1"},
 	{"MIC2 Input", NULL, "MIC2"},
 
+	{"DMICL", NULL, "DMICL_ENA"},
+	{"DMICL", NULL, "DMICR_ENA"},
+	{"DMICR", NULL, "DMICL_ENA"},
+	{"DMICR", NULL, "DMICR_ENA"},
 	{"DMICL", NULL, "AHPF"},
 	{"DMICR", NULL, "AHPF"},
 
@@ -1368,8 +1372,6 @@ static const struct snd_soc_dapm_route max98090_dapm_routes[] = {
 	{"DMIC Mux", "ADC", "ADCR"},
 	{"DMIC Mux", "DMIC", "DMICL"},
 	{"DMIC Mux", "DMIC", "DMICR"},
-	{"DMIC Mux", "DMIC", "DMICL_ENA"},
-	{"DMIC Mux", "DMIC", "DMICR_ENA"},
 
 	{"LBENL Mux", "Normal", "DMIC Mux"},
 	{"LBENL Mux", "Loopback", "LTENL Mux"},
Signature · 1 line
2.1.3
#1 lore raw

PATCH 2/3 ASoC: max98090: Fix ill-defined sidetone route

Commit 5fe5b767dc6f ("ASoC: dapm: Do not pretend to support controls for non mixer/mux widgets") revealed ill-defined control in a route between "STENL Mux" and DACs in max98090.c:

max98090 i2c-193C9890:00: Control not supported for path STENL Mux -> [NULL] -> DACL max98090 i2c-193C9890:00: ASoC: no dapm match for STENL Mux --> NULL --> DACL max98090 i2c-193C9890:00: ASoC: Failed to add route STENL Mux -> NULL -> DACL max98090 i2c-193C9890:00: Control not supported for path STENL Mux -> [NULL] -> DACR max98090 i2c-193C9890:00: ASoC: no dapm match for STENL Mux --> NULL --> DACR max98090 i2c-193C9890:00: ASoC: Failed to add route STENL Mux -> NULL -> DACR

Since there is no control between "STENL Mux" and DACs the control name must be NULL not "NULL".

Cc Lars-Peter Clausen <[email protected]>
---
 sound/soc/codecs/max98090.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/max98090.c +2 -2
index 19258a910974..331b3e473c51 100644
@@ -1397,8 +1397,8 @@ static const struct snd_soc_dapm_route max98090_dapm_routes[] = {
 	{"STENL Mux", "Sidetone Left", "DMICL"},
 	{"STENR Mux", "Sidetone Right", "ADCR"},
 	{"STENR Mux", "Sidetone Right", "DMICR"},
-	{"DACL", "NULL", "STENL Mux"},
-	{"DACR", "NULL", "STENL Mux"},
+	{"DACL", NULL, "STENL Mux"},
+	{"DACR", NULL, "STENL Mux"},
 
 	{"AIFINL", NULL, "SHDN"},
 	{"AIFINR", NULL, "SHDN"},
Signature · 1 line
2.1.3
maintainer Applied
#2 lore raw

Re: [PATCH 2/3] ASoC: max98090: Fix ill-defined sidetone route

Quoted 3 lines · Jarkko Nikula

Commit 5fe5b767dc6f ("ASoC: dapm: Do not pretend to support controls for non mixer/mux widgets") revealed ill-defined control in a route between "STENL Mux" and DACs in max98090.c:

Applied, thanks.

#3 lore raw

PATCH 3/3 ASoC: max98090: Fix right sidetone connection

In reply to Jarkko Nikula

It is right not left sidetone which goes to "DACR".

---
 sound/soc/codecs/max98090.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/max98090.c +1 -1
index 331b3e473c51..151f718241ea 100644
@@ -1398,7 +1398,7 @@ static const struct snd_soc_dapm_route max98090_dapm_routes[] = {
 	{"STENR Mux", "Sidetone Right", "ADCR"},
 	{"STENR Mux", "Sidetone Right", "DMICR"},
 	{"DACL", NULL, "STENL Mux"},
-	{"DACR", NULL, "STENL Mux"},
+	{"DACR", NULL, "STENR Mux"},
 
 	{"AIFINL", NULL, "SHDN"},
 	{"AIFINR", NULL, "SHDN"},
Signature · 1 line
2.1.3
maintainer Applied
#4 lore raw

Re: [PATCH 3/3] ASoC: max98090: Fix right sidetone connection

Quoted 1 line · Jarkko Nikula

It is right not left sidetone which goes to "DACR".

Applied, thanks.

maintainer Applied
#5 lore raw
In reply to Jarkko Nikula
Quoted 2 lines · Jarkko Nikula

Commit e409dfbfccf9 ("ASoC: dapm: Add a few supply widget sanity checks") broke digital microphone support in max98090.c:

Applied, thanks.