All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: David Lin <CTLIN0@nuvoton.com>, broonie@kernel.org
Cc: alsa-devel@alsa-project.org, WTLI@nuvoton.com,
	SJLIN0@nuvoton.com, KCHSU0@nuvoton.com, lgirdwood@gmail.com,
	YHCHuang@nuvoton.com, mac.chiang@intel.com
Subject: Re: [PATCH 2/3] ASoC: nau8825: add disable jack detection support
Date: Wed, 27 Oct 2021 09:05:04 -0500	[thread overview]
Message-ID: <d581eb7a-cb61-0604-fb51-d9181d3eced3@linux.intel.com> (raw)
In-Reply-To: <20211027025142.25898-3-CTLIN0@nuvoton.com>



On 10/26/21 9:51 PM, David Lin wrote:
> A feature for disabling jack detection support.
> 
> Co-developed-by: Mac Chiang <mac.chiang@intel.com>
> Signed-off-by: Mac Chiang <mac.chiang@intel.com>
> Signed-off-by: David Lin <CTLIN0@nuvoton.com>
> ---
>  sound/soc/codecs/nau8825.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
> index c845f19b7c41..a356f26735bd 100644
> --- a/sound/soc/codecs/nau8825.c
> +++ b/sound/soc/codecs/nau8825.c
> @@ -1434,6 +1434,13 @@ int nau8825_enable_jack_detect(struct snd_soc_component *component,
>  
>  	nau8825->jack = jack;
>  
> +	if (!nau8825->jack) {
> +		regmap_update_bits(regmap, NAU8825_REG_HSD_CTRL,
> +				   NAU8825_HSD_AUTO_MODE | NAU8825_SPKR_DWN1R |
> +				   NAU8825_SPKR_DWN1L, 0);
> +		return 0;
> +	}
> +

oh, so you've addressed my comment from the first patch but it might be
clearer to follow the flow from other codec drivers and test the jack
argument at a higher level, then you have an enable/disable parameter.

>  	/* Ground HP Outputs[1:0], needed for headset auto detection
>  	 * Enable Automatic Mic/Gnd switching reading on insert interrupt[6]
>  	 */
> 

  reply	other threads:[~2021-10-27 14:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27  2:51 [PATCH 0/3] Make genaral and simple for new sof machine driver David Lin
2021-10-27  2:51 ` [PATCH 1/3] ASoC: nau8825: add set_jack coponment support David Lin
2021-10-27 14:02   ` Pierre-Louis Bossart
2021-10-28  7:43     ` AS50 CTLin0
2021-10-27  2:51 ` [PATCH 2/3] ASoC: nau8825: add disable jack detection support David Lin
2021-10-27 14:05   ` Pierre-Louis Bossart [this message]
2021-10-28  8:01     ` AS50 CTLin0
2021-10-27  2:51 ` [PATCH 3/3] ASoC: nau8825: add clock management for power saving David Lin
2021-10-27 17:29 ` [PATCH 0/3] Make genaral and simple for new sof machine driver Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2021-10-26  9:38 David Lin
2021-10-26  9:38 ` [PATCH 2/3] ASoC: nau8825: add disable jack detection support David Lin

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=d581eb7a-cb61-0604-fb51-d9181d3eced3@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=CTLIN0@nuvoton.com \
    --cc=KCHSU0@nuvoton.com \
    --cc=SJLIN0@nuvoton.com \
    --cc=WTLI@nuvoton.com \
    --cc=YHCHuang@nuvoton.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=mac.chiang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.