STRUCT V4L2_SUBDEV_PAD_OPS(9)
π NAME π
struct v4l2_subdev_pad_ops β v4l2-subdev pad level operations. Okay bestie, this page is from the Kernel API Manual, and itβs literally the pad-level ops struct for v4l2 subdevs. Main character energy, no cap. π¦
β¨ SYNOPSIS β¨
Hereβs the whole struct, copied exactly because code gets zero vibes-based edits, periodt:
struct v4l2_subdev_pad_ops {
int (*enum_mbus_code)(struct v4l2_subdev *sd, struct
v4l2_subdev_state *state, struct v4l2_subdev_mbus_code_enum *code);
int (*enum_frame_size)(struct v4l2_subdev *sd, struct
v4l2_subdev_state *state, struct v4l2_subdev_frame_size_enum *fse);
int (*enum_frame_interval)(struct v4l2_subdev *sd, struct
v4l2_subdev_state *state, struct v4l2_subdev_frame_interval_enum *fie);
int (*get_fmt)(struct v4l2_subdev *sd, struct v4l2_subdev_state
*state, struct v4l2_subdev_format *format);
int (*set_fmt)(struct v4l2_subdev *sd, struct v4l2_subdev_state
*state, struct v4l2_subdev_format *format);
int (*get_selection)(struct v4l2_subdev *sd, struct
v4l2_subdev_state *state, struct v4l2_subdev_selection *sel);
int (*set_selection)(struct v4l2_subdev *sd, struct
v4l2_subdev_state *state, struct v4l2_subdev_selection *sel);
int (*get_frame_interval)(struct v4l2_subdev *sd, struct
v4l2_subdev_state *state, struct v4l2_subdev_frame_interval *interval);
int (*set_frame_interval)(struct v4l2_subdev *sd, struct
v4l2_subdev_state *state, struct v4l2_subdev_frame_interval *interval);
int (*get_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid);
int (*set_edid)(struct v4l2_subdev *sd, struct v4l2_edid *edid);
int (*s_dv_timings)(struct v4l2_subdev *sd, unsigned int pad, struct
v4l2_dv_timings *timings);
int (*g_dv_timings)(struct v4l2_subdev *sd, unsigned int pad, struct
v4l2_dv_timings *timings);
int (*query_dv_timings)(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_dv_timings *timings);
int (*dv_timings_cap)(struct v4l2_subdev *sd, struct
v4l2_dv_timings_cap *cap);
int (*enum_dv_timings)(struct v4l2_subdev *sd, struct
v4l2_enum_dv_timings *timings);
#ifdef CONFIG_MEDIA_CONTROLLER;
int (*link_validate)(struct v4l2_subdev *sd, struct media_link
*link, struct v4l2_subdev_format *source_fmt, struct v4l2_subdev_format
*sink_fmt);
#endif ;
int (*get_frame_desc)(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_mbus_frame_desc *fd);
int (*set_frame_desc)(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_mbus_frame_desc *fd);
int (*get_mbus_config)(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_mbus_config *config);
int (*set_routing)(struct v4l2_subdev *sd, struct v4l2_subdev_state
*state, enum v4l2_subdev_format_whence which, struct
v4l2_subdev_krouting *route);
int (*enable_streams)(struct v4l2_subdev *sd, struct
v4l2_subdev_state *state, u32 pad, u64 streams_mask);
int (*disable_streams)(struct v4l2_subdev *sd, struct
v4l2_subdev_state *state, u32 pad, u64 streams_mask);
};
π Members π
Hereβs the whole callback roster β no skips, no cuts, every one is a main character. π
enum_mbus_codeβ callback for theVIDIOC_SUBDEV_ENUM_MBUS_CODEioctl handler code. β¨enum_frame_sizeβ callback for theVIDIOC_SUBDEV_ENUM_FRAME_SIZEioctl handler code.enum_frame_intervalβ callback for theVIDIOC_SUBDEV_ENUM_FRAME_INTERVALioctl handler code.get_fmtβ callback for theVIDIOC_SUBDEV_G_FMTioctl handler code.set_fmtβ callback for theVIDIOC_SUBDEV_S_FMTioctl handler code.get_selectionβ callback for theVIDIOC_SUBDEV_G_SELECTIONioctl handler code.set_selectionβ callback for theVIDIOC_SUBDEV_S_SELECTIONioctl handler code.get_frame_intervalβ callback for theVIDIOC_SUBDEV_G_FRAME_INTERVALioctl handler code.set_frame_intervalβ callback for theVIDIOC_SUBDEV_S_FRAME_INTERVALioctl handler code.get_edidβ callback for theVIDIOC_SUBDEV_G_EDIDioctl handler code.set_edidβ callback for theVIDIOC_SUBDEV_S_EDIDioctl handler code.s_dv_timingsβ Set custom dv timings in the sub device. This is used when sub device is capable of setting detailed timing information in the hardware to generate/detect the video signal.g_dv_timingsβ Get custom dv timings in the sub device.query_dv_timingsβ callback for theVIDIOC_QUERY_DV_TIMINGSioctl handler code.dv_timings_capβ callback for theVIDIOC_SUBDEV_DV_TIMINGS_CAPioctl handler code.enum_dv_timingsβ callback for theVIDIOC_SUBDEV_ENUM_DV_TIMINGSioctl handler code.link_validateβ used by the media controller code to check if the links that belongs to a pipeline can be used for stream. Lowkey lives inside the#ifdef CONFIG_MEDIA_CONTROLLER;part of the struct.get_frame_descβ get the current low level media bus frame parameters.set_frame_descβ set the low level media bus frame parameters,fdarray may be adjusted by the subdev driver to device capabilities.get_mbus_configβ get the media bus configuration of a remote sub-device. The media bus configuration is usually retrieved from the firmware interface at sub-device probe time, immediately applied to the hardware and eventually adjusted by the driver. Remote sub-devices (usually video receivers) shall use this operation to query the transmitting end bus configuration in order to adjust their own one accordingly. Callers should make sure they get the most up-to-date as possible configuration from the remote end, likely calling this operation as close as possible to stream on time. The operation shall fail if the pad index it has been called on is not valid or in case of unrecoverable failures. Theconfigargument has beenmemsetto 0 just before calling the op. π«Άset_routingβ Enable or disable data connection routes described in the subdevice routing table. Subdevs that implement this operation must set theV4L2_SUBDEV_FL_STREAMSflag.enable_streamsβ Enable the streams defined instreams_maskon the given source pad. Subdevs that implement this operation must use the active state management provided by the subdev core (enabled through a call tov4l2_subdev_init_finalizeat initialization time). Do not call directly, usev4l2_subdev_enable_streamsinstead.disable_streamsβ Disable the streams defined instreams_maskon the given source pad. Subdevs that implement this operation must use the active state management provided by the subdev core (enabled through a call tov4l2_subdev_init_finalizeat initialization time). Do not call directly, usev4l2_subdev_disable_streamsinstead.
πΈ Description πΈ
Not me reading the Description and seeing the exact same sentence twice π but honestly? Periodt. Here are both copies so nothing gets lost, bestie:
Drivers that support only a single stream without setting the V4L2_SUBDEV_CAP_STREAMS sub-device capability flag can ignore the mask argument.
Drivers that support only a single stream without setting the V4L2_SUBDEV_CAP_STREAMS sub-device capability flag can ignore the mask argument.
Yes, literally the same line twice. The original said it, so we said it. π
π₯ SEE ALSO π₯
Okay these are all the related pages and APIs β full squad, no cuts, all the (9)s staying exactly as they are:
- Kernel file
./include/media/v4l2-subdev.h struct v4l2_decode_vbi_line(9)enum v4l2_subdev_io_pin_bits(9)struct v4l2_subdev_io_pin_config(9)struct v4l2_subdev_core_ops(9)struct v4l2_subdev_tuner_ops(9)struct v4l2_subdev_audio_ops(9)struct v4l2_mbus_frame_desc_entry_csi2(9)enum v4l2_mbus_frame_desc_flags(9)struct v4l2_mbus_frame_desc_entry(9)enum v4l2_mbus_frame_desc_type(9)struct v4l2_mbus_frame_desc(9)enum v4l2_subdev_pre_streamon_flags(9)struct v4l2_subdev_video_ops(9)struct v4l2_subdev_vbi_ops(9)struct v4l2_subdev_sensor_ops(9)enum v4l2_subdev_ir_mode(9)struct v4l2_subdev_ir_parameters(9)struct v4l2_subdev_ir_ops(9)struct v4l2_subdev_pad_config(9)struct v4l2_subdev_stream_configs(9)struct v4l2_subdev_krouting(9)struct v4l2_subdev_state(9)struct v4l2_subdev_ops(9)struct v4l2_subdev_internal_ops(9)struct v4l2_subdev_platform_data(9)struct v4l2_subdev(9)media_entity_to_v4l2_subdev(9)vdev_to_v4l2_subdev(9)struct v4l2_subdev_fh(9)to_v4l2_subdev_fh(9)v4l2_set_subdevdata(9)v4l2_get_subdevdata(9)v4l2_set_subdev_hostdata(9)v4l2_get_subdev_hostdata(9)v4l2_subdev_get_fwnode_pad_1_to_1(9)v4l2_subdev_link_validate_default(9)v4l2_subdev_link_validate(9)v4l2_subdev_has_pad_interdep(9)__v4l2_subdev_state_alloc(9)__v4l2_subdev_state_free(9)v4l2_subdev_init_finalize(9)v4l2_subdev_cleanup(9)v4l2_subdev_state_get_format(9)v4l2_subdev_state_get_crop(9)v4l2_subdev_state_get_compose(9)v4l2_subdev_state_get_interval(9)v4l2_subdev_get_fmt(9)v4l2_subdev_get_frame_interval(9)v4l2_subdev_set_routing(9)for_each_active_route(9)v4l2_subdev_set_routing_with_fmt(9)v4l2_subdev_routing_find_opposite_end(9)v4l2_subdev_state_get_opposite_stream_format(9)v4l2_subdev_state_xlate_streams(9)enum v4l2_subdev_routing_restriction(9)v4l2_subdev_routing_validate(9)v4l2_subdev_enable_streams(9)v4l2_subdev_disable_streams(9)v4l2_subdev_s_stream_helper(9)__v4l2_subdev_get_frame_desc_passthrough(9)v4l2_subdev_get_frame_desc_passthrough(9)v4l2_subdev_lock_state(9)v4l2_subdev_unlock_state(9)v4l2_subdev_lock_states(9)v4l2_subdev_unlock_states(9)v4l2_subdev_get_unlocked_active_state(9)v4l2_subdev_get_locked_active_state(9)v4l2_subdev_lock_and_get_active_state(9)v4l2_subdev_init(9)v4l2_subdev_call(9)v4l2_subdev_call_state_active(9)v4l2_subdev_call_state_try(9)v4l2_subdev_has_op(9)v4l2_subdev_notify_event(9)v4l2_subdev_is_streaming(9)
mwah π thatβs the whole page, bestie! source ./include/media, October 2026, struct v4l2_subdev_pad_ops(9) β go off, kernel queen π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms