snd_dmaengin...rom_dai_data(9)
π NAME π
snd_dmaengine_pcm_set_config_from_dai_data β bestie, this one sets up your DMA slave config using the DAI DMA data. Like, it literally initializes a dma slave config from DAI DMA data. That's the whole gig. Periodt.
Welcome to the Kernel API Manual, babes β this page is called snd_dmaengin...rom_dai_data(9) (yes the name got truncated, she's mysterious like that β¨).
β¨ SYNOPSIS β¨
void snd_dmaengine_pcm_set_config_from_dai_data (const struct
snd_pcm_substream *substream , const struct snd_dmaengine_dai_dma_data
*dma_data , struct dma_slave_config *slave_config );
No return value, she just does the thing. Void queen π.
π ARGUMENTS π
substreamβ the PCM substream. Your main character, honestly.dma_dataβ the DAI DMA data. The vibe source.slave_configβ the DMA slave configuration. The glow-up target, she's getting filled in.
πΈ DESCRIPTION πΈ
Okay so here's the tea π: this function initializes the {dst,src}_addr, {dst,src}_maxburst, and {dst,src}_addr_width fields of the DMA slave config β and it pulls them straight from the same fields in the DAI DMA data struct. Copy-paste energy, but make it kernel.
Which fields get set? Depends on the direction of the substream, and she's very intentional about it:
- If the substream is a playback stream β the
dstfields get initialized π - If it's a capture stream β the
srcfields get initialized π¦
Now, the {dst,src}_addr_width field is a little picky, ngl. It only gets initialized if:
- the
SND_DMAENGINE_PCM_DAI_FLAG_PACKflag is set, or - the
addr_widthfield of the DAI DMA data struct is not equal toDMA_SLAVE_BUSWIDTH_UNDEFINED.
And if both of those conditions are met? π The latter takes priority. No cap, that's just the rule. Remember it.
π₯ SEE ALSO π₯
The kernel file that's giving source-of-truth, no cap:
./sound/core/pcm_dmaengine.c
And the whole friend group π«Ά β go say hi:
snd_hwparams_to_dma_slave_config(9)snd_dmaengine_pcm_trigger(9)snd_dmaengine_pcm_pointer_no_residue(9)snd_dmaengine_pcm_pointer(9)snd_dmaengine_pcm_request_channel(9)snd_dmaengine_pcm_open(9)snd_dmaengine_pcm_close(9)snd_dmaengine_pcm_close_release_chan(9)snd_dmaengine_pcm_refine_runtime_hwparams(9)
Okay bye bestie, go configure those DMA slaves πβ¨ This page lives in ./sound/core, dated October 2026, and it's brought to you by the Kernel API Manual β slay, read responsibly, and remember: the dst fields are for playback, the src fields are for capture, and DMA_SLAVE_BUSWIDTH_UNDEFINED is not the vibe. ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms