Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > 1a595394b241504ff370a8d12ebfcea7 > files > 3804

kernel-doc-3.11.10-100.fc18.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>ioctl VIDIOC_DBG_G_CHIP_INFO</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API" /><link rel="up" href="user-func.html" title="Appendix&#160;A.&#160;Function Reference" /><link rel="prev" href="vidioc-cropcap.html" title="ioctl VIDIOC_CROPCAP" /><link rel="next" href="vidioc-dbg-g-register.html" title="ioctl VIDIOC_DBG_G_REGISTER, VIDIOC_DBG_S_REGISTER" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ioctl VIDIOC_DBG_G_CHIP_INFO</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="vidioc-cropcap.html">Prev</a>&#160;</td><th width="60%" align="center">Appendix&#160;A.&#160;Function Reference</th><td width="20%" align="right">&#160;<a accesskey="n" href="vidioc-dbg-g-register.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="vidioc-dbg-g-chip-info"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>VIDIOC_DBG_G_CHIP_INFO &#8212; Identify the chips on a TV card</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <strong class="fsfunc">ioctl</strong>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">request</var>, </td></tr><tr><td>&#160;</td><td>struct v4l2_dbg_chip_info
*<var class="pdparam">argp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a id="idm140470012313136"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>fd</code></em></span></dt><dd><p>File descriptor returned by <a class="link" href="func-open.html" title="V4L2 open()"><code class="function">open()</code></a>.</p></dd><dt><span class="term"><em class="parameter"><code>request</code></em></span></dt><dd><p>VIDIOC_DBG_G_CHIP_INFO</p></dd><dt><span class="term"><em class="parameter"><code>argp</code></em></span></dt><dd><p></p></dd></dl></div></div><div class="refsect1"><a id="idm140470012305008"></a><h2>Description</h2><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Experimental</h3><p>This is an <a class="link" href="hist-v4l2.html#experimental" title="Experimental API Elements">experimental</a> interface and may change in
the future.</p></div><p>For driver debugging purposes this ioctl allows test
applications to query the driver about the chips present on the TV
card. Regular applications must not use it. When you found a chip
specific bug, please contact the linux-media mailing list (<a class="ulink" href="http://www.linuxtv.org/lists.php" target="_top">http://www.linuxtv.org/lists.php</a>)
so it can be fixed.</p><p>Additionally the Linux kernel must be compiled with the
<code class="constant">CONFIG_VIDEO_ADV_DEBUG</code> option to enable this ioctl.</p><p>To query the driver applications must initialize the
<em class="structfield"><code>match.type</code></em> and
<em class="structfield"><code>match.addr</code></em> or <em class="structfield"><code>match.name</code></em>
fields of a struct&#160;<a class="link" href="vidioc-dbg-g-chip-info.html#v4l2-dbg-chip-info" title="Table&#160;A.5.&#160;struct v4l2_dbg_chip_info">v4l2_dbg_chip_info</a>
and call <code class="constant">VIDIOC_DBG_G_CHIP_INFO</code> with a pointer to
this structure. On success the driver stores information about the
selected chip in the <em class="structfield"><code>name</code></em> and
<em class="structfield"><code>flags</code></em> fields.</p><p>When <em class="structfield"><code>match.type</code></em> is
<code class="constant">V4L2_CHIP_MATCH_BRIDGE</code>,
<em class="structfield"><code>match.addr</code></em> selects the nth bridge 'chip'
on the TV card. You can enumerate all chips by starting at zero and
incrementing <em class="structfield"><code>match.addr</code></em> by one until
<code class="constant">VIDIOC_DBG_G_CHIP_INFO</code> fails with an <span class="errorcode">EINVAL</span> error code.
The number zero always selects the bridge chip itself, e.&#160;g. the chip
connected to the PCI or USB bus. Non-zero numbers identify specific
parts of the bridge chip such as an AC97 register block.</p><p>When <em class="structfield"><code>match.type</code></em> is
<code class="constant">V4L2_CHIP_MATCH_SUBDEV</code>,
<em class="structfield"><code>match.addr</code></em> selects the nth sub-device. This
allows you to enumerate over all sub-devices.</p><p>On success, the <em class="structfield"><code>name</code></em> field will
contain a chip name and the <em class="structfield"><code>flags</code></em> field will
contain <code class="constant">V4L2_CHIP_FL_READABLE</code> if the driver supports
reading registers from the device or <code class="constant">V4L2_CHIP_FL_WRITABLE</code>
if the driver supports writing registers to the device.</p><p>We recommended the <span class="application">v4l2-dbg</span>
utility over calling this ioctl directly. It is available from the
LinuxTV v4l-dvb repository; see <a class="ulink" href="http://linuxtv.org/repo/" target="_top">http://linuxtv.org/repo/</a> for
access instructions.</p><div class="table"><a id="name-v4l2-dbg-match"></a><p class="title"><strong>Table&#160;A.4.&#160;struct <span class="structname">v4l2_dbg_match</span></strong></p><div class="table-contents"><table summary="struct v4l2_dbg_match" width="100%" border="0"><colgroup><col class="c1" /><col class="c2" /><col class="c3" /><col class="c4" /></colgroup><tbody valign="top"><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>type</code></em></td><td valign="top">See <a class="xref" href="vidioc-dbg-g-chip-info.html#name-chip-match-types" title="Table&#160;A.6.&#160;Chip Match Types">Table&#160;A.6, &#8220;Chip Match Types&#8221;</a> for a list of
possible types.</td><td class="auto-generated">&#160;</td></tr><tr><td valign="top">union</td><td valign="top">(anonymous)</td><td class="auto-generated">&#160;</td><td class="auto-generated">&#160;</td></tr><tr><td valign="top">&#160;</td><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>addr</code></em></td><td valign="top">Match a chip by this number, interpreted according
to the <em class="structfield"><code>type</code></em> field.</td></tr><tr><td valign="top">&#160;</td><td valign="top">char</td><td valign="top"><em class="structfield"><code>name[32]</code></em></td><td valign="top">Match a chip by this name, interpreted according
to the <em class="structfield"><code>type</code></em> field. Currently unused.</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="v4l2-dbg-chip-info"></a><p class="title"><strong>Table&#160;A.5.&#160;struct <span class="structname">v4l2_dbg_chip_info</span></strong></p><div class="table-contents"><table summary="struct v4l2_dbg_chip_info" width="100%" border="0"><colgroup><col class="c1" /><col class="c2" /><col class="c3" /></colgroup><tbody valign="top"><tr><td valign="top">struct v4l2_dbg_match</td><td valign="top"><em class="structfield"><code>match</code></em></td><td valign="top">How to match the chip, see <a class="xref" href="vidioc-dbg-g-chip-info.html#name-v4l2-dbg-match" title="Table&#160;A.4.&#160;struct v4l2_dbg_match">Table&#160;A.4, &#8220;struct <span class="structname">v4l2_dbg_match</span>&#8221;</a>.</td></tr><tr><td valign="top">char</td><td valign="top"><em class="structfield"><code>name[32]</code></em></td><td valign="top">The name of the chip.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>flags</code></em></td><td valign="top">Set by the driver. If <code class="constant">V4L2_CHIP_FL_READABLE</code>
is set, then the driver supports reading registers from the device. If
<code class="constant">V4L2_CHIP_FL_WRITABLE</code> is set, then it supports writing registers.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>reserved[8]</code></em></td><td valign="top">Reserved fields, both application and driver must set these to 0.</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="name-chip-match-types"></a><p class="title"><strong>Table&#160;A.6.&#160;Chip Match Types</strong></p><div class="table-contents"><table summary="Chip Match Types" width="100%" border="0"><colgroup><col class="c1" /><col class="c2" /><col class="c3" /></colgroup><tbody valign="top"><tr><td valign="top"><code class="constant">V4L2_CHIP_MATCH_BRIDGE</code></td><td valign="top">0</td><td valign="top">Match the nth chip on the card, zero for the
	    bridge chip. Does not match sub-devices.</td></tr><tr><td valign="top"><code class="constant">V4L2_CHIP_MATCH_SUBDEV</code></td><td valign="top">4</td><td valign="top">Match the nth sub-device.</td></tr></tbody></table></div></div><br class="table-break" /></div><div class="refsect1"><a id="idm140470012243728"></a><h2>Return Value</h2><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><span class="errorcode">EINVAL</span></span></dt><dd><p>The <em class="structfield"><code>match_type</code></em> is invalid or
no device could be matched.</p></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="vidioc-cropcap.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="user-func.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="vidioc-dbg-g-register.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ioctl VIDIOC_CROPCAP&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;ioctl VIDIOC_DBG_G_REGISTER, VIDIOC_DBG_S_REGISTER</td></tr></table></div></body></html>