On Fri, Sep 27, 2013 at 12:28:14PM -0700, Andrey Smirnov wrote:
That is the case for the V4L driver, in that code the locking is acquired for logical operations, such "tune" or "power up" rather than for a single register write, but for the codec driver, to the best of my knowledge, read and write register are the highest level operations that it provides. Or am I just unaware of some codec driver functionality that driver can provide and SoC sound subsystem will use that would allow the lock to be obtained at higher levels?
Since the driver doesn't expose any controls to userspace the only things that can cause register writes are the operations provided by the CODEC driver, they could take the lock for their runtime (which is about the level the v4l stuff is running at AIUI).
This still won't fix the issue with the device being powered off but I guess that normal usage patterns will have powered the device up to do tuning or something prior to audio being started.