13 Jun
2016
13 Jun
'16
6:55 p.m.
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