[PATCH] ASoC: spacemit: Remove redundant DAI field initialization
Bui Duc Phuc
phucduc.bui at gmail.com
Tue Aug 4 02:45:51 PDT 2026
Hi Troy,
Thank you for your feedback.
>
> Initializing these fields conditionally preserves the existing
> capabilities for devices with both "tx" and "rx" DMA channels, while
> correctly disabling directions without a corresponding DMA channel. The
> added rate_min and rate_max assignments also preserve the existing rate
> constraints.
>
Yes, I agree. That's also the conclusion I reached after reading
rockchip_i2s_init_dai().
>
> With the current static initialization, channels_min is nonzero for both
> directions before dma-names is examined. snd_soc_dai_stream_valid()
> therefore considers capture valid even when the device only provides a
> "tx" DMA channel, which is permitted by the binding. The DMAengine PCM
> code may then create a capture substream without an RX DMA channel and
> fail during PCM creation.
>
I traced the probe path and confirmed that snd_soc_dai_stream_valid()
is called from soc_new_pcm().
However, I still couldn't see where a nonzero channels_min alone leads
to creating a capture substream
without an RX DMA channel.
To avoid confusion, I'm referring specifically to the DMA-based
configuration, not PIO mode.
Could you point me to the relevant call path?
Best regards,
Phuc
More information about the linux-riscv
mailing list