Re: [PATCH 2/2] ASoC: spacemit: init *dp to NULL before error paths
Bui Duc Phuc <[email protected]> Tue, 4 Aug 2026 10:41:36 +0700
| Newsgroups | dev.linux.lists.spacemit,org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel,org.kernel.vger.linux-sound |
|---|---|
| Message-ID | <CAABR9nHZgDvNBTT=uKO36+ExC5ozi7mWbS2J-3MxhN4GctpYHw@mail.gmail.com> |
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