[PATCH v3 0/2] ASoC: codecs: Add Nuvoton NAU83G60 audio codec driver
Neo Chang <[email protected]>
| Newsgroups | org.alsa-project.alsa-devel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-sound |
|---|---|
| Message-ID | <[email protected]> |
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 v3: [dt-bindings] - Remove colon to resolve YAML build warnings. - Fix 'firmware-name' property definition to comply with binding schemas [codec driver] - Add Kconfig and Makefile entries for the building system. - Change block comments to C++ style. - Add initialization for 'data_count' before usage. - Fix a potential stack buffer overflow in DSP reply parsing by adding a strict 'data_count <= 0' check. - Replace magic numbers with descriptive macros. - Return -EBUSY in `nau8360_dac_mux_put_enum()` to prevent playback disruption. - Remove the 'GFP_DMA' flag as DMA memory is not strictly required here. - Convert multiple 'if' statements to 'switch' statements. - Remove internal hardware debugging code for GPIO1 to GPIO3. - Initialize TDM slot arrays to resolve `nau8360_set_tdm_slot()` setup failures. - Fix event_missing and event_spurious in TDM/PEQ put functions. - Fix uninitialized variable usage in TDM slot put. - Add "Slot None" mapping with custom _get functions, and optimize I2C reads for this state. - Refactor TDM slot validation into nau8360_validate_tdm_slots(). Neo Chang (2): ASoC: dt-bindings: nuvoton,nau8360: Add NAU83G60 ASoC: codecs: nau8360: Add support for NAU83G60 amplifier .../bindings/sound/nuvoton,nau8360.yaml | 86 + sound/soc/codecs/Kconfig | 10 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/nau8360-dsp.c | 704 +++++ sound/soc/codecs/nau8360-dsp.h | 116 + sound/soc/codecs/nau8360.c | 2454 +++++++++++++++++ sound/soc/codecs/nau8360.h | 904 ++++++ 7 files changed, 4276 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