Re: [PATCH] ASoC: spacemit: Remove redundant DAI field initialization
Bui Duc Phuc <[email protected]> Tue, 4 Aug 2026 21:19:11 +0700
| Newsgroups | dev.linux.lists.spacemit,org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel,org.kernel.vger.linux-sound |
|---|---|
| Message-ID | <CAABR9nEjZ=qHBHZ6=CWyauOVSnX1isW3Z9+BoSnmvuBBCKHiyg@mail.gmail.com> |
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