v4l2_detect_cvt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ v4l2_detect_cvt(9) ✨

okay so this is a page from the Kernel API Manual, and the star of the show is v4l2_detect_cvt β€” bestie, its whole job is to detect if the given timings follow the CVT standard πŸŽ€


🌸 NAME 🌸

v4l2_detect_cvt β€” detect if the given timings follow the CVT standard

no cap, that's literally it. it checks the vibe of your timings against CVT πŸ’…


✨ SYNOPSIS ✨

bool v4l2_detect_cvt (unsigned int frame_height , unsigned int hfreq ,
       unsigned int vsync , unsigned int active_width , u32 polarities , bool
       interlaced , const struct v4l2_dv_timings_cap *cap , struct
       v4l2_dv_timings *fmt );

she takes eight arguments, and yes, you have to give her all of them 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • frame_height β€” the total height of the frame (including blanking) in lines. total. blanking included. don't forget the blanking, bestie 😭
  • hfreq β€” the horizontal frequency in Hz.
  • vsync β€” the height of the vertical sync in lines.
  • active_width β€” active width of image (does not include blanking). heads up: this info is needed only in case of version 2 of reduced blanking. In other cases, this parameter does not have any effect on timings. so like... sometimes she's just standing there, not doing anything 🧚
  • polarities β€” the horizontal and vertical polarities (same as struct v4l2_bt_timings polarities).
  • interlaced β€” if this flag is true, it indicates interlaced format.
  • cap β€” the v4l2_dv_timings_cap capabilities.
  • fmt β€” the resulting timings. this is where the answer lands, so keep it safe πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so what she does is: this function will attempt to detect if the given values correspond to a valid CVT format. If so, then it will return true, and fmt will be filled in with the found CVT timings. πŸŽ€

like, she's doing a vibe check on your numbers, and if they pass? true, and fmt gets the whole look. iconic behavior honestly ⭐

the function only attempts the detect β€” valid CVT format in, true out. anything else and the answer is no. no guessing, no inventing timings, periodt πŸ’…

🌈 SEE ALSO 🌈

we stay linking, fr fr:

Kernel file ./include/media/v4l2-dv-timings.h, plus these lovely little functions:


okay that's the whole page!! this one came out of ./include/media and it's dated October 2026 β€” so yeah, mark your calendar and stan the CVT standard πŸ’œπŸ¦‹πŸ’–

πŸ“¦ where this page comes from