public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Shuming [范書銘]" <shumingf@realtek.com>
To: Akshu Agrawal <akshu.agrawal@amd.com>
Cc: "Oder Chiou" <oder_chiou@realtek.com>,
	"moderated list:SOUND" <alsa-devel@alsa-project.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"open list" <linux-kernel@vger.kernel.org>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Mark Brown" <broonie@kernel.org>,
	"yuhsuan@chromium.org" <yuhsuan@chromium.org>,
	"Shuming [范書銘]" <shumingf@realtek.com>,
	"Flove(HsinFu)" <flove@realtek.com>
Subject: RE: [alsa-devel] [PATCH] ASoC: rt5682: Add option to select pulse IRQ in jack detect
Date: Mon, 23 Dec 2019 07:58:32 +0000	[thread overview]
Message-ID: <55cbcef1d09e43e0aac057b680c25e17@realtek.com> (raw)
In-Reply-To: <20191220061220.229679-1-akshu.agrawal@amd.com>

> Subject: [alsa-devel] [PATCH] ASoC: rt5682: Add option to select pulse IRQ in
> jack detect
> 
> Some SoC need to set IRQ type as pulse along with other JD1 options.

Could you configure GPIO IRQ by edge trigger(both rising/falling) and try again?
BTW, the modification doesn't make sense to name JD2.

> Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
> ---
>  include/sound/rt5682.h    | 1 +
>  sound/soc/codecs/rt5682.c | 3 +++
>  sound/soc/codecs/rt5682.h | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/include/sound/rt5682.h b/include/sound/rt5682.h
> index bc2c31734df1..64cfa77ec9ee 100644
> --- a/include/sound/rt5682.h
> +++ b/include/sound/rt5682.h
> @@ -22,6 +22,7 @@ enum rt5682_dmic1_clk_pin {
>  enum rt5682_jd_src {
>  	RT5682_JD_NULL,
>  	RT5682_JD1,
> +	RT5682_JD2,
>  };
> 
>  struct rt5682_platform_data {
> diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c
> index ae6f6121bc1b..5135d7757361 100644
> --- a/sound/soc/codecs/rt5682.c
> +++ b/sound/soc/codecs/rt5682.c
> @@ -1009,6 +1009,9 @@ static int rt5682_set_jack_detect(struct
> snd_soc_component *component,
>  	}
> 
>  	switch (rt5682->pdata.jd_src) {
> +	case RT5682_JD2:
> +		regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2,
> +			RT5682_JD1_PULSE_MASK, RT5682_JD1_PULSE_EN);
>  	case RT5682_JD1:
>  		snd_soc_component_update_bits(component, RT5682_CBJ_CTRL_2,
>  			RT5682_EXT_JD_SRC, RT5682_EXT_JD_SRC_MANUAL);
> diff --git a/sound/soc/codecs/rt5682.h b/sound/soc/codecs/rt5682.h
> index 18faaa2a49a0..434b1c9778b2 100644
> --- a/sound/soc/codecs/rt5682.h
> +++ b/sound/soc/codecs/rt5682.h
> @@ -1091,6 +1091,8 @@
>  #define RT5682_JD1_POL_MASK			(0x1 << 13)
>  #define RT5682_JD1_POL_NOR			(0x0 << 13)
>  #define RT5682_JD1_POL_INV			(0x1 << 13)
> +#define RT5682_JD1_PULSE_MASK			(0x1 << 10)
> +#define RT5682_JD1_PULSE_EN			(0x1 << 10)
> 
>  /* IRQ Control 3 (0x00b8) */
>  #define RT5682_IL_IRQ_MASK			(0x1 << 7)
> --
> 2.17.1
> 

  parent reply	other threads:[~2019-12-23  7:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20  6:12 [PATCH] ASoC: rt5682: Add option to select pulse IRQ in jack detect Akshu Agrawal
2019-12-23  6:26 ` kbuild test robot
2019-12-23  7:58 ` Shuming [范書銘] [this message]
2019-12-23  9:38   ` [alsa-devel] " Agrawal, Akshu

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=55cbcef1d09e43e0aac057b680c25e17@realtek.com \
    --to=shumingf@realtek.com \
    --cc=akshu.agrawal@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=flove@realtek.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oder_chiou@realtek.com \
    --cc=tiwai@suse.com \
    --cc=yuhsuan@chromium.org \
    /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