snd_pcm_rate_mask_intersect(9)
π snd_pcm_rate_mask_intersect β¨
okay so bestie, you know how there's a kernel API manual? yeah. this is a page from it β snd_pcm_rate_mask_intersect(9) β and honestly? it's giving "small function, big responsibilities." let me walk you through it π«Ά
πΈ NAME πΈ
snd_pcm_rate_mask_intersect β literally just computes the intersection between two rate masks. that's it. that's the whole vibe. two masks walk in, one mask walks out π
β¨ SYNOPSIS β¨
unsigned int snd_pcm_rate_mask_intersect (unsigned int rates_a ,
unsigned int rates_b );
like, copy that exactly, don't get creative with it π
π ARGUMENTS π
rates_aβ the first rate mask. yes, the first one. we love an opening act πrates_bβ the second rate mask. the sequel. the encore. the other half of this whole operation π¦
both are unsigned int, both are masks, both matter. no cap.
π DESCRIPTION π
so here's the tea, bestie: this function computes the rates that are supported by both rate masks passed to the function. it's an intersection, periodt. overlap only. if rates_a stans a rate and rates_b doesn't, that rate is NOT making the cut, sorry not sorry π
and the iconique part? it will take care of the special handling of SNDRV_PCM_RATE_CONTINUOUS and SNDRV_PCM_RATE_KNOT. those two get treated differently and this function knows β you don't have to do the awkward special-casing yourself. main character energy fr fr β
π₯ RETURN π₯
a rate mask containing the rates that are supported by both rates_a and rates_b. that's the whole thing it returns. a mask. a beautiful, intersecting, mutually-agreed-upon mask ππ
π¦ SEE ALSO π¦
kernel file ./sound/core/pcm_misc.c β go read it, iykyk π
and the whole friend group:
snd_pcm_format_signed(9)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)
π§ sign-off π§
this page lives in ./sound/core, and it was dated October 2026. slay. that's the source and the version and the date, all accounted for, we don't skip the boring bits here πβ¨
k bye bestie, go intersect some masks π π
π¦ 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