alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Liam Girdwood <lrg@ti.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 2/3] ASoC: dapm - Use card mutex for DAPM ops instead of codec mutex.
Date: Mon, 5 Mar 2012 15:26:16 +0000	[thread overview]
Message-ID: <20120305152616.GS3224@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1330958882.4370.15.camel@odin>


[-- Attachment #1.1: Type: text/plain, Size: 1071 bytes --]

On Mon, Mar 05, 2012 at 02:48:02PM +0000, Liam Girdwood wrote:

> A separate DAPM mutex and subclass (for init and PCM ops) would be
> required here but I'm fine with that too. 

What's the path where init and PCM ops end up fighting with each other
for DAPM?  I can't think of one right now.

> I do also need the card mutex changes for Dynamic PCM though since we
> need to lock the card PCM operations for Dynamic PCM devices.

Yes, they do need to have something.

> Fwiw, looking at mutex holders in soc/codecs/ gives us :-
> 
> grep -rn "mutex_lock(" sound/soc/codecs/

> sound/soc/codecs/twl6040.c:686:	mutex_lock(&priv->mutex);

> Some of which initially look like private mutexs.

Yes, we only really need to worry about the ones that are taking a
subsystem level mutex here - if they're locking a driver-local mutex
they shouldn't need to worry about what the subsystem does.

The twl6040 one looks like it doesn't work anyway as we're only taking
the lock at one point which is itself guaranteed to be called only from
one context.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2012-03-05 15:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-02 18:11 [PATCH 1/3] ASoC: core - Add card mutex locking subclasses Liam Girdwood
2012-03-02 18:11 ` [PATCH 2/3] ASoC: dapm - Use card mutex for DAPM ops instead of codec mutex Liam Girdwood
2012-03-04 14:09   ` Mark Brown
2012-03-05 14:48     ` Liam Girdwood
2012-03-05 15:26       ` Mark Brown [this message]
2012-03-05 15:55         ` Liam Girdwood
2012-03-05 16:45           ` Mark Brown
2012-03-05 17:05             ` Liam Girdwood
2012-03-05 20:34               ` Mark Brown
2012-03-02 18:11 ` [PATCH 3/3] ASoC: dapm - lock mixer & mux update power with card mutex Liam Girdwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120305152616.GS3224@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).