STRUCT V4L2_SUBDEV_TUNER_OPS(9)
π struct v4l2_subdev_tuner_ops(9) β the Kernel API Manual, bestie edition π
okay so this is a page from the kernel API manual, and it's literally all about struct v4l2_subdev_tuner_ops β the callback squad that shows up when your v4l device gets opened in radio mode. π»β¨
β¨ NAME β¨
struct v4l2_subdev_tuner_ops β Callbacks used when v4l device was opened in radio mode.
π¦ SYNOPSIS π¦
struct v4l2_subdev_tuner_ops {
int (*standby)(struct v4l2_subdev *sd);
int (*s_radio)(struct v4l2_subdev *sd);
int (*s_frequency)(struct v4l2_subdev *sd, const struct v4l2_frequency *freq);
int (*g_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq);
int (*enum_freq_bands)(struct v4l2_subdev *sd, struct v4l2_frequency_band *band);
int (*g_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
int (*s_tuner)(struct v4l2_subdev *sd, const struct v4l2_tuner *vt);
int (*g_modulator)(struct v4l2_subdev *sd, struct v4l2_modulator *vm);
int (*s_modulator)(struct v4l2_subdev *sd, const struct v4l2_modulator *vm);
int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type);
int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config);
};
π Members π
standbyβ puts the tuner in standby mode. bestie it does not need you to wake it up manually, it gets woken up automatically the next time it's used. main character energy honestly πβ¨s_radioβ callback that switches the tuner to radio mode. drivers should explicitly call it when a tuner ops should operate on radio mode, before being able to handle it. Used on devices that have both AM/FM radio receiver and TV. π»πΊs_frequencyβ callback forVIDIOC_S_FREQUENCYioctl handler code.g_frequencyβ callback forVIDIOC_G_FREQUENCYioctl handler code.freq->typemust be filled in. Normally done byvideo_ioctl2or the bridge driver. π«Άenum_freq_bandsβ callback forVIDIOC_ENUM_FREQ_BANDSioctl handler code.g_tunerβ callback forVIDIOC_G_TUNERioctl handler code.s_tunerβ callback forVIDIOC_S_TUNERioctl handler code.vt->typemust be filled in. Normally done byvideo_ioctl2or the bridge driver. βg_modulatorβ callback forVIDIOC_G_MODULATORioctl handler code.s_modulatorβ callback forVIDIOC_S_MODULATORioctl handler code.s_type_addrβ sets tuner type and its I2C addr. πs_configβ setstda9887specific stuff, likeport1,port2andqss. π
πΈ Description πΈ
NOTE: π¨
On devices that have both AM/FM and TV, it is up to the driver to explicitly call s_radio when the tuner should be switched to radio mode, before handling other struct v4l2_subdev_tuner_ops that would require it. no cap, that's on the driver, not on the framework. π
An example of such usage is::
static void s_frequency(void *priv, const struct v4l2_frequency *f)
{
...
if (f.type == V4L2_TUNER_RADIO)
v4l2_device_call_all(v4l2_dev, 0, tuner, s_radio);
...
v4l2_device_call_all(v4l2_dev, 0, tuner, s_frequency);
}
π₯ SEE ALSO π₯
Kernel file ./include/media/v4l2-subdev.h β and the whole extended friend group, fr fr:
- 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_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_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)
and that's the whole vibe check, bestie π this page lives in ./include/media, dated October 2026, and it's filed under struct v4l2_...ev_tuner_ops(9) β go off, you ate that πβ¨π¦
π¦ 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