All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: cs4265: Fix the duplicated control name
@ 2022-02-15 12:05 Fabio Estevam
  2022-02-15 13:23 ` Charles Keepax
  2022-02-16 18:01 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2022-02-15 12:05 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, Fabio Estevam, ckeepax, flatmax

From: Fabio Estevam <festevam@denx.de>

Currently, the following error messages are seen during boot:

asoc-simple-card sound: control 2:0:0:SPDIF Switch:0 is already present
cs4265 1-004f: ASoC: failed to add widget SPDIF dapm kcontrol SPDIF Switch: -16

Quoting Mark Brown:

"The driver is just plain buggy, it defines both a regular SPIDF Switch
control and a SND_SOC_DAPM_SWITCH() called SPDIF both of which will
create an identically named control, it can never have loaded without
error.  One or both of those has to be renamed or they need to be
merged into one thing."

Fix the duplicated control name by combining the two SPDIF controls here
and move the register bits onto the DAPM widget and have DAPM control them.

Fixes: f853d6b3ba34 ("ASoC: cs4265: Add a S/PDIF enable switch")
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
Changes since v1:
- Combine the two controls (Charles)

 sound/soc/codecs/cs4265.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c
index 4aaee1873a11..4415fb364d4d 100644
--- a/sound/soc/codecs/cs4265.c
+++ b/sound/soc/codecs/cs4265.c
@@ -150,7 +150,6 @@ static const struct snd_kcontrol_new cs4265_snd_controls[] = {
 	SOC_SINGLE("E to F Buffer Disable Switch", CS4265_SPDIF_CTL1,
 				6, 1, 0),
 	SOC_ENUM("C Data Access", cam_mode_enum),
-	SOC_SINGLE("SPDIF Switch", CS4265_SPDIF_CTL2, 5, 1, 1),
 	SOC_SINGLE("Validity Bit Control Switch", CS4265_SPDIF_CTL2,
 				3, 1, 0),
 	SOC_ENUM("SPDIF Mono/Stereo", spdif_mono_stereo_enum),
@@ -186,7 +185,7 @@ static const struct snd_soc_dapm_widget cs4265_dapm_widgets[] = {
 
 	SND_SOC_DAPM_SWITCH("Loopback", SND_SOC_NOPM, 0, 0,
 			&loopback_ctl),
-	SND_SOC_DAPM_SWITCH("SPDIF", SND_SOC_NOPM, 0, 0,
+	SND_SOC_DAPM_SWITCH("SPDIF", CS4265_SPDIF_CTL2, 5, 1,
 			&spdif_switch),
 	SND_SOC_DAPM_SWITCH("DAC", CS4265_PWRCTL, 1, 1,
 			&dac_switch),
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ASoC: cs4265: Fix the duplicated control name
  2022-02-15 12:05 [PATCH v2] ASoC: cs4265: Fix the duplicated control name Fabio Estevam
@ 2022-02-15 13:23 ` Charles Keepax
  2022-02-16 18:01 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2022-02-15 13:23 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, broonie, flatmax

On Tue, Feb 15, 2022 at 09:05:14AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Currently, the following error messages are seen during boot:
> 
> asoc-simple-card sound: control 2:0:0:SPDIF Switch:0 is already present
> cs4265 1-004f: ASoC: failed to add widget SPDIF dapm kcontrol SPDIF Switch: -16
> 
> Quoting Mark Brown:
> 
> "The driver is just plain buggy, it defines both a regular SPIDF Switch
> control and a SND_SOC_DAPM_SWITCH() called SPDIF both of which will
> create an identically named control, it can never have loaded without
> error.  One or both of those has to be renamed or they need to be
> merged into one thing."
> 
> Fix the duplicated control name by combining the two SPDIF controls here
> and move the register bits onto the DAPM widget and have DAPM control them.
> 
> Fixes: f853d6b3ba34 ("ASoC: cs4265: Add a S/PDIF enable switch")
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ASoC: cs4265: Fix the duplicated control name
  2022-02-15 12:05 [PATCH v2] ASoC: cs4265: Fix the duplicated control name Fabio Estevam
  2022-02-15 13:23 ` Charles Keepax
@ 2022-02-16 18:01 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-02-16 18:01 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: alsa-devel, Fabio Estevam, ckeepax, flatmax

On Tue, 15 Feb 2022 09:05:14 -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Currently, the following error messages are seen during boot:
> 
> asoc-simple-card sound: control 2:0:0:SPDIF Switch:0 is already present
> cs4265 1-004f: ASoC: failed to add widget SPDIF dapm kcontrol SPDIF Switch: -16
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: cs4265: Fix the duplicated control name
      commit: c5487b9cdea5c1ede38a7ec94db0fc59963c8e86

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-16 18:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 12:05 [PATCH v2] ASoC: cs4265: Fix the duplicated control name Fabio Estevam
2022-02-15 13:23 ` Charles Keepax
2022-02-16 18:01 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.