[alsa-devel] ASoC updates for v4.2

Mark Brown broonie at kernel.org
Mon Jun 22 16:43:38 CEST 2015


On Mon, Jun 22, 2015 at 04:10:32PM +0200, Takashi Iwai wrote:
> Mark Brown wrote:
> > > Mark Brown wrote:
> > > > On Mon, Jun 22, 2015 at 11:58:24AM +0200, Takashi Iwai wrote:

> > > > > And, looking at the code, it seems calling runtime suspend in the
> > > > > following way at probe:

> > > > I'm confused, where's the call to runtime suspend?

> > Sorry, I'm still confused about what you're seeing in the probe - I know
> > where the callbacks for runtime PM are registered but I'm not seeing a
> > call to suspend (or something that I'd expect to trigger one) in the
> > above?

> There is no place calling runtime suspend manually, that's why the
> compiler catches and warns.

Right, that's why I was confused - you said it was calling runtime
suspend.

> > > But my concern above isn't about the warning itself.  I just stumbled
> > > on the code invoking runtime resume while looking at this warning, and
> > > wondered the behavior with CONFIG_PM=n.

> > > Usually this kind of warning could be simply fixed by adding a proper
> > > ifdef.  But, this driver calls runtime resume in the probe manually.

> > Sure, that's a fairly common pattern though?

> Depends.  The more common pattern seems to call pm_runtime_resume().
> And this will skip the call of runtime PM when CONFIG_PM=n.

That's another way of doing the same thing but it still leaves the same
thing with sharing the runtime code - if the runtime suspend and resume
paths are the same as the normal power up/down sequence you need to have
an explicit call to the shared power up function somewhere in probe and
can't ifdef things.

It does also mean that there's always going to be a bounce on of the
power in probe which is a bit sad though hardly the end of the world.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150622/8bb92732/attachment.sig>


More information about the Alsa-devel mailing list