[alsa-devel] [PATCH] ASoC: jack: export gpio detect

Mark Brown broonie at kernel.org
Mon Apr 14 21:55:01 CEST 2014

On Tue, Apr 08, 2014 at 01:40:10PM -0700, Christopher Freeman wrote:
> On 4/3/14 3:07 PM, "Mark Brown" <broonie at kernel.org> wrote:

> >It seems better to have explicit callbacks for this doesn't it, ideally
> >ones that get triggered by the core without the machine driver having to
> >do anything?  This is a common need so having to open code it would be a
> >bit depressing.

> Mark, do you have a suggestion on how to plumb this up?  The way I see it,
> the machine drivers own the context for the gpios and soc-jack acts as a
> helper library.  I don't see a way to do this from the core.

Both the ALSA core and ASoC know that the jacks exist and at least ASoC
already gets callbacks from the machine drivers during suspend (usually
just through providing default PM operations for them).  We'd need to
add code to actually keep track of them but if that's done then the core
can walk the list of jacks at resume time and give them a callback.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140414/56041b38/attachment.sig>

More information about the Alsa-devel mailing list