Commit ad5b7f69 authored by Samuel Holland's avatar Samuel Holland Committed by Mark Brown

ASoC: sun50i-codec-analog: Fix duplicate use of ADC enable bits

The same enable bits are currently used for both the "Left/Right ADC"
and the "Left/Right ADC Mixer" widgets. This happens to work in practice
because the widgets are always enabled/disabled at the same time, but
each register bit should only be associated with a single widget.

To keep symmetry with the DAC widgets, keep the bits on the ADC widgets,
and remove them from the ADC Mixer widgets.

Fixes: 42371f32 ("ASoC: sunxi: Add new driver for Allwinner A64 codec's analog path controls")
Reported-by: default avatarOndrej Jirman <megous@megous.com>
Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20200726025334.59931-2-samuel@sholland.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 549ade57
...@@ -363,12 +363,10 @@ static const struct snd_soc_dapm_widget sun50i_a64_codec_widgets[] = { ...@@ -363,12 +363,10 @@ static const struct snd_soc_dapm_widget sun50i_a64_codec_widgets[] = {
SUN50I_ADDA_MIX_DAC_CTRL_RMIXEN, 0, SUN50I_ADDA_MIX_DAC_CTRL_RMIXEN, 0,
sun50i_a64_codec_mixer_controls, sun50i_a64_codec_mixer_controls,
ARRAY_SIZE(sun50i_a64_codec_mixer_controls)), ARRAY_SIZE(sun50i_a64_codec_mixer_controls)),
SND_SOC_DAPM_MIXER("Left ADC Mixer", SUN50I_ADDA_ADC_CTRL, SND_SOC_DAPM_MIXER("Left ADC Mixer", SND_SOC_NOPM, 0, 0,
SUN50I_ADDA_ADC_CTRL_ADCLEN, 0,
sun50i_codec_adc_mixer_controls, sun50i_codec_adc_mixer_controls,
ARRAY_SIZE(sun50i_codec_adc_mixer_controls)), ARRAY_SIZE(sun50i_codec_adc_mixer_controls)),
SND_SOC_DAPM_MIXER("Right ADC Mixer", SUN50I_ADDA_ADC_CTRL, SND_SOC_DAPM_MIXER("Right ADC Mixer", SND_SOC_NOPM, 0, 0,
SUN50I_ADDA_ADC_CTRL_ADCREN, 0,
sun50i_codec_adc_mixer_controls, sun50i_codec_adc_mixer_controls,
ARRAY_SIZE(sun50i_codec_adc_mixer_controls)), ARRAY_SIZE(sun50i_codec_adc_mixer_controls)),
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment