[alsa-devel] [PATCH v2 RESEND] ASoC: wm9081: Use snd_soc_update_bits for read-modify-write

Mark Brown broonie at opensource.wolfsonmicro.com
Fri Nov 4 23:17:31 CET 2011


On Wed, Oct 19, 2011 at 11:06:27AM +0800, Axel Lin wrote:

>  			/* Normal bias enable & soft start off */
> -			reg |= WM9081_BIAS_ENA;
> -			reg &= ~WM9081_VMID_RAMP;
> -			snd_soc_write(codec, WM9081_VMID_CONTROL, reg);
> +			snd_soc_update_bits(codec, WM9081_VMID_CONTROL,
> +					    WM9081_VMID_RAMP | WM9081_BIAS_ENA |
> +					    WM9081_VMID_SEL_MASK,
> +					    WM9081_BIAS_ENA);

This looks (and sounds) wrong - the original code didn't touch
VMID_SEL_MASK for this update but the new version will clear
VMID_SEL_MASK.  Even with that fixed there still seems to be some issue
here, though.


More information about the Alsa-devel mailing list