diff mbox series

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

Message ID 20230608221050.217968-1-nfraprado@collabora.com (mailing list archive)
State Accepted
Commit e352f31a863f47adfa54c76b633a21b1ed562387
Headers show
Series Revert "ASoC: mediatek: mt8192-mt6359: Remove " Jack" from Headphone pin name" | expand

Commit Message

Nícolas F. R. A. Prado June 8, 2023, 10:10 p.m. UTC
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.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

---

 sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

AngeloGioacchino Del Regno June 9, 2023, 7:37 a.m. UTC | #1
Il 09/06/23 00:10, Nícolas F. R. A. Prado ha scritto:
> 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.
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> 

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

> ---
> 
>   sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
> index 4e0d5bf12b47..5e163e23a207 100644
> --- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
> +++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
> @@ -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,
>   	},
>   	{
Mark Brown June 9, 2023, 9:39 a.m. UTC | #2
On Fri, Jun 09, 2023 at 09:37:33AM +0200, AngeloGioacchino Del Regno wrote:

> 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.
Mark Brown June 9, 2023, 9:39 a.m. UTC | #3
On Thu, Jun 08, 2023 at 06:10:48PM -0400, Nícolas F. R. A. Prado wrote:
> 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.
Mark Brown June 9, 2023, 12:03 p.m. UTC | #4
On Thu, 08 Jun 2023 18:10:48 -0400, Nícolas F. R. A. Prado wrote:
> 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
Nícolas F. R. A. Prado June 9, 2023, 1:08 p.m. UTC | #5
On Fri, Jun 09, 2023 at 10:39:25AM +0100, Mark Brown wrote:
> On Thu, Jun 08, 2023 at 06:10:48PM -0400, Nícolas F. R. A. Prado wrote:
> > 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.

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
Mark Brown June 9, 2023, 1:13 p.m. UTC | #6
On Fri, Jun 09, 2023 at 09:08:47AM -0400, Nícolas F. R. A. Prado wrote:
> On Fri, Jun 09, 2023 at 10:39:25AM +0100, Mark Brown wrote:

> > 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.

> 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.
diff mbox series

Patch

diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
index 4e0d5bf12b47..5e163e23a207 100644
--- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
+++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
@@ -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,
 	},
 	{