snd_pcm_format_signed(9)
π snd_pcm_format_signed(9) β a Kernel API Manual moment π
okay bestie, welcome to the Kernel API Manual, and today's main character is literally this one function: snd_pcm_format_signed. and bestieβ¦ what does it do? it checks whether a PCM format is signed linear π that's it. that's the whole vibe. she's small, she's iconic, she's doing exactly one job and doing it well. β¨
πΈ NAME πΈ
snd_pcm_format_signed β check if a PCM format is signed linear π
β¨ SYNOPSIS β¨
int snd_pcm_format_signed (snd_pcm_format_t format );
like, that's the whole signature. no cap. π¦
π§ ARGUMENTS π§
formatβ the format you wanna check π that's the one and only thing you pass in, and yes it's asnd_pcm_format_t. she's the subject of the vibe check, periodt.
π RETURN π
okay so here's the tea, and the return value really said "three moods" π:
1β the given PCM format is signed linear. slay. π0β the given PCM format is unsigned linear. so close bestie, but no. π- a negative error code β for non-linear formats π it's not linear at all, it's givingβ¦ something else entirely.
fr fr, remember:1= signed linear,0= unsigned linear, negative = non-linear. don't mix them up or the audio gremlins will get you π₯
π SEE ALSO π
the Kernel file ./sound/core/pcm_misc.c is where this lives, and honestly the whole friend group is here β go say hi to all of them π«Ά:
snd_pcm_format_unsigned(9)snd_pcm_format_linear(9)snd_pcm_format_little_endian(9)snd_pcm_format_big_endian(9)snd_pcm_format_width(9)snd_pcm_format_physical_width(9)snd_pcm_format_size(9)snd_pcm_format_silence_64(9)snd_pcm_format_set_silence(9)snd_pcm_hw_limit_rates(9)snd_pcm_rate_to_rate_bit(9)snd_pcm_rate_bit_to_rate(9)snd_pcm_rate_mask_intersect(9)
and that's the whole page bestie π
so like, this one's from ./sound/core (iykyk π), dated October 2026 β, and it's the snd_pcm_format_signed(9) page β literally the same doc you just read, no notes, she ate and left absolutely no crumbs. go forth and check your PCM formats, queen ππ
π¦ 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