alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: oder_chiou@realtek.com, alsa-devel@alsa-project.org,
	lars@metafoo.de, lgirdwood@gmail.com,
	senthilnathanx.veppur@intel.com, Bard Liao <bardliao@realtek.com>,
	flove@realtek.com
Subject: Re: [PATCH] ASoC: rt298: Add jack suspend and resume functions.
Date: Mon, 13 Jun 2016 22:25:37 +0530	[thread overview]
Message-ID: <20160613165537.GH16910@localhost> (raw)
In-Reply-To: <20160613140923.GH2282@sirena.org.uk>


[-- Attachment #1.1: Type: text/plain, Size: 1210 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2016-06-13 16:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13 12:28 [PATCH] ASoC: rt298: Add jack suspend and resume functions Bard Liao
2016-06-13 14:09 ` Mark Brown
2016-06-13 16:55   ` Vinod Koul [this message]
2016-06-13 16:50     ` Mark Brown
2016-06-13 17:04       ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160613165537.GH16910@localhost \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=flove@realtek.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.com \
    --cc=senthilnathanx.veppur@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).