[alsa-devel] [PATCH v2] ASoC: sgtl5000: Fix driver probe after reset

Mark Brown broonie at kernel.org
Thu May 9 12:00:52 CEST 2013


On Wed, May 08, 2013 at 05:45:55PM -0300, Fabio Estevam wrote:

> As the sgtl5000 codec did not go through a real reset, we cannot rely on the 
> sgtl5000_reg_defaults array, since these are only valid after a clean power-on 
> reset.

> To fix this issue, use 'num_reg_defaults_raw' which tells the regcache driver
> to actually read the codec registers and then fill the cache with these values.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> ---
> Changes since v1:
> - Remove sgtl5000_reg_defaults array
> - Do not use num_reg_defaults_raw

Changelog update needed here :)

I'm not sure that removing the defaults is the ideal thing here - it
means that the driver will be stuck with whatever the last booted OS
left the device running which may or may not be sane.  Explicitly
writing in all the values we want seems safer, that way we know how the
device is configured and there's less potential for odd bugs caused by
rebooting at the wrong moment.
-------------- 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/20130509/11a4c544/attachment.sig>


More information about the Alsa-devel mailing list