lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 23 Dec 2019 07:58:32 +0000
From:   Shuming [范書銘] <shumingf@...ltek.com>
To:     Akshu Agrawal <akshu.agrawal@....com>
CC:     Oder Chiou <oder_chiou@...ltek.com>,
        "moderated list:SOUND" <alsa-devel@...a-project.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        open list <linux-kernel@...r.kernel.org>,
        Takashi Iwai <tiwai@...e.com>, Mark Brown <broonie@...nel.org>,
        "yuhsuan@...omium.org" <yuhsuan@...omium.org>,
        Shuming [范書銘] <shumingf@...ltek.com>,
        "Flove(HsinFu)" <flove@...ltek.com>
Subject: RE: [alsa-devel] [PATCH] ASoC: rt5682: Add option to select pulse IRQ in jack detect

> 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@....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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ