From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lrg@ti.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Subject: Re: [PATCH 1/5] ASoC: Hold runtime PM references to components of active DAIs
Date: Mon, 5 Dec 2011 13:46:11 +0000 [thread overview]
Message-ID: <20111205134610.GO11150@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4EDCC7E3.6060702@ti.com>
On Mon, Dec 05, 2011 at 03:32:19PM +0200, Peter Ujfalusi wrote:
> On 12/05/2011 01:39 PM, Mark Brown wrote:
> > This increases the amount of time we are sitting with the pcm_mutex held
> > and I can't see a reason why we should need to do that. If there is a
> > problem here I'd rather improve the drivers so that they can cope with
> > having the power management happening after the lock, the main reason
> > the drivers were doing this previously is that the lock happened to be
> > held by the caller.
> It is just that the pm_runtime calls might need the same protection as
> the other operations for dais/codecs/driver.
Well, the pcm_mutex doesn't cover all of those anyway (trigger and
pointer in particular) and we've no guarantee that anything will
actually happen at the point where the core does the calls as there may
be other things holding the device active.
> I just thought about this series, and it might broke the omap-mcpdm
> driver as soon as we have the BIAS_OFF support for the twl6040 codec
> driver. The functional clock is coming from the external codec. If we
> power down the external fclk we will see external abort crash, since the
> McPDM IP does not have the needed clocks at the time of the
> pm_runtime_put_sync call (which will try to configure some McPDM registers).
> Need to check this. Can we hold this series back for a while?
I don't understand how this could make the situation any worse than it
is already - if nothing else this series will only make the region where
we've got the device active slightly wider. There's definitely an issue
there, but it seems like it already exists and is orthogonal to this
refactoring. The McPDM needs to hold a reference on the CODEC somehow
while it is active it seems, either via DAPM or via the runtime_pm APIs.
Also note that as this is a reference counting API there's nothing
stopping any of the devices from being kept active independantly of
this, your use case would seem to be a good example of the sort of
situation where this might be useful.
next prev parent reply other threads:[~2011-12-05 13:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-05 0:01 [PATCH 1/5] ASoC: Hold runtime PM references to components of active DAIs Mark Brown
2011-12-05 0:01 ` [PATCH 2/5] ASoC: Use core pm_runtime callbacks for omap-dmic Mark Brown
2011-12-05 8:02 ` Peter Ujfalusi
2011-12-05 0:01 ` [PATCH 3/5] ASoC: Use core pm_runtime callbacks for omap-mcpdm Mark Brown
2011-12-05 8:32 ` Peter Ujfalusi
2011-12-05 0:01 ` [PATCH 4/5] ASoC: Use core pm_runtime callbacks for siu_dai Mark Brown
2011-12-05 0:01 ` [PATCH 5/5] ASoC: Use core pm_runtime callbacks for fsi Mark Brown
2011-12-05 8:01 ` [PATCH 1/5] ASoC: Hold runtime PM references to components of active DAIs Peter Ujfalusi
2011-12-05 11:39 ` Mark Brown
2011-12-05 13:32 ` Peter Ujfalusi
2011-12-05 13:46 ` Mark Brown [this message]
2011-12-05 14:53 ` Peter Ujfalusi
2011-12-05 15:07 ` Mark Brown
2011-12-07 7:47 ` Peter Ujfalusi
2011-12-07 7:48 ` Peter Ujfalusi
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=20111205134610.GO11150@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=g.liakhovetski@gmx.de \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lrg@ti.com \
--cc=peter.ujfalusi@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).