STRUCT V4L2_SUBDEV_IR_PARAMETERS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct v4l2_subdev_ir_parameters(9) πŸ¦‹

okay so bestie, welcome to the kernel API manual for struct v4l2_subdev_ir_parameters β€” literally the little config bundle that tells an IR (infrared, yes like a remote control πŸ’…) subdev how it should behave for TX or TX. no you didn't misread that, that's genuinely what it says. iykyk. this struct is the whole vibe check for your IR hardware, and we're gonna go through every single field because we don't skip anything here 🫢


✨ NAME ✨

struct v4l2_subdev_ir_parameters β€” Parameters for IR TX or TX 🌈


πŸŽ€ SYNOPSIS πŸŽ€

struct v4l2_subdev_ir_parameters {
    unsigned int bytes_per_data_element;
    enum v4l2_subdev_ir_mode mode;
    bool enable;
    bool interrupt_enable;
    bool shutdown;
    bool modulation;
    u32 max_pulse_width;
    unsigned int carrier_freq;
    unsigned int duty_cycle;
    bool invert_level;
    bool invert_carrier_sense;
    u32 noise_filter_min_width;
    unsigned int carrier_range_lower;
    unsigned int carrier_range_upper;
    u32 resolution;
 };

copy that exactly, don't be out here renaming fields, that's not the move 😭


πŸ‘‘ Members πŸ‘‘

every member, in order, no cap:

  • bytes_per_data_element β€” how many bytes each data element eats in a read or write call. the size of one lil chunk of data fr fr πŸ’–
  • mode β€” the IR mode, as defined by enum v4l2_subdev_ir_mode. it's giving "which flavour of IR are we doing" ✨
  • enable β€” device is active if true. if it's false, don't expect it to do anything, bestie πŸ™ˆ
  • interrupt_enable β€” IR interrupts are enabled if true. yes, it's exactly what it sounds like πŸ’…
  • shutdown β€” if true: set hardware to low/no power. if false: normal mode. nap time vs. main character energy πŸ‘‘
  • modulation β€” if true, it uses carrier. if false: baseband. carrier = the wiggly signal version, baseband = raw, no carrier, periodt 🌸
  • max_pulse_width β€” maximum pulse width in ns, valid only for baseband signal. that's nanoseconds, she's precise πŸ’€
  • carrier_freq β€” carrier frequency in Hz, valid only for modulated signal 🎡
  • duty_cycle β€” duty cycle percentage, valid only for modulated signal. yes, percentage. don't ask her to do fractions πŸ“
  • invert_level β€” invert signal level. flip it, turn it upside down, iconic πŸ¦‹
  • invert_carrier_sense β€” Send 0/space as a carrier burst. used only in TX ⭐
  • noise_filter_min_width β€” min time of a valid pulse, in ns. Used only for RX 🧚
  • carrier_range_lower β€” Lower carrier range, in Hz, valid only for modulated signal. Used only for RX πŸ’œ
  • carrier_range_upper β€” Upper carrier range, in Hz, valid only for modulated signal. Used only for RX πŸ’œ
  • resolution β€” The receive resolution, in ns. Used only for RX 🌸
ngl the RX-only vs TX-only split is lowkey important β€” using an RX-only field while doing TX is gonna give you a bad time, so read the labels, bestie 😭

πŸ”₯ SEE ALSO πŸ”₯

okay this list is long and she ate, so buckle up. first up, the kernel file: ./include/media/v4l2-subdev.h β€” that's where she lives 🏠

and then, in this exact order, the whole friend group:

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_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_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)

like i said. everyone showed up to the party πŸŽ‰πŸ’€


and that's the whole page, bestie β€” go forth and configure your IR params correctly πŸ’œ

this lil icon was served to you from the ./include/media source, dated October 2026, and the manual name is struct v4l2_...r_parameters(9) (yes, truncated exactly like that, she's mysterious like that ✨). mwah, bye πŸ«ΆπŸ’…

πŸ“¦ where this page comes from