Skip to contentSkip to conversation

Revert "ASoC: mediatek: mt8192-mt6359: Remove " Jack" from Headphone pin name"

PATCH In review Nícolas F. R. A. Prado 3 participants 7 messages Jun 8, 2023 – Jun 9, 2023

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

PATCH 1/1 Revert "ASoC: mediatek: mt8192-mt6359: Remove " Jack" from Headphone pin name"

This reverts commit cbbc0ec6dea09c815f1d1ef0abaf3f2ec89ff11f. That commit removed the " Jack" suffix with the reasoning that it is automatically added to the name of the kcontrol created, which is true, but this name is also used to look for the DAPM widget that will be toggled when the jack status is updated. Since the widget is still called "Headphone Jack" the jack can't link to the widget and the following error is shown:

mt8192_mt6359 sound: ASoC: DAPM unknown pin Headphone

It is not possible to also rename the headphone DAPM widget because its name is used by a switch kcontrol, "Headphone Jack Switch", both to link to the headphone widget and to assemble its name. This switch's name is referenced in the upstream UCM file, so renaming it would break userspace. Since the original commit didn't bring any benefit, besides sparing a few CPU cycles, simply revert it.

---

 sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +1 -1
index 4e0d5bf12b47..5e163e23a207 100644
@@ -46,7 +46,7 @@ struct mt8192_mt6359_priv {
 /* Headset jack detection DAPM pins */
 static struct snd_soc_jack_pin mt8192_jack_pins[] = {
 	{
-		.pin = "Headphone",
+		.pin = "Headphone Jack",
 		.mask = SND_JACK_HEADPHONE,
 	},
 	{
Signature · 1 line
2.41.0
#1 lore raw

Il 09/06/23 00:10, Nícolas F. R. A. Prado ha scritto:

Quoted 10 lines

This reverts commit cbbc0ec6dea09c815f1d1ef0abaf3f2ec89ff11f. That commit removed the " Jack" suffix with the reasoning that it is automatically added to the name of the kcontrol created, which is true, but this name is also used to look for the DAPM widget that will be toggled when the jack status is updated. Since the widget is still called "Headphone Jack" the jack can't link to the widget and the following error is shown:

mt8192_mt6359 sound: ASoC: DAPM unknown pin Headphone

Quoted 9 lines

It is not possible to also rename the headphone DAPM widget because its name is used by a switch kcontrol, "Headphone Jack Switch", both to link to the headphone widget and to assemble its name. This switch's name is referenced in the upstream UCM file, so renaming it would break userspace. Since the original commit didn't bring any benefit, besides sparing a few CPU cycles, simply revert it.

That commit is made to bring consistency in naming across MediaTek (with other) sound card drivers.. I'm not sure whether the right solution would be to revert this one, or to make a small change in the UCM, counting that we'd be able to add more shared names around, finally reducing the config length by sharing actual configurations across various SoCs.

Any opinion?

Thanks,
Angelo

Quoted 10 lines

---

  sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +0 -0
index 4e0d5bf12b47..5e163e23a207 100644

sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c struct mt8192_mt6359_priv { · line 52

Quoted 8 lines
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +1 -1
@@ -46,7 +46,7 @@ struct mt8192_mt6359_priv {
  /* Headset jack detection DAPM pins */
  static struct snd_soc_jack_pin mt8192_jack_pins[] = {
  	{
-		.pin = "Headphone",
+		.pin = "Headphone Jack",
  		.mask = SND_JACK_HEADPHONE,
  	},
  	{

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

maintainer
#2 lore raw
Quoted 7 lines · AngeloGioacchino Del Regno

That commit is made to bring consistency in naming across MediaTek (with other) sound card drivers.. I'm not sure whether the right solution would be to revert this one, or to make a small change in the UCM, counting that we'd be able to add more shared names around, finally reducing the config length by sharing actual configurations across various SoCs.

Any opinion?

It's ABI so if people are noticing it the old behaviour needs to stay.

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

maintainer
#3 lore raw
In reply to Nícolas F. R. A. Prado
Quoted 3 lines · Nícolas F. R. A. Prado

This reverts commit cbbc0ec6dea09c815f1d1ef0abaf3f2ec89ff11f. That commit removed the " Jack" suffix with the reasoning that it is automatically added to the name of the kcontrol created, which is true,

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

Please include human readable descriptions of things like commits and issues being discussed in e-mail in your mails, this makes them much easier for humans to read especially when they have no internet access. I do frequently catch up on my mail on flights or while otherwise travelling so this is even more pressing for me than just being about making things a bit easier to read.

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

#4 lore raw
Quoted 11 lines · Mark Brown
Quoted 3 lines · Nícolas F. R. A. Prado

This reverts commit cbbc0ec6dea09c815f1d1ef0abaf3f2ec89ff11f. That commit removed the " Jack" suffix with the reasoning that it is automatically added to the name of the kcontrol created, which is true,

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

Quoted 6 lines

Please include human readable descriptions of things like commits and issues being discussed in e-mail in your mails, this makes them much easier for humans to read especially when they have no internet access. I do frequently catch up on my mail on flights or while otherwise travelling so this is even more pressing for me than just being about making things a bit easier to read.

Hi Mark,

just for my own reference in the future, what exactly should have been done differently in this commit? Are the subject line and commit reference in the message generated by 'git revert' no good? Or is this message from a bot that can't handle revert commits?

Thanks,
Nícolas

maintainer
#5 lore raw
Quoted 8 lines · Nícolas F. R. A. Prado
Quoted 5 lines · Mark Brown

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

Quoted 4 lines

just for my own reference in the future, what exactly should have been done differently in this commit? Are the subject line and commit reference in the message generated by 'git revert' no good? Or is this message from a bot that can't handle revert commits?

Yes, what git revert generates by default are no good and you should edit it to look like a normal commit message with a standard subject line and standard way of referencing other commits.

maintainer
#6 lore raw
In reply to Nícolas F. R. A. Prado
Quoted 9 lines · Nícolas F. R. A. Prado

This reverts commit cbbc0ec6dea09c815f1d1ef0abaf3f2ec89ff11f. That commit removed the " Jack" suffix with the reasoning that it is automatically added to the name of the kcontrol created, which is true, but this name is also used to look for the DAPM widget that will be toggled when the jack status is updated. Since the widget is still called "Headphone Jack" the jack can't link to the widget and the following error is shown:

[...]

Applied to

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

Thanks!

[1/1] Revert "ASoC: mediatek: mt8192-mt6359: Remove " Jack" from Headphone pin name"

      commit: e352f31a863f47adfa54c76b633a21b1ed562387

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