All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] ASoC: codecs: Add Nuvoton NAU83G60 audio codec driver
@ 2026-06-09  2:41 Neo Chang
  2026-06-09  2:41 ` [PATCH v4 1/2] ASoC: dt-bindings: nuvoton,nau8360: Add NAU83G60 Neo Chang
  2026-06-09  2:41 ` [PATCH v4 2/2] ASoC: codecs: nau8360: Add support for NAU83G60 amplifier Neo Chang
  0 siblings, 2 replies; 7+ messages in thread
From: Neo Chang @ 2026-06-09  2:41 UTC (permalink / raw)
  To: broonie
  Cc: lgirdwood, perex, robh, krzk+dt, linux-sound, devicetree,
	alsa-devel, neo.chang70, kchsu0, sjlin0, Neo Chang

This patch series adds support for the Nuvoton NAU83G60 audio codec.

The NAU83G60 is a stereo Class-D amplifier with an integrated DSP and
I/V-sense capabilities. The driver supports I2C register access through
regmap, DAPM widgets and routes, TDM interface configuration, and DSP
firmware loading.

The series is structured as follows:
- Patch 1: Adds the YAML device tree bindings documentation.
- Patch 2: Adds the ASoC codec driver implementation.

Changes in v4:
[dt-bindings]
- Refine the `firmware-name` description to clarify the loading order
 (Left then Right) and the PBTL mode behavior.
- Remove the "dsp bypass" option description.
- Update the example node to follow devicetree coding styles.


[codec driver]
- Clean up unused DSP state flags (dsp_enable, dsp_created, dsp_fws_num).
- Fixed the use of an uninitialized stack variable (`status`).
- Fixed unhandled failures in `nau8360_dsp_init()` that caused duplicated
  DAPM widgets to leak.
- Add mutex protection for PEQ memory and TDM slot caches.
- Restored the missing hardware memory access bit during suspend/resume
  to prevent PEQ coefficients from being silently lost.
- Handled `regmap_read()` failure in `nau8360_vbat_level()` to prevent
  the usage of uninitialized stack memory.
- Removed improper dynamic creation of DAPM widgets and routes within ALSA kcontrol
  `put` handlers, using proper static instantiation instead.
- Moved RX enable logic to `startup()` for consistent stream state.
- Replaced synchronous `request_firmware()` with `request_firmware_nowait()`
  to prevent deadlocks and avoid blocking the kernel during firmware I/O.
- Explicitly disable TDM RX/TX when slots or slot_width is zero.

Changes in v2/v3:
- v3: Resolved YAML build warnings, added Kconfig/Makefile entries,
  fixed stack buffer overflows in DSP parsing, and refactored TDM slot
  validation logic.
- v2: Migrated software/runtime configurations from DT properties to
  ALSA kcontrols, refactored TDM routing, and improved firmware path handling.

Neo Chang (2):
  ASoC: dt-bindings: nuvoton,nau8360: Add NAU83G60
  ASoC: codecs: nau8360: Add support for NAU83G60 amplifier

 .../bindings/sound/nuvoton,nau8360.yaml       |   83 +
 sound/soc/codecs/Kconfig                      |   10 +
 sound/soc/codecs/Makefile                     |    2 +
 sound/soc/codecs/nau8360-dsp.c                |  707 +++++
 sound/soc/codecs/nau8360-dsp.h                |  126 +
 sound/soc/codecs/nau8360.c                    | 2499 +++++++++++++++++
 sound/soc/codecs/nau8360.h                    |  902 ++++++
 7 files changed, 4329 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8360.yaml
 create mode 100644 sound/soc/codecs/nau8360-dsp.c
 create mode 100644 sound/soc/codecs/nau8360-dsp.h
 create mode 100644 sound/soc/codecs/nau8360.c
 create mode 100644 sound/soc/codecs/nau8360.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-06-09  9:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09  2:41 [PATCH v4 0/2] ASoC: codecs: Add Nuvoton NAU83G60 audio codec driver Neo Chang
2026-06-09  2:41 ` [PATCH v4 1/2] ASoC: dt-bindings: nuvoton,nau8360: Add NAU83G60 Neo Chang
2026-06-09  2:49   ` sashiko-bot
2026-06-09  7:04   ` Krzysztof Kozlowski
2026-06-09  2:41 ` [PATCH v4 2/2] ASoC: codecs: nau8360: Add support for NAU83G60 amplifier Neo Chang
2026-06-09  2:55   ` sashiko-bot
2026-06-09  9:49   ` Cezary Rojewski

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.