[alsa-devel] [PATCH 2/2] ASoC: DAPM - Make sure DAPM widget IO ops hold the component mutex.

Mark Brown broonie at opensource.wolfsonmicro.com
Wed Mar 7 21:00:19 CET 2012

On Wed, Mar 07, 2012 at 11:13:25AM +0000, Liam Girdwood wrote:
> On Wed, 2012-03-07 at 10:54 +0000, Mark Brown wrote:

> > Yes, we are but it's a simple comparison with integer so not the end of
> > the world.  I'd much rather have the check in the locking code so it's
> > clear what's expected instead of split between one of the call sites and
> > the locking function where it might easily get missed if someone adds a
> > new user.

> Ah, I'm thinking with a different perspective here ;-)

> My reasoning is that the widget lock will guarantee the component lock.
> With the regmap test we don't guarantee a component lock and subsequent
> new widget lock users may depend on this lock.

I don't understand what you mean by "component lock" here.  Do you mean
CODEC/platform lock or something else?  In any case it's stuff like the
above assumption which makes me want to be explicit here - either we
should take the lock in all paths or we always skip the lock in regmap
paths.  Either is fine for me, I'd just rather keep it straight in my

Actually given the number of indirections here (there's similar "is it a
platform" stuff for the I/O too) we probably want to create some base
class object before we start adding more stuff anyway.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120307/bd3fc789/attachment.sig 

More information about the Alsa-devel mailing list