Re: [PATCH v5 2/2] ASoC: codecs: nau8360: Add support for NAU83G60 amplifier

Mark Brown <[email protected]> Thu, 2 Jul 2026 16:15:23 +0100
Newsgroups org.alsa-project.alsa-devel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-sound
Message-ID <[email protected]>
On Tue, Jun 30, 2026 at 10:15:10AM +0800, Neo Chang wrote:
> Add support for the Nuvoton NAU83G60 audio codec. The NAU83G60 is a
> stereo 30W+30W smart amplifier with an integrated low-latency
> Advanced Audio DSP.

> +static const char *const tdm_data_length[] = { "16", "32" };
> +
> +static const char *const tdm_pdm_length[] = { "16", "32" };
> +
> +static const char *const tdm_data_n_length[] = { "8", "16" };

I would expect TDM to be configured by set_tdm_slot() from the machine
driver, not from userspace.  I see the driver does actually have a
set_tdm_slot() operation...

> +static int nau8360_read_device_properties(struct nau8360 *nau8360)
> +{

> +	ret = device_property_string_array_count(dev, "firmware-name");
> +	if (ret != NAU8360_DSP_FW_NUM) {
> +		dev_err(dev, "Missing or invalid firmware-name property in DT\n");
> +		return -EINVAL;
> +	}

> +static int nau8360_i2c_probe(struct i2c_client *i2c)
> +{

> +	ret = nau8360_read_device_properties(nau8360);
> +	if (ret)
> +		return ret;

This will fail the probe if we fail to read firmware-name from the DT so
the firmware name is a required property in DT (and ACPI systems will
have fun) even though it is not marked as such.  Either the driver needs
to tolerate not having the name configured one way or another or the
property needs to be mandatory in the bindings.
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmpGgIoACgkQJNaLcl1U
h9BtWgf/QSDMFRpRqoSYBjr7BcwBumFKqGVUqarsVAQTF/nbjDmHEnlq3F1IaFMm
jzPTQb50/VIMYe+VqQDzWFwQSwN0CiE4u7G5MoACeuxbOlQeHY1updgnQt/qkZtw
VM0Dntgb/AlusMlFld4FgXLiQzGMcpUSLc3Ek+4oNyEwDJk8ti1fX9W0nQ9Ja3xA
1lsCtJ8aSVGt0TwkT5Qe0XbxetmuNz6WkJArRVfAK3rH+p0TGp3K7uABjr6vjXG5
AizWn+pU/bcBm/D+wYl26SUg4RgnScGE2aEqQjkT1xl7JDrfuIup+b0r4fxrOZyR
le7/6mDUyoTfGv8BTTMMbj929UdUTA==
=1M6t
-----END PGP SIGNATURE-----