diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-21 09:03:10 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-21 09:03:10 -0700 |
commit | c720f5655df159a630fa0290a0bd67c93e92b0bf (patch) | |
tree | 940d139d0ec1ff5201efddef6cc663166a8a2df3 /Documentation/DocBook/v4l/vidioc-dbg-g-chip-ident.xml | |
parent | 33e6c1a0de818d3698cdab27c42915661011319d (diff) | |
parent | 84d6ae431f315e8973aac3c3fe1d550fc9240ef3 (diff) | |
download | op-kernel-dev-c720f5655df159a630fa0290a0bd67c93e92b0bf.zip op-kernel-dev-c720f5655df159a630fa0290a0bd67c93e92b0bf.tar.gz |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (222 commits)
V4L/DVB (13033): pt1: Don't use a deprecated DMA_BIT_MASK macro
V4L/DVB (13029): radio-si4713: remove #include <linux/version.h>
V4L/DVB (13027): go7007: convert printks to v4l2_info
V4L/DVB (13026): s2250-board: Implement brightness and contrast controls
V4L/DVB (13025): s2250-board: Fix memory leaks
V4L/DVB (13024): go7007: Implement vidioc_g_std and vidioc_querystd
V4L/DVB (13023): go7007: Merge struct gofh and go declarations
V4L/DVB (13022): go7007: Fix mpeg controls
V4L/DVB (13021): go7007: Fix whitespace and line lengths
V4L/DVB (13020): go7007: Updates to Kconfig and Makefile
V4L/DVB (13019): video: initial support for ADV7180
V4L/DVB (13018): kzalloc failure ignored in au8522_probe()
V4L/DVB (13017): gspca: kmalloc failure ignored in sd_start()
V4L/DVB (13016): kmalloc failure ignored in lgdt3304_attach() and s921_attach()
V4L/DVB (13015): kmalloc failure ignored in m920x_firmware_download()
V4L/DVB (13014): Add support for Compro VideoMate E800 (DVB-T part only)
V4L/DVB (13013): FM TX: si4713: Kconfig: Fixed two typos.
V4L/DVB (13012): uvc: introduce missing kfree
V4L/DVB (13011): Change tuner type of BeholdTV cards
V4L/DVB (13009): gspca - stv06xx-hdcs: Reduce exposure range
...
Diffstat (limited to 'Documentation/DocBook/v4l/vidioc-dbg-g-chip-ident.xml')
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-dbg-g-chip-ident.xml | 275 |
1 files changed, 275 insertions, 0 deletions
diff --git a/Documentation/DocBook/v4l/vidioc-dbg-g-chip-ident.xml b/Documentation/DocBook/v4l/vidioc-dbg-g-chip-ident.xml new file mode 100644 index 0000000..4a09e20 --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-dbg-g-chip-ident.xml @@ -0,0 +1,275 @@ +<refentry id="vidioc-dbg-g-chip-ident"> + <refmeta> + <refentrytitle>ioctl VIDIOC_DBG_G_CHIP_IDENT</refentrytitle> + &manvol; + </refmeta> + + <refnamediv> + <refname>VIDIOC_DBG_G_CHIP_IDENT</refname> + <refpurpose>Identify the chips on a TV card</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>ioctl</function></funcdef> + <paramdef>int <parameter>fd</parameter></paramdef> + <paramdef>int <parameter>request</parameter></paramdef> + <paramdef>struct v4l2_dbg_chip_ident +*<parameter>argp</parameter></paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1> + <title>Arguments</title> + + <variablelist> + <varlistentry> + <term><parameter>fd</parameter></term> + <listitem> + <para>&fd;</para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>request</parameter></term> + <listitem> + <para>VIDIOC_DBG_G_CHIP_IDENT</para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>argp</parameter></term> + <listitem> + <para></para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + + <refsect1> + <title>Description</title> + + <note> + <title>Experimental</title> + + <para>This is an <link +linkend="experimental">experimental</link> interface and may change in +the future.</para> + </note> + + <para>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 (&v4l-ml;) +so it can be fixed.</para> + + <para>To query the driver applications must initialize the +<structfield>match.type</structfield> and +<structfield>match.addr</structfield> or <structfield>match.name</structfield> +fields of a &v4l2-dbg-chip-ident; +and call <constant>VIDIOC_DBG_G_CHIP_IDENT</constant> with a pointer to +this structure. On success the driver stores information about the +selected chip in the <structfield>ident</structfield> and +<structfield>revision</structfield> fields. On failure the structure +remains unchanged.</para> + + <para>When <structfield>match.type</structfield> is +<constant>V4L2_CHIP_MATCH_HOST</constant>, +<structfield>match.addr</structfield> selects the nth non-&i2c; chip +on the TV card. You can enumerate all chips by starting at zero and +incrementing <structfield>match.addr</structfield> by one until +<constant>VIDIOC_DBG_G_CHIP_IDENT</constant> fails with an &EINVAL;. +The number zero always selects the host chip, ⪚ the chip connected +to the PCI or USB bus.</para> + + <para>When <structfield>match.type</structfield> is +<constant>V4L2_CHIP_MATCH_I2C_DRIVER</constant>, +<structfield>match.name</structfield> contains the I2C driver name. +For instance +<constant>"saa7127"</constant> will match any chip +supported by the saa7127 driver, regardless of its &i2c; bus address. +When multiple chips supported by the same driver are present, the +ioctl will return <constant>V4L2_IDENT_AMBIGUOUS</constant> in the +<structfield>ident</structfield> field.</para> + + <para>When <structfield>match.type</structfield> is +<constant>V4L2_CHIP_MATCH_I2C_ADDR</constant>, +<structfield>match.addr</structfield> selects a chip by its 7 bit +&i2c; bus address.</para> + + <para>When <structfield>match.type</structfield> is +<constant>V4L2_CHIP_MATCH_AC97</constant>, +<structfield>match.addr</structfield> selects the nth AC97 chip +on the TV card. You can enumerate all chips by starting at zero and +incrementing <structfield>match.addr</structfield> by one until +<constant>VIDIOC_DBG_G_CHIP_IDENT</constant> fails with an &EINVAL;.</para> + + <para>On success, the <structfield>ident</structfield> field will +contain a chip ID from the Linux +<filename>media/v4l2-chip-ident.h</filename> header file, and the +<structfield>revision</structfield> field will contain a driver +specific value, or zero if no particular revision is associated with +this chip.</para> + + <para>When the driver could not identify the selected chip, +<structfield>ident</structfield> will contain +<constant>V4L2_IDENT_UNKNOWN</constant>. When no chip matched +the ioctl will succeed but the +<structfield>ident</structfield> field will contain +<constant>V4L2_IDENT_NONE</constant>. If multiple chips matched, +<structfield>ident</structfield> will contain +<constant>V4L2_IDENT_AMBIGUOUS</constant>. In all these cases the +<structfield>revision</structfield> field remains unchanged.</para> + + <para>This ioctl is optional, not all drivers may support it. It +was introduced in Linux 2.6.21, but the API was changed to the +one described here in 2.6.29.</para> + + <para>We recommended the <application>v4l2-dbg</application> +utility over calling this ioctl directly. It is available from the +LinuxTV v4l-dvb repository; see <ulink +url="http://linuxtv.org/repo/">http://linuxtv.org/repo/</ulink> for +access instructions.</para> + + <!-- Note for convenience vidioc-dbg-g-register.sgml + contains a duplicate of this table. --> + <table pgwide="1" frame="none" id="ident-v4l2-dbg-match"> + <title>struct <structname>v4l2_dbg_match</structname></title> + <tgroup cols="4"> + &cs-ustr; + <tbody valign="top"> + <row> + <entry>__u32</entry> + <entry><structfield>type</structfield></entry> + <entry>See <xref linkend="ident-chip-match-types" /> for a list of +possible types.</entry> + </row> + <row> + <entry>union</entry> + <entry>(anonymous)</entry> + </row> + <row> + <entry></entry> + <entry>__u32</entry> + <entry><structfield>addr</structfield></entry> + <entry>Match a chip by this number, interpreted according +to the <structfield>type</structfield> field.</entry> + </row> + <row> + <entry></entry> + <entry>char</entry> + <entry><structfield>name[32]</structfield></entry> + <entry>Match a chip by this name, interpreted according +to the <structfield>type</structfield> field.</entry> + </row> + </tbody> + </tgroup> + </table> + + <table pgwide="1" frame="none" id="v4l2-dbg-chip-ident"> + <title>struct <structname>v4l2_dbg_chip_ident</structname></title> + <tgroup cols="3"> + &cs-str; + <tbody valign="top"> + <row> + <entry>struct v4l2_dbg_match</entry> + <entry><structfield>match</structfield></entry> + <entry>How to match the chip, see <xref linkend="ident-v4l2-dbg-match" />.</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>ident</structfield></entry> + <entry>A chip identifier as defined in the Linux +<filename>media/v4l2-chip-ident.h</filename> header file, or one of +the values from <xref linkend="chip-ids" />.</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>revision</structfield></entry> + <entry>A chip revision, chip and driver specific.</entry> + </row> + </tbody> + </tgroup> + </table> + + <!-- Note for convenience vidioc-dbg-g-register.sgml + contains a duplicate of this table. --> + <table pgwide="1" frame="none" id="ident-chip-match-types"> + <title>Chip Match Types</title> + <tgroup cols="3"> + &cs-def; + <tbody valign="top"> + <row> + <entry><constant>V4L2_CHIP_MATCH_HOST</constant></entry> + <entry>0</entry> + <entry>Match the nth chip on the card, zero for the + host chip. Does not match &i2c; chips.</entry> + </row> + <row> + <entry><constant>V4L2_CHIP_MATCH_I2C_DRIVER</constant></entry> + <entry>1</entry> + <entry>Match an &i2c; chip by its driver name.</entry> + </row> + <row> + <entry><constant>V4L2_CHIP_MATCH_I2C_ADDR</constant></entry> + <entry>2</entry> + <entry>Match a chip by its 7 bit &i2c; bus address.</entry> + </row> + <row> + <entry><constant>V4L2_CHIP_MATCH_AC97</constant></entry> + <entry>3</entry> + <entry>Match the nth anciliary AC97 chip.</entry> + </row> + </tbody> + </tgroup> + </table> + + <!-- This is an anonymous enum in media/v4l2-chip-ident.h. --> + <table pgwide="1" frame="none" id="chip-ids"> + <title>Chip Identifiers</title> + <tgroup cols="3"> + &cs-def; + <tbody valign="top"> + <row> + <entry><constant>V4L2_IDENT_NONE</constant></entry> + <entry>0</entry> + <entry>No chip matched.</entry> + </row> + <row> + <entry><constant>V4L2_IDENT_AMBIGUOUS</constant></entry> + <entry>1</entry> + <entry>Multiple chips matched.</entry> + </row> + <row> + <entry><constant>V4L2_IDENT_UNKNOWN</constant></entry> + <entry>2</entry> + <entry>A chip is present at this address, but the driver +could not identify it.</entry> + </row> + </tbody> + </tgroup> + </table> + </refsect1> + + <refsect1> + &return-value; + + <variablelist> + <varlistentry> + <term><errorcode>EINVAL</errorcode></term> + <listitem> + <para>The driver does not support this ioctl, or the +<structfield>match_type</structfield> is invalid.</para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> +</refentry> + +<!-- +Local Variables: +mode: sgml +sgml-parent-document: "v4l2.sgml" +indent-tabs-mode: nil +End: +--> |