[alsa-devel] Question about WM8904 regcache

Mark Brown broonie at kernel.org
Fri Jul 12 10:42:00 CEST 2013


On Fri, Jul 12, 2013 at 03:00:26PM +0800, Bo Shen wrote:

>   I try to add the following two line in wm8904_set_bias_level into
> "case SND_SOC_BIAS_ON", it doesn't work.
> ---8>---
> @@ -1832,9 +1834,12 @@ static int wm8904_set_bias_level(struct
> snd_soc_codec *codec,
> 
>         switch (level) {
>         case SND_SOC_BIAS_ON:
> +               regcache_cache_only(wm8904->regmap, false);
> +               regcache_sync(wm8904->regmap);
>                 break;
> ---<8---

That's far too late to be doing that, the device is already supposed to
be powered and running - you can see the device is doing this already in
the transition from _OFF to _STANDBY which is where it should happen.

>   However, If I comment the regcache_cache_only(wm8904->regmap,
> true) as following, then it play OK.
> ---8>---
> @@ -2232,7 +2239,7 @@ static int wm8904_i2c_probe(struct i2c_client *i2c,
>                             WM8904_POBCTRL, 0);
> 
>         /* Can leave the device powered off until we need it */
> -       regcache_cache_only(wm8904->regmap, true);
> +       // regcache_cache_only(wm8904->regmap, true);
> ---<8---

>   So, any clue for this issue?

The device is supposed to be idle_bias_off so sitting in _BIAS_OFF when
not in use, this should mean a transition to _STANDBY as part of the
power up sequence which should reenable interaction with the device.
Check to see why that is not happening - _OFF should be the default bias
level as well.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20130712/309ffb38/attachment.sig>


More information about the Alsa-devel mailing list