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

Mark Brown broonie at kernel.org
Wed Feb 4 21:26:04 CET 2015


On Wed, Feb 04, 2015 at 09:34:03PM +0800, Jie Yang wrote:

> +int rt286_disable_jack_detection(struct snd_soc_codec *codec)
> +{
> +	struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec);
> +
> +	disable_irq(rt286->i2c->irq);
> +
> +	snd_soc_dapm_disable_pin(&rt286->codec->dapm, "LDO1");
> +	snd_soc_dapm_sync(&rt286->codec->dapm);
> +	return 0;
> +}
> +EXPORT_SYMBOL_GPL(rt286_disable_jack_detection);

So, now I look at this again I'm wondering why this isn't writing to any
registers - looking at the code we run on probe there's a register write
if we're passed an interrupt which looks awfully like we're enabling
jack detect.  Probably we wouldn't need to do the rather odd disabling
of the IRQ if we did that, but perhaps it's required.

I think there's actually problems with the existing jack detection code
in the driver, I'd expect that the initial enabling of jack detect would
be done when the machine driver says it wants jack detect by passing in
the jack to report for.
-------------- 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/a52c691a/attachment.sig>


More information about the Alsa-devel mailing list