Skip to contentSkip to conversation

ASoC: meson: Fix mixer-test issues

PATCH In review Mark Brown 2 participants 7 messages Apr 21, 2022

Subsystems (4)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

cover ASoC: meson: Fix mixer-test issues

These patches fix event generation issues in the custom controls in the Meson drivers detected by mixer-test and by inspection once I saw the pattern in these drivers. I'm also seeing other failures due to these controls having invalid values, eg:

# # AIU ACODEC SRC.0 value 3 more than item count 3

but without documentation I'm not sure how to interpret/fix these - either the value should be fixed up on startup or there should be an extra value there (disconnected possibly?).

Mark Brown (3):
ASoC: meson: Fix event generation for AUI ACODEC mux
ASoC: meson: Fix event generation for AUI CODEC mux
ASoC: meson: Fix event generation for G12A tohdmi mux

 sound/soc/meson/aiu-acodec-ctrl.c | 2 +-
 sound/soc/meson/aiu-codec-ctrl.c  | 2 +-
 sound/soc/meson/g12a-tohdmitx.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

base-commit: 3123109284176b1532874591f7c81f3837bbdc17

Signature · 7 lines
2.30.2


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
author maintainer
#1 lore raw

PATCH 1/3 ASoC: meson: Fix event generation for AUI ACODEC mux

The AIU ACODEC has a custom put() operation which returns 0 when the value of the mux changes, meaning that events are not generated for userspace. Change to return 1 in this case, the function returns early in the case where there is no change.

---
 sound/soc/meson/aiu-acodec-ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/meson/aiu-acodec-ctrl.c +1 -1
index 27a6d3259c50..442c215936d9 100644
@@ -58,7 +58,7 @@ static int aiu_acodec_ctrl_mux_put_enum(struct snd_kcontrol *kcontrol,
 
 	snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL);
 
-	return 0;
+	return 1;
 }
 
 static SOC_ENUM_SINGLE_DECL(aiu_acodec_ctrl_mux_enum, AIU_ACODEC_CTRL,
Signature · 7 lines
2.30.2


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
author maintainer
#2 lore raw

PATCH 2/3 ASoC: meson: Fix event generation for AUI CODEC mux

In reply to Mark Brown

The AIU CODEC has a custom put() operation which returns 0 when the value of the mux changes, meaning that events are not generated for userspace. Change to return 1 in this case, the function returns early in the case where there is no change.

---
 sound/soc/meson/aiu-codec-ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/meson/aiu-codec-ctrl.c +1 -1
index c3ea733fce91..c966fc60dc73 100644
@@ -57,7 +57,7 @@ static int aiu_codec_ctrl_mux_put_enum(struct snd_kcontrol *kcontrol,
 
 	snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL);
 
-	return 0;
+	return 1;
 }
 
 static SOC_ENUM_SINGLE_DECL(aiu_hdmi_ctrl_mux_enum, AIU_HDMI_CLK_DATA_CTRL,
Signature · 7 lines
2.30.2


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
author maintainer
#3 lore raw

PATCH 3/3 ASoC: meson: Fix event generation for G12A tohdmi mux

In reply to Mark Brown

The G12A tohdmi has a custom put() operation which returns 0 when the value of the mux changes, meaning that events are not generated for userspace. Change to return 1 in this case, the function returns early in the case where there is no change.

---
 sound/soc/meson/g12a-tohdmitx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/meson/g12a-tohdmitx.c +1 -1
index 9b2b59536ced..6c99052feafd 100644
@@ -67,7 +67,7 @@ static int g12a_tohdmitx_i2s_mux_put_enum(struct snd_kcontrol *kcontrol,
 
 	snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL);
 
-	return 0;
+	return 1;
 }
 
 static SOC_ENUM_SINGLE_DECL(g12a_tohdmitx_i2s_mux_enum, TOHDMITX_CTRL0,
Signature · 7 lines
2.30.2


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
maintainer Reviewed-by on the v1 series
#4 lore raw
In reply to Mark Brown
Quoted 3 lines · Mark Brown

These patches fix event generation issues in the custom controls in the Meson drivers detected by mixer-test and by inspection once I saw the pattern in these drivers.

Thx !

Quoted 8 lines

I'm also seeing other failures due to these
controls having invalid values, eg:

# # AIU ACODEC SRC.0 value 3 more than item count 3

but without documentation I'm not sure how to interpret/fix these - either the value should be fixed up on startup or there should be an extra value there (disconnected possibly?).

Value 3 is an I2S input from a block we don't support. If we did support it, it would be an hostless DPCM BE to BE link I'm not sure how I would represent this in ASoC TBH :/

At the time, I thought it would be easier (for the users) to leave this value out and not give the false impression that the path was somehow supported.

I did not realize it was the reset value nor that it would be a problem.

I can add a element to the enum if you think it is better have it regardless of the actual path support. What do you think ?

Quoted 6 lines

Mark Brown (3):
ASoC: meson: Fix event generation for AUI ACODEC mux
ASoC: meson: Fix event generation for AUI CODEC mux
ASoC: meson: Fix event generation for G12A tohdmi mux

Quoted 7 lines
 sound/soc/meson/aiu-acodec-ctrl.c | 2 +-
 sound/soc/meson/aiu-codec-ctrl.c  | 2 +-
 sound/soc/meson/g12a-tohdmitx.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

base-commit: 3123109284176b1532874591f7c81f3837bbdc17

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

author maintainer
#5 lore raw
Quoted 15 lines · Jerome Brunet
Quoted 8 lines · Mark Brown

I'm also seeing other failures due to these
controls having invalid values, eg:

# # AIU ACODEC SRC.0 value 3 more than item count 3

but without documentation I'm not sure how to interpret/fix these - either the value should be fixed up on startup or there should be an extra value there (disconnected possibly?).

Value 3 is an I2S input from a block we don't support. If we did support it, it would be an hostless DPCM BE to BE link I'm not sure how I would represent this in ASoC TBH :/

Quoted 8 lines

At the time, I thought it would be easier (for the users) to leave this value out and not give the false impression that the path was somehow supported.

I did not realize it was the reset value nor that it would be a problem.

I can add a element to the enum if you think it is better have it regardless of the actual path support. What do you think ?

I don't have strong feelings TBH - your argument for not supporting it for now makes sense to me and we generally try to avoid changing the hardware defaults. Probably I'd go with changing the default but since it's a valid value in the hardware it's most likely not too bad to leave things as they are for now, though there might be some applications that get confused and explode.

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

author maintainer
#6 lore raw
In reply to Mark Brown
Quoted 8 lines · Mark Brown

These patches fix event generation issues in the custom controls in the Meson drivers detected by mixer-test and by inspection once I saw the pattern in these drivers. I'm also seeing other failures due to these controls having invalid values, eg:

# # AIU ACODEC SRC.0 value 3 more than item count 3

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/3] ASoC: meson: Fix event generation for AUI ACODEC mux

      commit: 2e3a0d1bfa95b54333f7add3e50e288769373873
[2/3] ASoC: meson: Fix event generation for AUI CODEC mux
      commit: fce49921a22262736cdc3cc74fa67915b75e9363
[3/3] ASoC: meson: Fix event generation for G12A tohdmi mux
      commit: 12131008fc13ff7f7690d170b7a8f72d24fd7d1e

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic