Re: [PATCH 2/2] ASoC: spacemit: init *dp to NULL before error paths
From: Bui Duc Phuc
Date: Mon Aug 03 2026 - 23:43:33 EST
Hi Troy,
Thanks for the clarification.
> Nice catch. Please follow the Rockchip approach: keep the static
> spacemit_i2s_dai minimal and initialize the playback and capture fields
> conditionally in spacemit_i2s_init_dai().
>
> Simply removing the assignments from spacemit_i2s_init_dai() would leave
> channels_min nonzero for both directions in the static template.
> snd_soc_dai_stream_valid() treats a direction with a nonzero channels_min
> as supported, so the driver would continue advertising capture even for
> a device with only a "tx" DMA. The binding permits such a configuration.
>
> Please preserve rate_min and rate_max when moving the capability fields,
> and send this change as a separate patch.
>
I'll follow the Rockchip approach and send a separate patch.
Best regards,
Phuc