[alsa-devel] [PATCH] ASoC: clean up wm8974 and wm8978 clock divider handling

Mark Brown broonie at opensource.wolfsonmicro.com
Fri Jan 29 15:15:19 CET 2010


On Thu, Jan 28, 2010 at 04:30:54PM +0100, Guennadi Liakhovetski wrote:
> wm8974 and wm8978 codec drivers control DAC and ADC oversampling rates in their
> .set_clkdiv() methods, which is wrong, because these are simple boolean
> switches and not clock dividers. Move these bits to sound controls. Also remove
> manual configuration of the MCLK divider in wm8978, since it is configured
> automatically.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski at gmx.de>
> ---
>  sound/soc/codecs/wm8974.c |   12 ++++--------
>  sound/soc/codecs/wm8974.h |   12 +-----------
>  sound/soc/codecs/wm8978.c |   19 ++++---------------
>  sound/soc/codecs/wm8978.h |    3 ---
>  sound/soc/sh/migor.c      |    4 ----
>  5 files changed, 9 insertions(+), 41 deletions(-)
> 
> diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c
> index 8812751..051d58d 100644
> --- a/sound/soc/codecs/wm8974.c
> +++ b/sound/soc/codecs/wm8974.c
> @@ -170,6 +170,10 @@ SOC_ENUM("Aux Mode", wm8974_auxmode),
>  
>  SOC_SINGLE("Capture Boost(+20dB)", WM8974_ADCBOOST,  8, 1, 0),
>  SOC_SINGLE("Mono Playback Switch", WM8974_MONOMIX, 6, 1, 1),
> +
> +/* DAC / ADC oversampling */
> +SOC_SINGLE("DAC 128x Oversampling", WM8974_DAC, 8, 1, 0),
> +SOC_SINGLE("ADC 128x Oversampling", WM8974_ADC, 8, 1, 0),

Should be "... Switch" for the benefit of applications.


More information about the Alsa-devel mailing list