1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct tuner_setup</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="mediadev.html#id-1.8.2" title="Video2Linux devices"><link rel="prev" href="API-enum-tuner-mode.html" title="enum tuner_mode"><link rel="next" href="API-enum-param-type.html" title="enum param_type"></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 tuner_setup</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-enum-tuner-mode.html">Prev</a> </td><th width="60%" align="center">Video2Linux devices</th><td width="20%" align="right"> <a accesskey="n" href="API-enum-param-type.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-tuner-setup"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct tuner_setup — 
2     setup the tuner chipsets
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct tuner_setup {
5  unsigned short addr;
6  unsigned int type;
7  unsigned int mode_mask;
8  void * config;
9  int (* tuner_callback) (void *dev, int component, int cmd, int arg);
10};  </pre></div><div class="refsect1"><a name="id-1.8.2.3.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">addr</span></dt><dd><p>
11   I2C address used to control the tuner device/chipset
12      </p></dd><dt><span class="term">type</span></dt><dd><p>
13   Type of the tuner, as defined at the TUNER_* macros.
14   Each different tuner model should have an unique
15   identifier.
16      </p></dd><dt><span class="term">mode_mask</span></dt><dd><p>
17   Mask with the allowed tuner modes: V4L2_TUNER_RADIO,
18   V4L2_TUNER_ANALOG_TV and/or V4L2_TUNER_DIGITAL_TV,
19   describing if the tuner should be used to support
20   Radio, analog TV and/or digital TV.
21      </p></dd><dt><span class="term">config</span></dt><dd><p>
22   Used to send tuner-specific configuration for complex
23   tuners that require extra parameters to be set.
24   Only a very few tuners require it and its usage on
25   newer tuners should be avoided.
26      </p></dd><dt><span class="term">tuner_callback</span></dt><dd><p>
27   Some tuners require to call back the bridge driver,
28   in order to do some tasks like rising a GPIO at the
29   bridge chipset, in order to do things like resetting
30   the device.
31      </p></dd></dl></div></div><div class="refsect1"><a name="id-1.8.2.3.6"></a><h2>Description</h2><p>
32   Older boards only had a single tuner device. Nowadays multiple tuner
33   devices may be present on a single board. Using TUNER_SET_TYPE_ADDR
34   to pass the tuner_setup structure it is possible to setup each tuner
35   device in turn.
36   </p><p>
37
38   Since multiple devices may be present it is no longer sufficient to
39   send a command to a single i2c device. Instead you should broadcast
40   the command to all i2c devices.
41   </p><p>
42
43   By setting the mode_mask correctly you can select which commands are
44   accepted by a specific tuner device. For example, set mode_mask to
45   T_RADIO if the device is a radio-only tuner. That specific tuner will
46   only accept commands when the tuner is in radio mode and ignore them
47   when the tuner is set to TV mode.
48</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-tuner-mode.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mediadev.html#id-1.8.2">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-enum-param-type.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">enum tuner_mode</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">enum param_type</span></td></tr></table></div></body></html>
49