[PATCH 1/2] ASoC: nau8825: add set_jack coponment support
Mark Brown
broonie at kernel.org
Mon Oct 25 14:15:44 CEST 2021
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.
> + return 0;
> + }
> /* Ground HP Outputs[1:0], needed for headset auto detection
Should really be a blank line here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20211025/21bee6ed/attachment.sig>
More information about the Alsa-devel
mailing list