[PATCH 1/2] ASoC: nau8825: add set_jack coponment support
AS50 CTLin0
ctlin0 at nuvoton.com
Tue Oct 26 10:19:14 CEST 2021
On 2021/10/25 下午 08:15, Mark Brown wrote:
> On Mon, Oct 25, 2021 at 07:38:57PM +0800, 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".
>>
>> Signed-off-by: David Lin <CTLIN0 at nuvoton.com>
>> Signed-off-by: Mac Chiang <mac.chiang at intel.com>
>> ---
>> sound/soc/codecs/nau8825.c | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
>> index 67de0e49ccf4..e7a6bd918be3 100644
>> --- a/sound/soc/codecs/nau8825.c
>> +++ b/sound/soc/codecs/nau8825.c
>> @@ -1434,6 +1434,12 @@ 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);
> This looks like a separate change to support disabling jack detect which
> should be in a separate commit.
I will separate it from this patch.
>
>> + return 0;
>> + }
>> /* Ground HP Outputs[1:0], needed for headset auto detection
> Should really be a blank line here.
I will fix it.
________________________________
________________________________
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.
More information about the Alsa-devel
mailing list