[alsa-devel] [PATCH] ASoC: rt286: add irq enable/disable APIs and export

Mark Brown broonie at kernel.org
Wed Feb 4 13:58:56 CET 2015


On Wed, Feb 04, 2015 at 08:44:55PM +0800, Jie Yang wrote:
> Some platforms, e.g. WSB, don't need irq handler and jack detection when
> system is in Suspend, for power save reason.
> 
> Here add irq enable/disable APIs and export them, also disable LDO1,
> which is used for jack detection when headphone is plugged in.

> +int rt286_enable_irq(struct snd_soc_codec *codec)
> +{

This isn't a great idiom for the API - the machine driver isn't working
with the interrupt, it's working with the jack detection so it should do
the disable and reenable in terms of the jack detection too.  Otherwise
it's not clear that this won't interfere with other interrupt functions
the device has and that it'll disable the jack detection hardware in the
device rather than just ignoring the interrupt (which is presumably
desired and appears to be actually happening in the code).
-------------- 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/20150204/a4bccc1b/attachment.sig>


More information about the Alsa-devel mailing list