snd_pcm_rate_to_rate_bit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

Okay bestie, this is snd_pcm_rate_to_rate_bit(9) from the Kernel API Manual β€” yes, manual name folded in, we're being efficient πŸ’…. It converts a sample rate to the matching SNDRV_PCM_RATE_xxx bit. That's the vibe. Slay.


πŸŽ€ SYNOPSIS πŸŽ€

unsigned int snd_pcm_rate_to_rate_bit (unsigned int rate );

🌸 ARGUMENTS 🌸

  • rate β€” the sample rate you want to convert. That's it, that's the whole argument, no cap.

πŸ¦‹ RETURN πŸ¦‹

It returns the SNDRV_PCM_RATE_xxx flag that corresponds to the given rate. If the rate is unknown, it returns SNDRV_PCM_RATE_KNOT β€” that's the unknown-rate flag, periodt πŸ’€.


πŸ’– SEE ALSO πŸ’–

The kernel file to peek at is ./sound/core/pcm_misc.c, and these are the related besties:


Source/version: ./sound/core Β· date: October 2026 Β· catch you in the kernel, bestie πŸ«ΆπŸ’‹

πŸ“¦ where this page comes from