Skip to content

ASoC: nau8810: add MCLK support

Mehmet Fide asahi linux-devicetree linux-sound lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7ASoC: dt-bindings: nau8810: Add MCLK clockDocumentation/devicetree/bindings/sound/nuvoton,nau8810.yaml Documentation/devicetree/bindings/sound/trivial-codec.yaml+51 -31 reply
2/7ASoC: nau8810: move nau8810_set_sysclk()sound/soc/codecs/nau8810.c+14 -140 replies
3/7ASoC: nau8810: set NAU8810_REFIMP_80K only oncesound/soc/codecs/nau8810.c+2 -00 replies
4/7ASoC: nau8810: Lower debug print prioritysound/soc/codecs/nau8810.c+1 -10 replies
5/7ASoC: nau8810: Do not configure the PLL if freq_out is zerosound/soc/codecs/nau8810.c+5 -00 replies
6/7ASoC: nau8810: Don't reconfigure PLL to the same valuessound/soc/codecs/nau8810.c sound/soc/codecs/nau8810.h+16 -00 replies
7/7ASoC: nau8810: add MCLK supportsound/soc/codecs/nau8810.c sound/soc/codecs/nau8810.h+38 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] ASoC: nau8810: add MCLK support

From: Mehmet Fide <[email protected]>

The NAU8810 needs an internal master clock of 256 * fs, which the driver can only divide from MCLK. With 25 MHz from the AM62 AUDIO_EXT_REFCLK1, 48 kHz and 44.1 kHz both play at 48.8 kHz.

This series lets the driver take MCLK and make the system clock with its PLL, along the lines of the nau8822 changes, with two differences. PLL_EN stays with the PLL supply widget, so the problem fixed for nau8822 by commit 390cdd61a947 ("ASoC: nau8822: reprogram PLL after it has been disabled") cannot occur. And the PLL is not switched off while it is programmed, as in commit aeca8a329502 ("ASoC: nau8822: Add operation for internal PLL off and on"): the NAU8810 datasheet does not ask for it.

Tested on a Verdin AM62 with simple-audio-card and mclk-fs = <256>, on 6.12.120 with the series backported, also with lockdep: playback from 8 to 48 kHz and capture at 8, 44.1 and 48 kHz run within 0.2 % of the rate, and a board without mclk-fs keeps the old behaviour.

Mehmet Fide (7):
ASoC: dt-bindings: nau8810: Add MCLK clock
ASoC: nau8810: move nau8810_set_sysclk()
ASoC: nau8810: set NAU8810_REFIMP_80K only once
ASoC: nau8810: Lower debug print priority
ASoC: nau8810: Do not configure the PLL if freq_out is zero
ASoC: nau8810: Don't reconfigure PLL to the same values
ASoC: nau8810: add MCLK support

 .../bindings/sound/nuvoton,nau8810.yaml       | 51 +++++++++++
 .../bindings/sound/trivial-codec.yaml         |  3 -
 sound/soc/codecs/nau8810.c                    | 87 +++++++++++++++----
 sound/soc/codecs/nau8810.h                    |  3 +
 4 files changed, 126 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8810.yaml

base-commit: b5b604242c1cc418d202d29d73fe8ec2db833a03

Signature · 1 line
2.56.0