1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct dvb_tuner_ops</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="ch06s02.html" title="Digital TV (DVB) devices"><link rel="prev" href="API-enum-dvbfe-search.html" title="enum dvbfe_search"><link rel="next" href="API-struct-analog-demod-info.html" title="struct analog_demod_info"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct dvb_tuner_ops</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-enum-dvbfe-search.html">Prev</a> </td><th width="60%" align="center">Digital TV (DVB) devices</th><td width="20%" align="right"> <a accesskey="n" href="API-struct-analog-demod-info.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-dvb-tuner-ops"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct dvb_tuner_ops — 2 Tuner information and callbacks 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct dvb_tuner_ops { 5 struct dvb_tuner_info info; 6 int (* release) (struct dvb_frontend *fe); 7 int (* init) (struct dvb_frontend *fe); 8 int (* sleep) (struct dvb_frontend *fe); 9 int (* suspend) (struct dvb_frontend *fe); 10 int (* resume) (struct dvb_frontend *fe); 11 int (* set_params) (struct dvb_frontend *fe); 12 int (* set_analog_params) (struct dvb_frontend *fe, struct analog_parameters *p); 13 int (* calc_regs) (struct dvb_frontend *fe, u8 *buf, int buf_len); 14 int (* set_config) (struct dvb_frontend *fe, void *priv_cfg); 15 int (* get_frequency) (struct dvb_frontend *fe, u32 *frequency); 16 int (* get_bandwidth) (struct dvb_frontend *fe, u32 *bandwidth); 17 int (* get_if_frequency) (struct dvb_frontend *fe, u32 *frequency); 18#define TUNER_STATUS_LOCKED 1 19#define TUNER_STATUS_STEREO 2 20 int (* get_status) (struct dvb_frontend *fe, u32 *status); 21 int (* get_rf_strength) (struct dvb_frontend *fe, u16 *strength); 22 int (* get_afc) (struct dvb_frontend *fe, s32 *afc); 23 int (* set_frequency) (struct dvb_frontend *fe, u32 frequency); 24 int (* set_bandwidth) (struct dvb_frontend *fe, u32 bandwidth); 25 int (* set_state) (struct dvb_frontend *fe, enum tuner_param param, struct tuner_state *state); 26 int (* get_state) (struct dvb_frontend *fe, enum tuner_param param, struct tuner_state *state); 27}; </pre></div><div class="refsect1"><a name="id-1.8.3.13.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">info</span></dt><dd><p> 28 embedded struct dvb_tuner_info with tuner properties 29 </p></dd><dt><span class="term">release</span></dt><dd><p> 30 callback function called when frontend is dettached. 31 drivers should free any allocated memory. 32 </p></dd><dt><span class="term">init</span></dt><dd><p> 33 callback function used to initialize the tuner device. 34 </p></dd><dt><span class="term">sleep</span></dt><dd><p> 35 callback function used to put the tuner to sleep. 36 </p></dd><dt><span class="term">suspend</span></dt><dd><p> 37 callback function used to inform that the Kernel will 38 suspend. 39 </p></dd><dt><span class="term">resume</span></dt><dd><p> 40 callback function used to inform that the Kernel is 41 resuming from suspend. 42 </p></dd><dt><span class="term">set_params</span></dt><dd><p> 43 callback function used to inform the tuner to tune 44 into a digital TV channel. The properties to be used 45 are stored at <em class="parameter"><code>dvb_frontend</code></em>.dtv_property_cache;. The 46 tuner demod can change the parameters to reflect the 47 changes needed for the channel to be tuned, and 48 update statistics. 49 </p></dd><dt><span class="term">set_analog_params</span></dt><dd><p> 50 callback function used to tune into an analog TV 51 channel on hybrid tuners. It passes <em class="parameter"><code>analog_parameters</code></em>; 52 to the driver. 53 </p></dd><dt><span class="term">calc_regs</span></dt><dd><p> 54 callback function used to pass register data settings 55 for simple tuners. 56 </p></dd><dt><span class="term">set_config</span></dt><dd><p> 57 callback function used to send some tuner-specific 58 parameters. 59 </p></dd><dt><span class="term">get_frequency</span></dt><dd><p> 60 get the actual tuned frequency 61 </p></dd><dt><span class="term">get_bandwidth</span></dt><dd><p> 62 get the bandwitdh used by the low pass filters 63 </p></dd><dt><span class="term">get_if_frequency</span></dt><dd><p> 64 get the Intermediate Frequency, in Hz. For baseband, 65 should return 0. 66 </p></dd><dt><span class="term">get_status</span></dt><dd><p> 67 returns the frontend lock status 68 </p></dd><dt><span class="term">get_rf_strength</span></dt><dd><p> 69 returns the RF signal strengh. Used mostly to support 70 analog TV and radio. Digital TV should report, instead, 71 via DVBv5 API (<em class="parameter"><code>dvb_frontend</code></em>.dtv_property_cache;). 72 </p></dd><dt><span class="term">get_afc</span></dt><dd><p> 73 Used only by analog TV core. Reports the frequency 74 drift due to AFC. 75 </p></dd><dt><span class="term">set_frequency</span></dt><dd><p> 76 Set a new frequency. Please notice that using 77 set_params is preferred. 78 </p></dd><dt><span class="term">set_bandwidth</span></dt><dd><p> 79 Set a new frequency. Please notice that using 80 set_params is preferred. 81 </p></dd><dt><span class="term">set_state</span></dt><dd><p> 82 callback function used on some legacy drivers that 83 don't implement set_params in order to set properties. 84 Shouldn't be used on new drivers. 85 </p></dd><dt><span class="term">get_state</span></dt><dd><p> 86 callback function used to get properties by some 87 legacy drivers that don't implement set_params. 88 Shouldn't be used on new drivers. 89 </p></dd></dl></div></div><div class="refsect1"><a name="id-1.8.3.13.6"></a><h2>NOTE</h2><p> 90 frequencies used on get_frequency and set_frequency are in Hz for 91 terrestrial/cable or kHz for satellite. 92</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-enum-dvbfe-search.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch06s02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-struct-analog-demod-info.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">enum dvbfe_search</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">struct analog_demod_info</span></td></tr></table></div></body></html> 93