snd_dmaengi...ime_hwparams(9)
β¨ NAME β¨
snd_dmaengine_pcm_refine_runtime_hwparams β the glow-up function for your runtime hw params π
okay so real talk, this is a page straight out of the Kernel API Manual, and it's honestly kind of iconic. it's the function that goes "hmm, let me actually check what the DMA can do" and then refines the PCM hardware parameters accordingly. lowkey a makeover montage but for structs π
πΈ SYNOPSIS πΈ
int snd_dmaengine_pcm_refine_runtime_hwparams (struct snd_pcm_substream
*substream , struct snd_dmaengine_dai_dma_data *dma_data , struct
snd_pcm_hardware *hw , struct dma_chan *chan );
like yes bestie, four pointers, one int coming back atcha π«Ά
π¦ ARGUMENTS π¦
substreamβ the PCM substream. she's the main character of this whole operation, no cap π€dma_dataβ the DAI DMA data. literally the DAI's DMA lore, iykykhwβ the PCM hw params. this is the one getting refined, so she's the one we're doing all this for β¨chanβ the DMA channel to use for data transfers. the actual transport, the vibe carrier ππ¨
π DESCRIPTION π
so what does she do, you ask? π
this function will query the DMA capability, and then β and this is the slay part β refine the pcm hardware parameters. that's it. that's the whole job. she asks the DMA what it's working with, and then polishes up the hw params to match. it's giving "let me check what you're capable of before I set my expectations" and honestly? healthy π
no guessing, no extra tricks β the manpage says "query DMA capability" and "refine the pcm hardware parameters," and that's exactly what happens. periodt π
β RETURN β
0 on success, a negative error code otherwise π
like, if it's 0 we celebrate, if it's negative we... do not. that's the whole vibe check π
π§ SEE ALSO π§
the kernel file herself lives right here:
- Kernel file
./sound/core/pcm_dmaengine.c
and the whole friend group π«Ά:
snd_hwparams_to_dma_slave_config(9)snd_dmaengine_pcm_set_config_from_dai_data(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)
all nine of them, bestie, every single one, we don't skip a single member of the squad ππ₯
okay that's the page!! this lived in ./sound/core and the date on it is October 2026 (yes, future energy, we love a timestamp that's ahead of schedule πΈ), and the whole thing is filed under snd_dmaengi...ime_hwparams(9) β the truncated little icon she is π. mwah, go refine some params, ily ππβ¨
π¦ 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