alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Liam Girdwood <liam.r.girdwood@linux.intel.com>
To: Carlo Caione <carlo@endlessm.com>, Bard Liao <bardliao@realtek.com>
Cc: alsa-devel@alsa-project.org, "Mark Brown" <broonie@kernel.org>,
	"João Paulo Rechi Vita" <jprvita@endlessm.com>,
	"Daniel Drake" <drake@endlessm.com>
Subject: Re: RT5640 jack detection
Date: Wed, 23 Sep 2015 17:22:38 +0100	[thread overview]
Message-ID: <1443025358.6977.71.camel@loki> (raw)
In-Reply-To: <CAL9uMOHM3tbdKT7s4panz8zyYxu35F38GLUtu9DSmgrQr=Ciqg@mail.gmail.com>

+ Realtek

On Tue, 2015-09-22 at 11:18 +0200, Carlo Caione wrote:
> Hi,
> I'm working with the ALC5640-VB audio codec based on the Realtek
> RT5640. On my setup the codec is only used for audio output through an
> headphone jack, otherwise the audio should be routed via HDMI.
> 
> The problem is that the jack sensing only works when the codec is
> actively playing something, that is when the bias set for the codec is
> not SND_SOC_BIAS_OFF. When the codec is suspended and it is powered
> off I'm not able to detect anymore the presence of the jack. Because
> of this issue actively switching the audio from HDMI to HP when the
> jack is inserted is not working.
> 
> The driver I'm using for the RT5640 in the .set_bias_level hook
> function among other things is gating the I2S input clock and this
> seems to prevent the generation of the IRQ signal I'm using to detect
> the presence/absence of the jack (the culprit here is MX-FA[0] bit for
> those interested).
> 
> I can easily modify the codec driver to avoid gating the I2S clock
> when the bias is off but this seems in contrast with the whole DAPM
> principle.
> 
> How this is usually supposed to be working?
> 

In situations like this it may be best to report jack status as removed
when no BIAS is available for jack detection (since no one is using the
codec anyway). The jack status could always be re-detected when BIAS is
re-enabled.

Liam 

  reply	other threads:[~2015-09-23 16:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22  9:18 RT5640 jack detection Carlo Caione
2015-09-23 16:22 ` Liam Girdwood [this message]
2015-09-23 16:37   ` Mark Brown
2015-09-24 20:34     ` Carlo Caione
2015-09-24 21:29       ` Mark Brown

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=1443025358.6977.71.camel@loki \
    --to=liam.r.girdwood@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=carlo@endlessm.com \
    --cc=drake@endlessm.com \
    --cc=jprvita@endlessm.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).