[PATCH v6 09/10] ASoC: mediatek: mt8196: add machine driver with nau8825
Chen-Yu Tsai
wenst at chromium.org
Mon Jul 21 02:17:06 PDT 2025
Hi,
On Tue, Jul 8, 2025 at 7:35 PM Darren.Ye <darren.ye at mediatek.com> wrote:
>
> From: Darren Ye <darren.ye at mediatek.com>
>
> Add support for mt8196 board with nau8825.
>
> Signed-off-by: Darren Ye <darren.ye at mediatek.com>
> ---
> sound/soc/mediatek/Kconfig | 20 +
> sound/soc/mediatek/mt8196/Makefile | 2 +
> sound/soc/mediatek/mt8196/mt8196-nau8825.c | 869 +++++++++++++++++++++
[...]
> +static const struct snd_soc_dapm_widget mt8196_nau8825_card_widgets[] = {
> + /* dynamic pinctrl */
> + SND_SOC_DAPM_PINCTRL("ETDMIN_SPK_PIN", "aud-gpio-i2sin4-on", "aud-gpio-i2sin4-off"),
> + SND_SOC_DAPM_PINCTRL("ETDMOUT_SPK_PIN", "aud-gpio-i2sout4-on", "aud-gpio-i2sout4-off"),
> + SND_SOC_DAPM_PINCTRL("ETDMIN_HP_PIN", "aud-gpio-i2sin6-on", "aud-gpio-i2sin6-off"),
> + SND_SOC_DAPM_PINCTRL("ETDMOUT_HP_PIN", "aud-gpio-i2sout6-on", "aud-gpio-i2sout6-off"),
> + SND_SOC_DAPM_PINCTRL("ETDMIN_HDMI_PIN", "aud-gpio-i2sin3-on", "aud-gpio-i2sin3-off"),
> + SND_SOC_DAPM_PINCTRL("ETDMOUT_HDMI_PIN", "aud-gpio-i2sout3-on", "aud-gpio-i2sout3-off"),
> + SND_SOC_DAPM_PINCTRL("AP_DMIC0_PIN", "aud-gpio-ap-dmic-on", "aud-gpio-ap-dmic-off"),
> + SND_SOC_DAPM_PINCTRL("AP_DMIC1_PIN", "aud-gpio-ap-dmic1-on", "aud-gpio-ap-dmic1-off"),
These are pins for the AFE block, not specific to any machine, so:
1. They should be moved to the AFE driver.
2. Their names should match the underlying interface (I2SOUT4), instead
of the intended use case (ETDMOUT_SPK).
3. Their related routes should be set statically in the AFE driver.
Also, for the I2S interfaces, since there are input and output pins, but
also common clock pins, you should either split out the common clock pins
as a separate pinctrl entry, or just combine them so that you have one
entry for each interface.
Last, you need to document the pinctrl names as required in the binding.
ChenYu
More information about the Linux-mediatek
mailing list