snd_pcm_hw_param_max(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the hw_params instance. 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 be NULL. 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 πŸ¦‹

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