[PATCH] ASoC: spacemit: Remove redundant DAI field initialization
Bui Duc Phuc
phucduc.bui at gmail.com
Tue Aug 4 07:19:11 PDT 2026
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
More information about the linux-riscv
mailing list