snd_pcm_crea...958_consumer(9)
π NAME π
snd_pcm_create_iec958_consumer β bestie, this is the one that creates consumer format IEC958 channel status β¨ (yes, the whole header of this page got truncated to snd_pcm_crea...958_consumer(9) and it's living in the Kernel API Manual, section 9, we don't talk about it π)
β¨ SYNOPSIS β¨
int snd_pcm_create_iec958_consumer (struct snd_pcm_runtime *runtime , u8
*cs , size_t len );
like, that's the whole vibe check right there π«Ά
πΈ ARGUMENTS πΈ
runtimeβ the pcm runtime structure, and it needs->ratealready filled in, okay? that part's on you π₯csβ the channel status buffer. it has to be at least four bytes, no cap, don't come at it with two πlenβ the length of that channel status buffer, tell it how much room it's working with π
π¦ DESCRIPTION π¦
So what it does is: it creates the consumer format channel status data inside cs, up to a maximum size of len, and it matches everything to the parameters of the PCM runtime runtime β¨ it's giving "I read the room and filled in the buffer accordingly."
And here's the cute part: drivers may wish to tweak the contents of the buffer after creation π so like, it does the main character work and then you can go in and adjust the fit, iykyk π
β RETURN β
It returns the length of the buffer π β or a negative error code if something failed π (ngl if you see a negative number, something went wrong, go fix it).
π SEE ALSO π
- Kernel file
./sound/core/pcm_iec958.cβ the source, go read it, it's literally right there π snd_pcm_create_iec958_consumer_default(9)snd_pcm_fill_iec958_consumer(9)snd_pcm_fill_iec958_consumer_hw_params(9)snd_pcm_create_iec958_consumer_hw_params(9)
the whole friend group, fr fr π§
lowkey reminder:csis at least four bytes,runtime->ratemust be filled in, and negative return = error. that's the tea π
okay that's the page!! this icon ate and left no crumbs π β brought to you from ./sound/core, dated October 2026, 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