STRUCT V4L2_SUBDEV_IR_OPS(9)
π struct v4l2_subdev_ir_ops(9) π
okay bestie, so this one's straight out of the Kernel API Manual and it's literally the whole vibe guide for IR subdevices β like, the function-pointer table that makes infrared stuff happen β¨ no cap, it's giving "small struct, huge responsibility" π
β¨ NAME β¨
struct v4l2_subdev_ir_ops β operations for IR subdevices π¦
πΈ SYNOPSIS πΈ
struct v4l2_subdev_ir_ops {
int (*rx_read)(struct v4l2_subdev *sd, u8 *buf, size_t count, ssize_t *num);
int (*rx_g_parameters)(struct v4l2_subdev *sd, struct v4l2_subdev_ir_parameters *params);
int (*rx_s_parameters)(struct v4l2_subdev *sd, struct v4l2_subdev_ir_parameters *params);
int (*tx_write)(struct v4l2_subdev *sd, u8 *buf, size_t count, ssize_t *num);
int (*tx_g_parameters)(struct v4l2_subdev *sd, struct v4l2_subdev_ir_parameters *params);
int (*tx_s_parameters)(struct v4l2_subdev *sd, struct v4l2_subdev_ir_parameters *params);
};
π«Ά Members π«Ά
π rx_read
Reads received codes or pulse width data. The semantics are similar to a non-blocking read call. iykyk π
π rx_g_parameters
Get the current operating parameters and state of the IR receiver.
π rx_s_parameters
Set the current operating parameters and state of the IR receiver.
okay so hear me out β it is recommended to call [rt]x_g_parameters first to fill out the current state, and only change the fields that need to be changed. Upon return, the actual device operating parameters and state will be returned.
and like, note that hardware limitations may prevent the actual settings from matching the requested settings β e.g. an actual carrier setting of 35,904 Hz when 36,000 Hz was requested. your girl tried her best, the silicon said no π
one exception though: when the shutdown parameter is true. The last used operational parameters will be returned, but the actual state of the hardware be different to minimize power consumption and processing when shutdown is true. lowkey iconic efficiency move tbh π₯
π tx_write
Writes codes or pulse width data for transmission. The semantics are similar to a non-blocking write call. periodt π‘
π tx_g_parameters
Get the current operating parameters and state of the IR transmitter.
π tx_s_parameters
Set the current operating parameters and state of the IR transmitter.
same deal as the receiver, bestie π« it is recommended to call [rt]x_g_parameters first to fill out the current state, and only change the fields that need to be changed. Upon return, the actual device operating parameters and state will be returned.
Note that hardware limitations may prevent the actual settings from matching the requested settings β e.g. an actual carrier setting of 35,904 Hz when 36,000 Hz was requested. not the hardware being a little extra π
and again the exception: when the shutdown parameter is true. The last used operational parameters will be returned, but the actual state of the hardware be different to minimize power consumption and processing when shutdown is true. we love a power-conscious king π
π SEE ALSO π
Kernel file ./include/media/v4l2-subdev.h β and yes, the girlies who wrote all this also wrote these, go say hi π
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_pad_config(9)struct v4l2_subdev_stream_configs(9)struct v4l2_subdev_krouting(9)struct v4l2_subdev_state(9)struct v4l2_subdev_pad_ops(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)
aaaand that's the whole page bestie, mwah π this little number lives at ./include/media, it's dated October 2026, and it's filed under struct v4l2_subdev_ir_ops(9) β go off, infrared icon ππ
β¨
π¦ 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