mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Damien Riegel <damien.riegel@savoirfairelinux.com>,
	Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Subject: Re: [RFC] ASoC: codecs: msm8916-wcd-analog: use btn0 released detection
Date: Thu, 28 Sep 2017 11:18:26 -0700	[thread overview]
Message-ID: <8bc3ca17-ea40-bedf-0d2f-8f08b66b6f6e@linaro.org> (raw)
In-Reply-To: <20170919132237.ctjcpe27pmwu36mm@workotop.localdomain>



On 19/09/17 06:22, Damien Riegel wrote:
> Definitely. I also noticed an issue with the first very detection
> because the micbias will only be set the first time the driver gets a
> mechanical insertion interrupt. Following snippet seems to solve the
> problem:
Does that mean that you do not need the "ASoC: codecs: 
msm8916-wcd-analog: use btn0 released detection" patch anymore?

Below changes seems to fine as it is.

Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>


> diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c
> index f562f2d86907..5045dabd9ea9 100644
> --- a/sound/soc/codecs/msm8916-wcd-analog.c
> +++ b/sound/soc/codecs/msm8916-wcd-analog.c
> @@ -446,6 +446,7 @@ static int pm8916_wcd_analog_enable_micbias_int1(struct
>   static void pm8916_wcd_setup_mbhc(struct pm8916_wcd_analog_priv *wcd)
>   {
>          struct snd_soc_codec *codec = wcd->codec;
> +       bool micbias_enabled = false;
>          u32 plug_type = 0;
>          u32 int_en_mask;
> 
> @@ -477,6 +478,11 @@ static void pm8916_wcd_setup_mbhc(struct pm8916_wcd_analog_priv *wcd)
>                              DIG_CLK_CTL_D_MBHC_CLK_EN_MASK,
>                              DIG_CLK_CTL_D_MBHC_CLK_EN);
> 
> +       if (snd_soc_read(codec, CDC_A_MICB_2_EN) & CDC_A_MICB_2_EN_ENABLE)
> +               micbias_enabled = true;
> +
> +       pm8916_mbhc_configure_bias(priv, micbias_enabled);
> +
>          int_en_mask = MBHC_SWITCH_INT;
>          if (wcd->mbhc_btn_enabled)
>                  int_en_mask |= MBHC_BUTTON_PRESS_DET | MBHC_BUTTON_RELEASE_DET;
> 

  reply	other threads:[~2017-09-28 18:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 20:43 Damien Riegel
2017-09-18  9:08 ` Srinivas Kandagatla
2017-09-19 12:11   ` Mark Brown
2017-09-19 13:22     ` Damien Riegel
2017-09-28 18:18       ` Srinivas Kandagatla [this message]
2017-09-28 19:10         ` Damien Riegel
2017-09-28 18:58 ` Applied "ASoC: codecs: msm8916-wcd-analog: use btn0 released detection" to the asoc tree Mark Brown
2017-09-28 19:56 ` [RFC] ASoC: codecs: msm8916-wcd-analog: use btn0 released detection Srinivas Kandagatla

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=8bc3ca17-ea40-bedf-0d2f-8f08b66b6f6e@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=damien.riegel@savoirfairelinux.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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

all inboxes | Powered by JetHome®