MT2063_fLO_FractionalTerm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

MT2063_fLO_FractionalTerm β€” bestie, this one calculates the portion contributed by FracN / denom πŸ’… and it does it with maximum precision, no overflow risk β€” the way it accurately calculates f_ref * num / denom to within 1 HZ using fixed math is genuinely iconic πŸŽ€

This is from the Kernel API Manual, and yes we're getting into the tuner math weeds together πŸ¦‹


🌸 SYNOPSIS 🌸

u32 MT2063_fLO_FractionalTerm (u32 f_ref , u32 num , u32 denom );

πŸ’– ARGUMENTS πŸ’–

  • f_ref β€” SRO frequency 🫢 like, the reference frequency bestie, that's what we're working with.
  • num β€” Fractional portion of the multiplier ✨ the top part of the fraction vibe.
  • denom β€” denominator portion of the ratio 🌈 the bottom half, holding it down.

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this calculation handles f_ref as two separate 14-bit fields β€” yes, split into two, no cap 😭 Therefore, a maximum value of 2^28-1 may safely be used for f_ref. That is literally the genesis of the magic number "14" and the magic mask value of 0x03FFF πŸ”₯ iykyk.

This routine successfully handles denom values up to and including 2^18 πŸ’œ so like, it's got range.

Gentle heads-up bestie: keep f_ref within 2^28-1 because of that two-field 14-bit thing β€” the math is built around it πŸ’…

⭐ RETURN ⭐

f_ref * num / denom β€” that's the whole mood πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/media/tuners/mt2063.c, plus these absolute main characters:


Sign-off time, bestie: this page lives in ./drivers/media/tuners, and it's dated October 2026 πŸŽ€ go forth and calculate that fractional term, you've got this πŸ’–βœ¨

πŸ“¦ where this page comes from