v4l2_get_link_freq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so bestie, welcome to the v4l2_get_link_freq(9) page from the Kernel API Manual β€” it’s giving β€œget link rate from transmitter” and honestly? iconic behavior πŸ’–

v4l2_get_link_freq - Get link rate from transmitter 🌸


✨ SYNOPSIS ✨

s64 v4l2_get_link_freq (const struct media_pad *pad , unsigned int mul ,
       unsigned int div );

πŸ’… ARGUMENTS πŸ’…

  • pad β€” the transmitter’s media pad, periodt 🫢
  • mul β€” the multiplier between pixel rate and link frequency. Bits per pixel on D-PHY, samples per clock on parallel. 0 otherwise πŸ’«
  • div β€” the divisor between pixel rate and link frequency. Number of data lanes times two on D-PHY, 1 on parallel. 0 otherwise πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function literally obtains and returns the link frequency from the transmitter sub-device’s pad, no cap ✨

the link frequency is retrieved using the get_mbus_config sub-device pad operation. if that fails, the function falls back to obtaining the frequency either directly from the V4L2_CID_LINK_FREQ control β€” if it’s implemented by the transmitter β€” or by calculating it from the pixel rate obtained from the V4L2_CID_PIXEL_RATE control πŸ’…

🌈 RETURN 🌈

  • >0 β€” link frequency, slay πŸ”₯
  • -ENOENT β€” link frequency or pixel rate control not found 😭
  • -EINVAL β€” invalid link frequency value πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file: ./include/media/v4l2-common.h

bestie, if you wanna keep reading, these are the linked girlies πŸ‘‡


that’s the whole vibe, bestie 🫢 this page came from ./include/media, dated October 2026, and tagged v4l2_get_link_freq(9) β€” periodt βœ¨πŸ’–

πŸ“¦ where this page comes from