[alsa-devel] [PATCH] ALSA: ASoC: cs4720: use snd_soc_cache_sync()

Daniel Mack zonque at gmail.com
Tue Nov 22 16:44:39 CET 2011


On 11/22/2011 04:35 PM, Mark Brown wrote:
> On Tue, Nov 22, 2011 at 04:23:05PM +0100, Daniel Mack wrote:
> 
>> The bug is reproducible by setting the output volume to 50% before
>> sending the device to suspend. After wakeup, amixer still reports the
>> old volume level, but the codec is in fact set to 100%. Changing it to
>> 50% doesn't do anything, but to any other level has an effect. This is
>> clearly a cache sync bug, but the piece that's missing is the reason why
>> my patch does the right thing.
> 
> That's very odd, not ringing any bells at all.  It's not like the
> existing code is trying to do anything clever with skipping writes, it
> just blasts in all the register values and it's affecting two different
> registers.

The code is so simple that I'm starting to suspect
i2c_smbus_write_byte_data() is doing something very wrong, but I can't
trace it without a hardware I2C analyzer right now. The i2c-regmap
low-level implementation uses different access functions under the hood,
so maybe that's a regression.

We also think that the effect is actually rather new.

> In any case, the patch is moving to factor code out in favour of core
> facilities so it's a good idea anyway.

Hmm, we should really care for the root cause, but maybe we can still
commit this thing, with a more appropriate commit log?


Daniel


More information about the Alsa-devel mailing list