snd_pcm_hw_...aint_ratdens(9)
β¨ snd_pcm_hw_constraint_ratdens β the ratdens-constraint bestie π
okay so real talk, this is from the Kernel API Manual β like, the actual kernel API docs, not some random blog post, and we are gonna get through it together. grab a boba. π§
πΈ NAME πΈ
snd_pcm_hw_constraint_ratdens β the function that slaps a ratdens constraint onto a parameter. that's it, that's the vibe. periodt. π
π SYNOPSIS π
int snd_pcm_hw_constraint_ratdens (struct snd_pcm_runtime *runtime ,
unsigned int cond , snd_pcm_hw_param_t var , const struct
snd_pcm_hw_constraint_ratdens *r );
literally that's the whole signature, copy it exactly bestie, do not freestyle the punctuation, i'm begging π«Ά
π¦ ARGUMENTS π¦
runtimeβ the PCM runtime instance. yes queen, the whole runtime. the main character. πcondβ the condition bits. little flags doing their little flag thing. β¨varβ thehw_paramsvariable that the ratdens constraint gets applied to. that's the target, the chosen one. π―rβstruct snd_ratdensconstriants. (that spelling? not mine, it's in the source. we respect the source. π) icl it's giving struct-of-rational-density energy and i'm obsessed.
β RETURN β
returns zero if everything slayed, or a negative error code if it failed. so like, if it's not 0, something went off and you should probably care about it. no cap. π
π SEE ALSO π
okay this list is LONG but every single one of these stays, i am NOT skipping a single reference, we are thorough in this house π π
kernel file ./sound/core/pcm_lib.c β go read it, iykyk:
snd_pcm_set_ops(9)snd_pcm_set_sync_per_card(9)snd_interval_refine(9)snd_interval_div(9)snd_interval_muldivk(9)snd_interval_mulkdiv(9)snd_interval_ratnum(9)snd_interval_ratden(9)snd_interval_list(9)snd_interval_ranges(9)snd_pcm_hw_rule_add(9)snd_pcm_hw_constraint_mask(9)snd_pcm_hw_constraint_mask64(9)snd_pcm_hw_constraint_integer(9)snd_pcm_hw_constraint_minmax(9)snd_pcm_hw_constraint_list(9)snd_pcm_hw_constraint_ranges(9)snd_pcm_hw_constraint_ratnums(9)snd_pcm_hw_constraint_msbits(9)snd_pcm_hw_constraint_step(9)snd_pcm_hw_constraint_pow2(9)snd_pcm_hw_rule_noresample(9)snd_pcm_hw_param_value(9)snd_pcm_hw_param_first(9)snd_pcm_hw_param_last(9)snd_pcm_hw_params_bits(9)snd_pcm_lib_ioctl(9)snd_pcm_period_elapsed_under_stream_lock(9)snd_pcm_period_elapsed(9)snd_pcm_add_chmap_ctls(9)
like, the whole friend group showed up. π
pro tip from your girl: don't just skim the SEE ALSO, those siblings are literally the same family of constraint helpers and they WILL come up. π§
aaaand that's the page!! π this one lives in ./sound/core and it's dated October 2026, so yeah, straight from the source, mwah π slay, go write some audio drivers bestie π₯π
π¦ 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