snd_pcm_hw_param_max(9)
π NAME π
snd_pcm_hw_param_max β okay so that's the whole name, and honestly the description slot after the dash is literally empty in the source, like the manpage author posted the title and then closed the app π. So bestie, we go by the name alone: this is the "cap the max" girlie of the <pcm_oss.c> universe, manual section 9, Kernel API Manual energy, and we're getting into it π
πΈ SYNOPSIS πΈ
int snd_pcm_hw_param_max (struct snd_pcm_substream *pcm , struct
snd_pcm_hw_params *params , snd_pcm_hw_param_t var , unsigned int val ,
int *dir );
That's the whole vibe check: returns an int, takes five things, no cap π
π ARGUMENTS π
pcmβ the PCM instance. Like, the actual audio situation you're working with π¦paramsβ thehw_paramsinstance. Yes, the hw_params one specifically, not some other params, she's that girl β¨varβ the parameter to retrieve πvalβ the maximal value. The ceiling. The limit. The "no ma'am" line πdirβ pointer to the direction, and the direction is-1,0,1, or it can just beNULL. Choose your fighter π«Ά
β¨ DESCRIPTION β¨
Okay so here's what she actually does, and it's honestly so satisfying:
Inside the configuration space defined by PARAMS, she removes from PAR all values >= VAL + 1. Yep. Everything VAL + 1 and up? Gone. Blocked. Uninvited from the group chat π Then she reduces the configuration space accordingly β like cleaning out your closet but for numbers, lowkey therapeutic πΈ
She returns the new maximum π
And if the configuration space is empty? She returns -EINVAL. Because there's nothing left to give, bestie π
Ngl, an empty configuration space is not a slay β it's an error return. -EINVAL, periodt.
π¦ SEE ALSO π¦
- Kernel file
./sound/core/oss/pcm_oss.cβ the source material, iykyk π snd_pcm_hw_param_value_min(9)snd_pcm_hw_param_value_max(9)snd_pcm_hw_param_min(9)snd_pcm_hw_param_near(9)snd_pcm_hw_param_set(9)
The whole friend group fr fr π
And that's the page, bestie π this icon lives at ./sound/core/oss, dated October 2026, and the title card at the bottom reads snd_pcm_hw_param_max(9) β okay bye, go cap your maxes, 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