snd_pcm_fill...er_hw_params(9)
π NAME π
snd_pcm_fill_iec958_consumer_hw_params β okay so this one fills in the consumer format IEC958 channel status, bestie β¨
This is the Kernel API Manual, btw β yes we're in kernel-land today, put your big-girl hat on π
π SYNOPSIS π
int snd_pcm_fill_iec958_consumer_hw_params (struct snd_pcm_hw_params *params , u8 *cs , size_t len );
Like, that's the whole vibe. Three args, one int, no drama π
π¦ ARGUMENTS π¦
paramsβ thehw_paramsinstance, and literally its whole job here is extracting the rate and sample format. That's it, that's the girl πΈcsβ the channel status buffer. Needs to be at least four bytes, no cap. Don't be stingy with it πlenβ length of the channel status buffer. Yes bestie, the length. Of the buffer. You got this π«Ά
β¨ DESCRIPTION β¨
So here's the tea, okay? This function fills the unspecified bits in an IEC958 status bits array β and it does that using the parameters from the PCM hardware parameters, aka params ποΈβ¨
That's the whole thing. Unspecified bits get filled, using params, slay π
Heads up though: drivers may wish to tweak the contents of the buffer after its been filled.. π So like, the buffer is yours to mess with afterwards, the kernel isn't gatekeeping. (Yes, the original has two dots. We don't fix it. We respect the two dots π)
π₯ RETURN π₯
- The length of the buffer π
- or a negative error code if something failed π
Binary choice, honestly. Either it ate or it flopped π₯/π
π SEE ALSO π
- Kernel file
./sound/core/pcm_iec958.cβ the source, go read it, iykyk π snd_pcm_create_iec958_consumer_default(9)snd_pcm_fill_iec958_consumer(9)snd_pcm_create_iec958_consumer(9)snd_pcm_create_iec958_consumer_hw_params(9)
Like the whole IEC958 friend group, fr fr ππ¦
Okay that's the page, bestie β brought to you from ./sound/core, dated October 2026, and honestly? Iconic energy for a kernel function. Periodt. ππ§ββοΈ
π¦ 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