Skip to content

Commit c5487b9

Browse files
Fabio Estevambroonie
authored andcommitted
ASoC: cs4265: Fix the duplicated control name
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: f853d6b ("ASoC: cs4265: Add a S/PDIF enable switch") Signed-off-by: Fabio Estevam <[email protected]> Acked-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 9bdd10d commit c5487b9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sound/soc/codecs/cs4265.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ static const struct snd_kcontrol_new cs4265_snd_controls[] = {
150150
SOC_SINGLE("E to F Buffer Disable Switch", CS4265_SPDIF_CTL1,
151151
6, 1, 0),
152152
SOC_ENUM("C Data Access", cam_mode_enum),
153-
SOC_SINGLE("SPDIF Switch", CS4265_SPDIF_CTL2, 5, 1, 1),
154153
SOC_SINGLE("Validity Bit Control Switch", CS4265_SPDIF_CTL2,
155154
3, 1, 0),
156155
SOC_ENUM("SPDIF Mono/Stereo", spdif_mono_stereo_enum),
@@ -186,7 +185,7 @@ static const struct snd_soc_dapm_widget cs4265_dapm_widgets[] = {
186185

187186
SND_SOC_DAPM_SWITCH("Loopback", SND_SOC_NOPM, 0, 0,
188187
&loopback_ctl),
189-
SND_SOC_DAPM_SWITCH("SPDIF", SND_SOC_NOPM, 0, 0,
188+
SND_SOC_DAPM_SWITCH("SPDIF", CS4265_SPDIF_CTL2, 5, 1,
190189
&spdif_switch),
191190
SND_SOC_DAPM_SWITCH("DAC", CS4265_PWRCTL, 1, 1,
192191
&dac_switch),

0 commit comments

Comments
 (0)