v4l2_subdev_...get_interval(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 v4l2_subdev_state_get_interval β€” like, the whole vibe πŸ’…

Ok so bestie, real talk: this is a page from the Kernel API Manual, and the function on the cover is v4l2_subdev_...get_interval(9). Yes the title is truncated, no I don't know why, the man page people just did that. The full name is v4l2_subdev_state_get_interval and it's actually so simple. Let's go. ✨


✨ NAME ✨

v4l2_subdev_state_get_interval β€” get a pointer to a stream frame interval. That's it, that's the whole job. πŸŽ€


✨ SYNOPSIS ✨

v4l2_subdev_state_get_interval (state , pad , ... );

Look at her. Three args, one of them is literally .... Main character energy tbh. πŸ‘‘


✨ ARGUMENTS ✨

  • state β€” the subdevice state. The whole mood board. πŸͺ©
  • pad β€” the pad id. Which pad we're talking about, bestie. πŸ“
  • ... β€” the stream id, and psst, it's an optional argument. Optional, like your situationship. πŸ™ˆ

✨ DESCRIPTION ✨

So what does it do? It returns a pointer to the frame interval for the given pad + stream, inside the subdev state. Pointer. Not a copy. Not a vibe. A pointer. 🫢

And here's the little plot twist: for stream-unaware drivers, you get the frame interval for the corresponding pad instead. Makes sense, they don't do streams, so the pad is the whole story. πŸ’«

And if the pad doesn't exist? NULL is returned. Nothing. Nada. The void. 😭 Don't dereference it, I'm begging.

Real talk: the return is a pointer, so check it before you touch it. If the pad doesn't exist you get NULL and that's the documented behavior, not a bug. 🫑

✨ SEE ALSO ✨

Kernel file ./include/media/v4l2-subdev.h β€” go read it, it's lowkey iconic. 🌈 And here's the entire friend group, no cap, every single one:


Ok that's the whole thing, you ate that. πŸ“

Later, bestie β€” this one lives in ./include/media, it's from the Kernel API Manual, dated October 2026. Go touch some pads (the v4l2 kind). πŸ’œπŸ¦‹

πŸ“¦ where this page comes from