STRUCT DVB_TUNER_OPS(9)
β¨ struct dvb_tuner_ops(9) β¨
okay so bestie, we're deep in the Kernel API Manual today and this one is literally the whole personality file for a tuner π it's the info + the callbacks, all in one struct, and yes you're gonna want to read all of it, no skipping π«Ά
πΈ SYNOPSIS πΈ
like, here's the whole vibe, verbatim, don't touch anything:
struct dvb_tuner_ops {
struct dvb_tuner_info info;
void (*release)(struct dvb_frontend *fe);
int (*init)(struct dvb_frontend *fe);
int (*sleep)(struct dvb_frontend *fe);
int (*suspend)(struct dvb_frontend *fe);
int (*resume)(struct dvb_frontend *fe);
int (*set_params)(struct dvb_frontend *fe);
int (*set_analog_params)(struct dvb_frontend *fe, struct
analog_parameters *p);
int (*set_config)(struct dvb_frontend *fe, void *priv_cfg);
int (*get_frequency)(struct dvb_frontend *fe, u32 *frequency);
int (*get_bandwidth)(struct dvb_frontend *fe, u32 *bandwidth);
int (*get_if_frequency)(struct dvb_frontend *fe, u32 *frequency);
#define TUNER_STATUS_LOCKED 1;
#define TUNER_STATUS_STEREO 2;
int (*get_status)(struct dvb_frontend *fe, u32 *status);
int (*get_rf_strength)(struct dvb_frontend *fe, u16 *strength);
int (*get_afc)(struct dvb_frontend *fe, s32 *afc);
int (*calc_regs)(struct dvb_frontend *fe, u8 *buf, int buf_len);
int (*set_frequency)(struct dvb_frontend *fe, u32 frequency);
int (*set_bandwidth)(struct dvb_frontend *fe, u32 bandwidth);
};
π Members π
infoβ an embeddedstruct dvb_tuner_infoholding the tuner's properties. it's giving "ID card but for a tuner" πͺͺreleaseβ callback fired when the frontend gets detached. drivers, pls free any memory you allocated, that's the whole assignment, no cap πinitβ callback used to initialize the tuner device, the little glow-up before it does anything β¨sleepβ callback that puts the tuner to sleep π΄ nap time frsuspendβ callback to let you know the Kernel is about to suspendresumeβ callback to let you know the Kernel is coming back from suspend, welcome back bestie π¦set_paramsβ callback that tells the tuner to tune into a digital TV channel. the properties it uses live atstruct dvb_frontend.dtv_property_cache. the tuner demod can change the parameters to reflect the changes needed for the channel to be tuned, and update statistics. this is the recommended way to set the tuner parameters and should be used on newer drivers π lowkey the main character of this structset_analog_paramsβ callback used to tune into an analog TV channel on hybrid tuners. it passesanalog_parametersto the driver πset_configβ callback used to send some tuner-specific parameters π¨get_frequencyβ get the actual tuned frequency π»get_bandwidthβ get the bandwidth used by the low pass filters πget_if_frequencyβ get the Intermediate Frequency, in Hz. for baseband, it should return0. zero. nada. β¨get_statusβ returns the frontend lock status π (and hey, remember the defines up top:TUNER_STATUS_LOCKEDis1;andTUNER_STATUS_STEREOis2;)get_rf_strengthβ returns the RF signal strength. used mostly to support analog TV and radio. digital TV should report, instead, via the DVBv5 API (struct dvb_frontend.dtv_property_cache). so like, don't do the wrong thing bestie πget_afcβ used only by the analog TV core. reports the frequency drift due to AFC π«Άcalc_regsβ callback used to pass register data settings for simple tuners. shouldn't be used on newer drivers πset_frequencyβ set a new frequency. shouldn't be used on newer drivers πset_bandwidthβ set a new frequency. shouldn't be used on newer drivers π
yes,set_frequencyandset_bandwidthboth say "Set a new frequency" in the original. that's not me being lazy, that's just what it says. iconic of them honestly π
π NOTE π
the frequencies used on get_frequency and set_frequency are in Hz for terrestrial/cable, or kHz for satellite. units matter, bestie, do not mix them up or you will be debugging all night π
π SEE ALSO π
go read the Kernel file ./include/media/dvb_frontend.h struct, plus all of these cuties:
dvb_frontend_tune_settings(9)struct dvb_tuner_info(9)struct analog_parameters(9)enum dvbfe_algo(9)enum dvbfe_search(9)struct analog_demod_info(9)struct analog_demod_ops(9)struct dvb_frontend_internal_info(9)struct dvb_frontend_ops(9)struct dtv_frontend_properties(9)struct dvb_frontend(9)dvb_register_frontend(9)dvb_unregister_frontend(9)dvb_frontend_detach(9)dvb_frontend_suspend(9)dvb_frontend_resume(9)dvb_frontend_reinitialise(9)dvb_frontend_sleep_until(9)
that's the whole page bestie, go forth and tune responsibly π β¨
signed, sealed, delivered from ./include/media β dated October 2026 β and yes this is the struct dvb_tuner_ops(9) page, mwah π
π¦ 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