public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	Jarkko Nikula <jarkko.nikula@bitmer.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Aaro Koskinen <aaro.koskinen@iki.fi>, Nishanth Menon <nm@ti.com>,
	Sebastian Reichel <sre@kernel.org>, Pavel Machek <pavel@ucw.cz>,
	Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>,
	joerg Reisenweber <joerg@openmoko.org>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Nokia N900 headset detection & MIC Bias + TVOUT
Date: Mon, 9 Jan 2017 19:22:01 +0000	[thread overview]
Message-ID: <20170109192201.l3mkro3epzf2ns27@sirena.org.uk> (raw)
In-Reply-To: <20170109131317.GD26301@pali>

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

On Mon, Jan 09, 2017 at 02:13:17PM +0100, Pali Rohár wrote:

> So... can I call snd_soc_dapm_mutex_lock(dapm) at function startup,
> start doing cable detection and when needed call this?

> snd_soc_dapm_enable_pin_unlocked(dapm, "HS Mic");
> snd_soc_dapm_sync_unlocked(dapm);

> And at the end of function revert back "HS Mic" pin status and call
> snd_soc_dapm_mutex_unlock(dapm)?

You shouldn't need to lock I'd expect, and you'll want to sync at any
point where you need an actual change.  Note that if something holds the
microphone bias on (like something using the microphone) separately then
that'll take effect so if you really need things to get turned off then
that won't work but you probably have trouble anyway in that situation.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2017-01-09 19:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06 23:07 Nokia N900 headset detection & MIC Bias + TVOUT Pali Rohár
2017-01-09 11:27 ` Mark Brown
2017-01-09 13:13   ` Pali Rohár
2017-01-09 19:22     ` Mark Brown [this message]
2017-01-09 19:29       ` Pali Rohár
2017-01-09 19:38         ` Mark Brown
2017-01-09 20:32           ` Pali Rohár

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=20170109192201.l3mkro3epzf2ns27@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=jarkko.nikula@bitmer.com \
    --cc=joerg@openmoko.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=peter.ujfalusi@ti.com \
    --cc=sre@kernel.org \
    --cc=tony@atomide.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