diff mbox series

[RFT] ASoC: mediatek: mt8183-da7219-max98357: Fix kcontrol name collision

Message ID 20240531-da7219-v1-1-ac3343f3ae6a@chromium.org (mailing list archive)
State Accepted
Commit 97d8613679eb53bd0c07d0fbd3d8471e46ba46c1
Headers show
Series [RFT] ASoC: mediatek: mt8183-da7219-max98357: Fix kcontrol name collision | expand

Commit Message

Hsin-Te Yuan May 31, 2024, 8:37 a.m. UTC
Since "Headphone Switch" kcontrol name has already been used by da7219,
rename the control name from "Headphone" to "Headphones" to prevent the
colision. Also, this change makes kcontrol name align with the one in
mt8186-mt6366-da7219-max98357.c.

Fixes: 9c7388baa2053 ("ASoC: mediatek: mt8183-da7219-max98357: Map missing jack kcontrols")
Change-Id: I9ae69a4673cd04786b247cc514fdd20f878ef009
Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org>
---
This patch fix the kcontrol name collision in mt8183-da7219-max98357.c.
Originally, the "Headphone" kcontrol is added to meet PulseAudio's and
PipeWire's needs, but that patch was untested. Since I don't have
either setup, I wonder if someone can test this patch.
---
 sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)


---
base-commit: 4a4be1ad3a6efea16c56615f31117590fd881358
change-id: 20240531-da7219-2281085838a5

Best regards,

Comments

Chen-Yu Tsai June 5, 2024, 8:15 a.m. UTC | #1
On Fri, May 31, 2024 at 4:38 PM Hsin-Te Yuan <yuanhsinte@chromium.org> wrote:
>
> Since "Headphone Switch" kcontrol name has already been used by da7219,
> rename the control name from "Headphone" to "Headphones" to prevent the
> colision. Also, this change makes kcontrol name align with the one in

  ^ collision

> mt8186-mt6366-da7219-max98357.c.
>
> Fixes: 9c7388baa2053 ("ASoC: mediatek: mt8183-da7219-max98357: Map missing jack kcontrols")
> Change-Id: I9ae69a4673cd04786b247cc514fdd20f878ef009
> Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org>

Otherwise,

Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>

> ---
> This patch fix the kcontrol name collision in mt8183-da7219-max98357.c.
> Originally, the "Headphone" kcontrol is added to meet PulseAudio's and
> PipeWire's needs, but that patch was untested. Since I don't have
> either setup, I wonder if someone can test this patch.
> ---
>  sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
> index acaf81fd6c9b..f848e14b091a 100644
> --- a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
> +++ b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
> @@ -31,7 +31,7 @@ struct mt8183_da7219_max98357_priv {
>
>  static struct snd_soc_jack_pin mt8183_da7219_max98357_jack_pins[] = {
>         {
> -               .pin    = "Headphone",
> +               .pin    = "Headphones",
>                 .mask   = SND_JACK_HEADPHONE,
>         },
>         {
> @@ -626,7 +626,7 @@ static struct snd_soc_codec_conf mt6358_codec_conf[] = {
>  };
>
>  static const struct snd_kcontrol_new mt8183_da7219_max98357_snd_controls[] = {
> -       SOC_DAPM_PIN_SWITCH("Headphone"),
> +       SOC_DAPM_PIN_SWITCH("Headphones"),
>         SOC_DAPM_PIN_SWITCH("Headset Mic"),
>         SOC_DAPM_PIN_SWITCH("Speakers"),
>         SOC_DAPM_PIN_SWITCH("Line Out"),
> @@ -634,7 +634,7 @@ static const struct snd_kcontrol_new mt8183_da7219_max98357_snd_controls[] = {
>
>  static const
>  struct snd_soc_dapm_widget mt8183_da7219_max98357_dapm_widgets[] = {
> -       SND_SOC_DAPM_HP("Headphone", NULL),
> +       SND_SOC_DAPM_HP("Headphones", NULL),
>         SND_SOC_DAPM_MIC("Headset Mic", NULL),
>         SND_SOC_DAPM_SPK("Speakers", NULL),
>         SND_SOC_DAPM_SPK("Line Out", NULL),
> @@ -680,7 +680,7 @@ static struct snd_soc_codec_conf mt8183_da7219_rt1015_codec_conf[] = {
>  };
>
>  static const struct snd_kcontrol_new mt8183_da7219_rt1015_snd_controls[] = {
> -       SOC_DAPM_PIN_SWITCH("Headphone"),
> +       SOC_DAPM_PIN_SWITCH("Headphones"),
>         SOC_DAPM_PIN_SWITCH("Headset Mic"),
>         SOC_DAPM_PIN_SWITCH("Left Spk"),
>         SOC_DAPM_PIN_SWITCH("Right Spk"),
> @@ -689,7 +689,7 @@ static const struct snd_kcontrol_new mt8183_da7219_rt1015_snd_controls[] = {
>
>  static const
>  struct snd_soc_dapm_widget mt8183_da7219_rt1015_dapm_widgets[] = {
> -       SND_SOC_DAPM_HP("Headphone", NULL),
> +       SND_SOC_DAPM_HP("Headphones", NULL),
>         SND_SOC_DAPM_MIC("Headset Mic", NULL),
>         SND_SOC_DAPM_SPK("Left Spk", NULL),
>         SND_SOC_DAPM_SPK("Right Spk", NULL),
>
> ---
> base-commit: 4a4be1ad3a6efea16c56615f31117590fd881358
> change-id: 20240531-da7219-2281085838a5
>
> Best regards,
> --
> Hsin-Te Yuan <yuanhsinte@chromium.org>
>
>
Mark Brown June 5, 2024, 9:05 p.m. UTC | #2
On Fri, 31 May 2024 08:37:54 +0000, Hsin-Te Yuan wrote:
> Since "Headphone Switch" kcontrol name has already been used by da7219,
> rename the control name from "Headphone" to "Headphones" to prevent the
> colision. Also, this change makes kcontrol name align with the one in
> mt8186-mt6366-da7219-max98357.c.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: mediatek: mt8183-da7219-max98357: Fix kcontrol name collision
      commit: 97d8613679eb53bd0c07d0fbd3d8471e46ba46c1

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
Hsin-Te Yuan June 11, 2024, 8:02 a.m. UTC | #3
On Thu, Jun 6, 2024 at 5:05 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Fri, 31 May 2024 08:37:54 +0000, Hsin-Te Yuan wrote:
> > Since "Headphone Switch" kcontrol name has already been used by da7219,
> > rename the control name from "Headphone" to "Headphones" to prevent the
> > colision. Also, this change makes kcontrol name align with the one in
> > mt8186-mt6366-da7219-max98357.c.
> >
> >
>
> Applied to
>
>    https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
>
> Thanks!
>
> [1/1] ASoC: mediatek: mt8183-da7219-max98357: Fix kcontrol name collision
>       commit: 97d8613679eb53bd0c07d0fbd3d8471e46ba46c1
>
> 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
>

Hi Mark,

I accidentally added a Change-Id field in the commit message. Can you
help remove it before sending it to Linus?

Thanks,
Hsin-Te
Mark Brown June 11, 2024, 10:17 a.m. UTC | #4
On Tue, Jun 11, 2024 at 04:02:08PM +0800, Hsin-Te Yuan wrote:

> I accidentally added a Change-Id field in the commit message. Can you
> help remove it before sending it to Linus?

Sorry, there's other commits on top of it now - one commit ID won't do
any harm, it'll be fine.
diff mbox series

Patch

diff --git a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
index acaf81fd6c9b..f848e14b091a 100644
--- a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
@@ -31,7 +31,7 @@  struct mt8183_da7219_max98357_priv {
 
 static struct snd_soc_jack_pin mt8183_da7219_max98357_jack_pins[] = {
 	{
-		.pin	= "Headphone",
+		.pin	= "Headphones",
 		.mask	= SND_JACK_HEADPHONE,
 	},
 	{
@@ -626,7 +626,7 @@  static struct snd_soc_codec_conf mt6358_codec_conf[] = {
 };
 
 static const struct snd_kcontrol_new mt8183_da7219_max98357_snd_controls[] = {
-	SOC_DAPM_PIN_SWITCH("Headphone"),
+	SOC_DAPM_PIN_SWITCH("Headphones"),
 	SOC_DAPM_PIN_SWITCH("Headset Mic"),
 	SOC_DAPM_PIN_SWITCH("Speakers"),
 	SOC_DAPM_PIN_SWITCH("Line Out"),
@@ -634,7 +634,7 @@  static const struct snd_kcontrol_new mt8183_da7219_max98357_snd_controls[] = {
 
 static const
 struct snd_soc_dapm_widget mt8183_da7219_max98357_dapm_widgets[] = {
-	SND_SOC_DAPM_HP("Headphone", NULL),
+	SND_SOC_DAPM_HP("Headphones", NULL),
 	SND_SOC_DAPM_MIC("Headset Mic", NULL),
 	SND_SOC_DAPM_SPK("Speakers", NULL),
 	SND_SOC_DAPM_SPK("Line Out", NULL),
@@ -680,7 +680,7 @@  static struct snd_soc_codec_conf mt8183_da7219_rt1015_codec_conf[] = {
 };
 
 static const struct snd_kcontrol_new mt8183_da7219_rt1015_snd_controls[] = {
-	SOC_DAPM_PIN_SWITCH("Headphone"),
+	SOC_DAPM_PIN_SWITCH("Headphones"),
 	SOC_DAPM_PIN_SWITCH("Headset Mic"),
 	SOC_DAPM_PIN_SWITCH("Left Spk"),
 	SOC_DAPM_PIN_SWITCH("Right Spk"),
@@ -689,7 +689,7 @@  static const struct snd_kcontrol_new mt8183_da7219_rt1015_snd_controls[] = {
 
 static const
 struct snd_soc_dapm_widget mt8183_da7219_rt1015_dapm_widgets[] = {
-	SND_SOC_DAPM_HP("Headphone", NULL),
+	SND_SOC_DAPM_HP("Headphones", NULL),
 	SND_SOC_DAPM_MIC("Headset Mic", NULL),
 	SND_SOC_DAPM_SPK("Left Spk", NULL),
 	SND_SOC_DAPM_SPK("Right Spk", NULL),