[PATCH v2 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 v2: [dt-bindings] - Dropped the word "driver" from the description. - Removed runtime/software configuration properties: nuvoton,low-latency, nuvoton,anc-enable, nuvoton,aec-enable, nuvoton,vbat-microvolt, and nuvoton,tdm-channel-length. - Added missing "nuvoton,dac-cur-enable" property for static speaker impedance matching. - Removed unnecessary '|' formatting from single-line descriptions. - Fixed typo in firmware-name property. [codec driver] - Fixed nau8360_peq_coeff_put() to return 1 on value change. - Refactored TDM slot routing to use ALSA kcontrols instead of custom masks in set_tdm_slot(). - Switched regmap cache type to REGCACHE_MAPLE. - Dropped hardcoded DAC gain initialization to retain chip defaults. - Used devm_snd_soc_register_component() for safe unregistration. - Separated TDM TX/RX logic in shutdown() to safely support full-duplex operation. - Refactored TDM enable/disable logic: moved RX enable from startup to hw_params, TX enable from startup to set_tdm_slot, and handled disable logic in shutdown. - Moved software/runtime configurations from DT properties to ALSA kcontrols (e.g., DSP bypass, low latency). - Corrected supported PDM data length from 24 to 32 bits per datasheet specifications. - Updated firmware DT property parsing to use standard firmware-name. - Removed redundant VBAT bounds check in nau8360_sawtooth_params() as it is already validated by the caller. - Read VBAT level dynamically via register instead of relying on a DT property. - Cleaned up magic numbers by introducing PEQ band enumerations. - Set dsp_fws_num to 0 to use default firmware paths if "firmware-name" is missing. 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/nau8360-dsp.c | 704 +++++ sound/soc/codecs/nau8360-dsp.h | 117 + sound/soc/codecs/nau8360.c | 2334 +++++++++++++++++ sound/soc/codecs/nau8360.h | 904 +++++++ 5 files changed, 4145 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