Re: [PATCH] ASoC: spacemit: Remove redundant DAI field initialization

From: Bui Duc Phuc

Date: Tue Aug 04 2026 - 10:31:17 EST


Hi Troy,

>
> More precisely, channels_min alone is not sufficient. The codec DAI must
> also support capture (or be the dummy DAI for a dynamic link), and the link
> must not be playback_only.
>
> Under those conditions, the path is:
>
> soc_new_pcm()
> -> soc_get_playback_capture()
> -> soc_create_pcm(..., capture = 1)
> -> snd_pcm_new()
> -> snd_pcm_new_stream(CAPTURE, 1)
> -> snd_soc_pcm_component_new()
> -> dmaengine_pcm_new()
>
> dmaengine_pcm_request_chan_of() tolerates a missing "rx" channel and leaves
> pcm->chan[CAPTURE] NULL. Once the capture substream exists,
> dmaengine_pcm_new() returns -EINVAL with
> "Missing dma channel for stream: 1".
> The conditional initialization prevents the CPU DAI from advertising that
> direction for a tx-only node.
>

Thanks for the detailed explanation and for tracing the call path.
I don't have Spacemit hardware available to verify this myself.
I'll update the commit message to reflect the behavior you've verified
on the hardware more accurately.

Best regards,
Phuc