snd_pcm_set_...d_buffer_all(9)
β¨ snd_pcm_set_...d_buffer_all(9) β¨
okay bestie, so this page lives in the Kernel API Manual and it's all about snd_pcm_set_fixed_buffer_all β the function that preallocates AND sets up the fixed size PCM buffer for you. like, the whole entire thing. no cap π
πΈ NAME πΈ
snd_pcm_set_fixed_buffer_all β preallocate and set up the fixed size PCM buffer, bestie. that's the whole vibe. π
π¦ SYNOPSIS π¦
int snd_pcm_set_fixed_buffer_all (struct snd_pcm *pcm , int type ,
struct device *data , size_t size );
literally copy that signature exactly, ok? it's giving "type it carefully" energy π
π ARGUMENTS π
pcmβ the pcm instance, the main character of this whole operation πtypeβ the DMA type, and it's one of theSNDRV_DMA_TYPE_*family (*= whatever flavor you pick, iykyk)dataβ DMA type dependent data, so it's whatever the DMA type needs. matching vibes only π«Άsizeβ the requested pre-allocation size, measured in bytes. bytes, not vibes. π
π₯ DESCRIPTION π₯
so what it actually does: it applies the set up of the fixed buffer via snd_pcm_set_fixed_buffer for all substream. every single one. periodt. π―
and real talk β if any of allocation fails, it returns -ENOMEM. so the caller must check the return value. do not skip the vibe check on that return value, bestie, that's how you get a sad kernel πβ¨
β RETURN β
zero if successful, or a negative error code. that's it, that's the tea π
π SEE ALSO π
okay this list is long but every single one of these is iconic and you're gonna read all of them, no skipping ππ
- Kernel file
./include/sound/pcm.h snd_pcm_stream_linked(9)snd_pcm_stream_lock_irqsave(9)snd_pcm_stream_lock_irqsave_nested(9)snd_pcm_group_for_each_entry(9)snd_pcm_running(9)__snd_pcm_set_state(9)bytes_to_samples(9)bytes_to_frames(9)samples_to_bytes(9)frames_to_bytes(9)frame_aligned(9)snd_pcm_lib_buffer_bytes(9)snd_pcm_lib_period_bytes(9)snd_pcm_playback_avail(9)snd_pcm_capture_avail(9)snd_pcm_playback_hw_avail(9)snd_pcm_capture_hw_avail(9)snd_pcm_playback_ready(9)snd_pcm_capture_ready(9)snd_pcm_playback_data(9)snd_pcm_playback_empty(9)snd_pcm_capture_empty(9)snd_pcm_trigger_done(9)params_channels(9)params_rate(9)params_period_size(9)params_periods(9)params_buffer_size(9)params_buffer_bytes(9)snd_pcm_hw_constraint_single(9)snd_pcm_format_cpu_endian(9)snd_pcm_set_sync(9)snd_pcm_set_runtime_buffer(9)snd_pcm_gettime(9)snd_pcm_set_fixed_buffer(9)snd_pcm_sgbuf_get_addr(9)snd_pcm_sgbuf_get_chunk_size(9)snd_pcm_limit_isa_dma_size(9)snd_pcm_direction_name(9)snd_pcm_stream_str(9)snd_pcm_chmap_substream(9)pcm_format_to_bits(9)pcm_for_each_format(9)
that's the whole page, bestie, you ate that π«Άπ
π cute little sign-off: this one ships from ./include/sound and it's dated October 2026. iconic. mwah πβ¨
π¦ 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