[alsa-devel] [PATCH] ASoC: rt298: Add jack suspend and resume functions.

Vinod Koul vinod.koul at intel.com
Mon Jun 13 18:55:37 CEST 2016


On Mon, Jun 13, 2016 at 03:09:23PM +0100, Mark Brown wrote:
> On Mon, Jun 13, 2016 at 08:28:39PM +0800, Bard Liao wrote:
> 
> > +void rt298_jack_suspend(struct snd_soc_codec *codec)
> > +{
> > +	struct rt298_priv *rt298 = snd_soc_codec_get_drvdata(codec);
> > +	struct snd_soc_dapm_context *dapm;
> > +
> > +	dapm = snd_soc_codec_get_dapm(rt298->codec);
> > +	snd_soc_dapm_disable_pin(dapm, "LDO1");
> > +	snd_soc_dapm_sync(dapm);
> > +}
> > +EXPORT_SYMBOL_GPL(rt298_jack_suspend);
> > +
> > +void rt298_jack_resume(struct snd_soc_codec *codec)
> > +{
> > +	struct rt298_priv *rt298 = snd_soc_codec_get_drvdata(codec);
> > +	bool hp = false;
> > +	bool mic = false;
> > +
> > +	rt298_jack_detect(rt298, &hp, &mic);
> > +}
> > +EXPORT_SYMBOL_GPL(rt298_jack_resume);
> 
> This is usually done by having the _jack_detect() function take NULL as
> the jack to disable the detection.  Keeping in line with the existing
> pattern would be good, and would make it easier if we do start to get
> this more standardized.

This was based on existing pattern in rt5672.

But yes I agree with you that we can so this by calling rt298_mic_detect(),
will try that out

Thanks
-- 
~Vinod
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20160613/4ee23b41/attachment.sig>


More information about the Alsa-devel mailing list