All of lore.kernel.org
 help / color / mirror / Atom feed
From: AS50 CTLin0 <ctlin0@nuvoton.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.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 1/3] ASoC: nau8825: add set_jack coponment support
Date: Thu, 28 Oct 2021 15:43:59 +0800	[thread overview]
Message-ID: <506e701e-8e73-b78c-7fcf-8d7839b8e842@nuvoton.com> (raw)
In-Reply-To: <27e07d55-9666-9c6a-0098-4ad9ba6e9d0d@linux.intel.com>

On 2021/10/27 下午 10:02, Pierre-Louis Bossart wrote:
> typo in commit subject:
> coponment -> component
>
> please use scripts/checkpatch.pl --strict --codespell

I will be more carefully for next. I appreciate your kindly guide.


>
> On 10/26/21 9:51 PM, David Lin wrote:
>> Use set_jack ops to set jack for new machine drivers. Meanwhile,
>> the old machine drivers can still call previous export function
>> "nau8825_enable_jack_detect".
>>
>> 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 67de0e49ccf4..c845f19b7c41 100644
>> --- a/sound/soc/codecs/nau8825.c
>> +++ b/sound/soc/codecs/nau8825.c
>> @@ -2416,6 +2416,12 @@ static int __maybe_unused nau8825_resume(struct snd_soc_component *component)
>>      return 0;
>>   }
>>
>> +static int nau8825_set_jack(struct snd_soc_component *component,
>> +                        struct snd_soc_jack *jack, void *data)
>> +{
>> +    return nau8825_enable_jack_detect(component, jack);
>> +}
>> +
> in some cases, this function can be called with a NULL jack argument.
> See other codec drivers, e.g.
>
> int arizona_jack_set_jack(struct snd_soc_component *component,
>                         struct snd_soc_jack *jack, void *data)
> {
>       struct arizona_priv *info = snd_soc_component_get_drvdata(component);
>
>       if (jack)
>               return arizona_jack_enable_jack_detect(info, jack);
>       else
>               return arizona_jack_disable_jack_detect(info);
> }

I have caught these information from some codec driver, even sof machine
driver also use snd_soc_component_set_jack to replace previous export
function for jack setting.


>
________________________________
________________________________
 The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

  reply	other threads:[~2021-10-28  7:45 UTC|newest]

Thread overview: 15+ 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 [this message]
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
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 1/3] ASoC: nau8825: add set_jack coponment support David Lin
2021-10-26 17:35   ` Pierre-Louis Bossart
2021-10-26 17:58     ` Mark Brown
2021-10-26 18:53       ` Pierre-Louis Bossart
2021-10-26 19:05         ` Mark Brown
2021-10-27  2:37           ` AS50 CTLin0

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=506e701e-8e73-b78c-7fcf-8d7839b8e842@nuvoton.com \
    --to=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 \
    --cc=pierre-louis.bossart@linux.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.