[alsa-devel] [PATCH 5/7] ASoC: TWL4030: Helper to check chip default registers

Mark Brown broonie at opensource.wolfsonmicro.com
Wed May 26 08:35:00 CEST 2010

On Wed, May 26, 2010 at 09:28:49AM +0300, Peter Ujfalusi wrote:

> Better thing to do is:
> restore the registers in these cases:
> if (!setup || (setup && setup->reset_registers))

> So if the machine does not provide setup data, than we can assume, than no one 
> taken a time to tune the platform, so we need to restore to be on the safe side.

> What do you think?

This sounds like a sensible optimisation.  May also be an idea to
explicitly do a reset of the registers on unload - I guess nobody will
ever do that if they're not developing, and that'd probably mean that
many of the people who might actually need to reset the registers purely
for development will get the benefit of it without the risk of leaving
the option on in production by mistake.

I can't remember if you're doing this already (and don't even know if
it's possible with the hardware) but if you can do a bulk read of the
registers rather than reading register by register then the overhead
from the I/O should be noticably reduced if you do do the reset.

More information about the Alsa-devel mailing list