<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>SyntekUSBVideoCamera: stk11xx-v4l.c File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> </div> <div class="contents"> <h1>stk11xx-v4l.c File Reference</h1>Driver for Syntek USB video camera. <a href="#_details">More...</a> <p> <code>#include <linux/module.h></code><br> <code>#include <linux/init.h></code><br> <code>#include <linux/kernel.h></code><br> <code>#include <linux/version.h></code><br> <code>#include <linux/errno.h></code><br> <code>#include <linux/slab.h></code><br> <code>#include <linux/kref.h></code><br> <code>#include <linux/vmalloc.h></code><br> <code>#include <linux/mm.h></code><br> <code>#include <linux/videodev.h></code><br> <code>#include <linux/usb.h></code><br> <code>#include <media/v4l2-common.h></code><br> <code>#include <media/v4l2-ioctl.h></code><br> <code>#include "<a class="el" href="stk11xx_8h_source.html">stk11xx.h</a>"</code><br> <p> <a href="stk11xx-v4l_8c_source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="stk11xx-v4l_8c.html#627028fbe327bdeb1589d74109e9ae77">v4l_stk11xx_select_video_mode</a> (struct usb_stk11xx *dev, int width, int height)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Select a video mode. <a href="#627028fbe327bdeb1589d74109e9ae77"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="stk11xx-v4l_8c.html#a2127105dfc03d43fd4ce48f8e0417ac">v4l_stk11xx_open</a> (struct file *fp)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Open the video device. <a href="#a2127105dfc03d43fd4ce48f8e0417ac"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="stk11xx-v4l_8c.html#d19987ae823d30d119e857b2719a74f2">v4l_stk11xx_release</a> (struct file *fp)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Release an opened file. <a href="#d19987ae823d30d119e857b2719a74f2"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="stk11xx-v4l_8c.html#e125a26fc4f36a4b64418acb87b958a4">v4l_stk11xx_read</a> (struct file *fp, char __user *buf, size_t count, loff_t *f_pos)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Read the video device. <a href="#e125a26fc4f36a4b64418acb87b958a4"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="stk11xx-v4l_8c.html#159e3f9cb0b7adb3d1b9e64298d2b42b">v4l_stk11xx_poll</a> (struct file *fp, poll_table *wait)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Polling function. <a href="#159e3f9cb0b7adb3d1b9e64298d2b42b"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="stk11xx-v4l_8c.html#1baaafe560fe7466c7062aacd02aff8c">v4l_stk11xx_mmap</a> (struct file *fp, struct vm_area_struct *vma)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Memory map. <a href="#1baaafe560fe7466c7062aacd02aff8c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static long </td><td class="memItemRight" valign="bottom"><a class="el" href="stk11xx-v4l_8c.html#d0d6bb014a12b34811e18f02002b3c81">v4l_stk11xx_do_ioctl</a> (struct file *fp, unsigned int cmd, void __user *arg)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Manage IOCTL. <a href="#d0d6bb014a12b34811e18f02002b3c81"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static long </td><td class="memItemRight" valign="bottom"><a class="el" href="stk11xx-v4l_8c.html#b8d6ae85407574b48fd686fe75c74e97">v4l_stk11xx_ioctl</a> (struct file *fp, unsigned int cmd, unsigned long arg)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Manage IOCTL. <a href="#b8d6ae85407574b48fd686fe75c74e97"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="stk11xx-v4l_8c.html#5fb1deffc636cce6dffc8b5e971e6115">v4l_stk11xx_register_video_device</a> (struct usb_stk11xx *dev)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Register the video device. <a href="#5fb1deffc636cce6dffc8b5e971e6115"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="stk11xx-v4l_8c.html#62bc2469df7a6e1d2fe8c455012bd9ad">v4l_stk11xx_unregister_video_device</a> (struct usb_stk11xx *dev)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Unregister the video device. <a href="#62bc2469df7a6e1d2fe8c455012bd9ad"></a><br></td></tr> <tr><td colspan="2"><br><h2>Variables</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static struct v4l2_file_operations </td><td class="memItemRight" valign="bottom"><a class="el" href="stk11xx-v4l_8c.html#00a41f99999840e48ab4ae826e53b569">v4l_stk11xx_fops</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct stk11xx_coord </td><td class="memItemRight" valign="bottom"><a class="el" href="stk11xx-v4l_8c.html#4977da08718c28052dab2096023754e2">stk11xx_image_sizes</a> [STK11XX_NBR_SIZES]</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static struct v4l2_queryctrl </td><td class="memItemRight" valign="bottom"><a class="el" href="stk11xx-v4l_8c.html#3aef683028a48feea4df78904b903e81">stk11xx_controls</a> []</td></tr> </table> <hr><h2>Detailed Description</h2> Driver for Syntek USB video camera. <p> <dl class="author" compact><dt><b>Author:</b></dt><dd>Nicolas VIVIEN </dd></dl> <dl class="date" compact><dt><b>Date:</b></dt><dd>2006-10-23 </dd></dl> <dl class="version" compact><dt><b>Version:</b></dt><dd>v2.0.x</dd></dl> <dl class="note" compact><dt><b>Note:</b></dt><dd>Copyright (C) Nicolas VIVIEN</dd></dl> <dl class="user" compact><dt><b>Licences</b></dt><dd></dd></dl> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.<p> This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.<p> You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA<p> <dl class="user" compact><dt><b>SubVersion</b></dt><dd></dd></dl> <dl class="rcs" compact><dt><b>Date</b></dt><dd>2009-05-08 12:24:08 +0200 (ven 08 mai 2009) </dd></dl> <dl class="rcs" compact><dt><b>Revision</b></dt><dd>86 </dd></dl> <dl class="rcs" compact><dt><b>Author</b></dt><dd>nicklas79 </dd></dl> <dl class="rcs" compact><dt><b>HeadURL</b></dt><dd><a href="https://syntekdriver.svn.sourceforge.net/svnroot/syntekdriver/tags/2.1.0/stk11xx-v4l.c">https://syntekdriver.svn.sourceforge.net/svnroot/syntekdriver/tags/2.1.0/stk11xx-v4l.c</a> </dd></dl> <p>Definition in file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <hr><h2>Function Documentation</h2> <a class="anchor" name="d0d6bb014a12b34811e18f02002b3c81"></a><!-- doxytag: member="stk11xx-v4l.c::v4l_stk11xx_do_ioctl" ref="d0d6bb014a12b34811e18f02002b3c81" args="(struct file *fp, unsigned int cmd, void __user *arg)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static long v4l_stk11xx_do_ioctl </td> <td>(</td> <td class="paramtype">struct file * </td> <td class="paramname"> <em>fp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>cmd</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void __user * </td> <td class="paramname"> <em>arg</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Manage IOCTL. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>fp</em> </td><td>File pointer </td></tr> <tr><td valign="top"></td><td valign="top"><em>cmd</em> </td><td>Command </td></tr> <tr><td valign="top"></td><td valign="top"><em>arg</em> </td><td>Arguments of the command</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if all is OK</dd></dl> This function permits to manage all the IOCTL from the application. <p>Definition at line <a class="el" href="stk11xx-v4l_8c_source.html#l00612">612</a> of file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <p>References <a class="el" href="stk11xx-dev_8c_source.html#l00287">dev_stk11xx_camera_asleep()</a>, <a class="el" href="stk11xx-dev_8c_source.html#l00264">dev_stk11xx_camera_off()</a>, <a class="el" href="stk11xx-dev_8c_source.html#l00241">dev_stk11xx_camera_on()</a>, <a class="el" href="stk11xx-dev_8c_source.html#l00342">dev_stk11xx_camera_settings()</a>, <a class="el" href="stk11xx-dev_8c_source.html#l00115">dev_stk11xx_init_camera()</a>, <a class="el" href="stk11xx-dev_8c_source.html#l00552">dev_stk11xx_reconf_camera()</a>, <a class="el" href="stk11xx-dev_8c_source.html#l00501">dev_stk11xx_start_stream()</a>, <a class="el" href="stk11xx-dev_8c_source.html#l00604">dev_stk11xx_stop_stream()</a>, <a class="el" href="stk11xx_8h_source.html#l00040">DRIVER_VERSION_NUM</a>, <a class="el" href="stk11xx-buf_8c_source.html#l00270">stk11xx_clear_buffers()</a>, <a class="el" href="stk11xx-v4l_8c_source.html#l00077">stk11xx_controls</a>, <a class="el" href="stk11xx-buf_8c_source.html#l00407">stk11xx_handle_frame()</a>, <a class="el" href="stk11xx-v4l_8c_source.html#l00060">stk11xx_image_sizes</a>, <a class="el" href="stk11xx-buf_8c_source.html#l00334">stk11xx_next_image()</a>, <a class="el" href="stk11xx_8h_source.html#l00198">STK11XX_SXGA</a>, <a class="el" href="stk11xx_8h_source.html#l00197">STK11XX_VGA</a>, <a class="el" href="stk11xx_8h_source.html#l00149">STK_DEBUG</a>, <a class="el" href="stk11xx_8h_source.html#l00147">STK_ERROR</a>, <a class="el" href="stk11xx-usb_8c_source.html#l00431">usb_stk11xx_isoc_cleanup()</a>, <a class="el" href="stk11xx-usb_8c_source.html#l00124">usb_stk11xx_isoc_init()</a>, and <a class="el" href="stk11xx-v4l_8c_source.html#l00128">v4l_stk11xx_select_video_mode()</a>.</p> <p>Referenced by <a class="el" href="stk11xx-v4l_8c_source.html#l01642">v4l_stk11xx_ioctl()</a>.</p> </div> </div><p> <a class="anchor" name="b8d6ae85407574b48fd686fe75c74e97"></a><!-- doxytag: member="stk11xx-v4l.c::v4l_stk11xx_ioctl" ref="b8d6ae85407574b48fd686fe75c74e97" args="(struct file *fp, unsigned int cmd, unsigned long arg)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static long v4l_stk11xx_ioctl </td> <td>(</td> <td class="paramtype">struct file * </td> <td class="paramname"> <em>fp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>cmd</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned long </td> <td class="paramname"> <em>arg</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Manage IOCTL. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>fp</em> </td><td>File pointer </td></tr> <tr><td valign="top"></td><td valign="top"><em>cmd</em> </td><td>Command </td></tr> <tr><td valign="top"></td><td valign="top"><em>arg</em> </td><td>Arguements of the command</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if all is OK</dd></dl> This function permits to manage all the IOCTL from the application. <p>Definition at line <a class="el" href="stk11xx-v4l_8c_source.html#l01642">1642</a> of file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <p>References <a class="el" href="stk11xx_8h_source.html#l00149">STK_DEBUG</a>, and <a class="el" href="stk11xx-v4l_8c_source.html#l00612">v4l_stk11xx_do_ioctl()</a>.</p> </div> </div><p> <a class="anchor" name="1baaafe560fe7466c7062aacd02aff8c"></a><!-- doxytag: member="stk11xx-v4l.c::v4l_stk11xx_mmap" ref="1baaafe560fe7466c7062aacd02aff8c" args="(struct file *fp, struct vm_area_struct *vma)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static int v4l_stk11xx_mmap </td> <td>(</td> <td class="paramtype">struct file * </td> <td class="paramname"> <em>fp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct vm_area_struct * </td> <td class="paramname"> <em>vma</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Memory map. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>fp</em> </td><td>File pointer </td></tr> <tr><td valign="top"></td><td valign="top"><em>vma</em> </td><td>VMA structure</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if all is OK</dd></dl> This function permits to map a memory space. <p>Definition at line <a class="el" href="stk11xx-v4l_8c_source.html#l00528">528</a> of file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <p>References <a class="el" href="stk11xx_8h_source.html#l00096">STK11XX_MAX_IMAGES</a>, <a class="el" href="stk11xx_8h_source.html#l00147">STK_ERROR</a>, and <a class="el" href="stk11xx_8h_source.html#l00172">STK_STREAM</a>.</p> </div> </div><p> <a class="anchor" name="a2127105dfc03d43fd4ce48f8e0417ac"></a><!-- doxytag: member="stk11xx-v4l.c::v4l_stk11xx_open" ref="a2127105dfc03d43fd4ce48f8e0417ac" args="(struct file *fp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static int v4l_stk11xx_open </td> <td>(</td> <td class="paramtype">struct file * </td> <td class="paramname"> <em>fp</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Open the video device. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>fp</em> </td><td>File pointer</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if all is OK</dd></dl> This function permits to open a video device (/dev/videoX) <p>Definition at line <a class="el" href="stk11xx-v4l_8c_source.html#l00255">255</a> of file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <p>References <a class="el" href="stk11xx-dev_8c_source.html#l00241">dev_stk11xx_camera_on()</a>, <a class="el" href="stk11xx-dev_8c_source.html#l00342">dev_stk11xx_camera_settings()</a>, <a class="el" href="stk11xx-dev_8c_source.html#l00115">dev_stk11xx_init_camera()</a>, <a class="el" href="stk11xx-dev_8c_source.html#l00552">dev_stk11xx_reconf_camera()</a>, <a class="el" href="stk11xx-dev_8c_source.html#l00501">dev_stk11xx_start_stream()</a>, <a class="el" href="stk11xx-buf_8c_source.html#l00128">stk11xx_allocate_buffers()</a>, <a class="el" href="stk11xx-buf_8c_source.html#l00287">stk11xx_free_buffers()</a>, <a class="el" href="stk11xx-buf_8c_source.html#l00221">stk11xx_reset_buffers()</a>, <a class="el" href="stk11xx_8h_source.html#l00149">STK_DEBUG</a>, <a class="el" href="stk11xx_8h_source.html#l00147">STK_ERROR</a>, <a class="el" href="stk11xx-usb_8c_source.html#l00431">usb_stk11xx_isoc_cleanup()</a>, <a class="el" href="stk11xx-usb_8c_source.html#l00124">usb_stk11xx_isoc_init()</a>, and <a class="el" href="stk11xx-v4l_8c_source.html#l00128">v4l_stk11xx_select_video_mode()</a>.</p> </div> </div><p> <a class="anchor" name="159e3f9cb0b7adb3d1b9e64298d2b42b"></a><!-- doxytag: member="stk11xx-v4l.c::v4l_stk11xx_poll" ref="159e3f9cb0b7adb3d1b9e64298d2b42b" args="(struct file *fp, poll_table *wait)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static unsigned int v4l_stk11xx_poll </td> <td>(</td> <td class="paramtype">struct file * </td> <td class="paramname"> <em>fp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">poll_table * </td> <td class="paramname"> <em>wait</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Polling function. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>fp</em> </td><td>File pointer </td></tr> <tr><td valign="top"></td><td valign="top"><em>wait</em> </td><td></td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if all is OK </dd></dl> <p>Definition at line <a class="el" href="stk11xx-v4l_8c_source.html#l00490">490</a> of file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <p>References <a class="el" href="stk11xx_8h_source.html#l00172">STK_STREAM</a>.</p> </div> </div><p> <a class="anchor" name="e125a26fc4f36a4b64418acb87b958a4"></a><!-- doxytag: member="stk11xx-v4l.c::v4l_stk11xx_read" ref="e125a26fc4f36a4b64418acb87b958a4" args="(struct file *fp, char __user *buf, size_t count, loff_t *f_pos)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static ssize_t v4l_stk11xx_read </td> <td>(</td> <td class="paramtype">struct file * </td> <td class="paramname"> <em>fp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char __user * </td> <td class="paramname"> <em>buf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">loff_t * </td> <td class="paramname"> <em>f_pos</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Read the video device. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>fp</em> </td><td>File pointer</td></tr> </table> </dl> <dl compact><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buf</em> </td><td>Buffer in user space </td></tr> <tr><td valign="top"></td><td valign="top"><em>count</em> </td><td></td></tr> <tr><td valign="top"></td><td valign="top"><em>f_pos</em> </td><td></td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Count value</dd></dl> This function is called by the application is reading the video device. <p>Definition at line <a class="el" href="stk11xx-v4l_8c_source.html#l00391">391</a> of file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <p>References <a class="el" href="stk11xx-buf_8c_source.html#l00407">stk11xx_handle_frame()</a>, <a class="el" href="stk11xx-buf_8c_source.html#l00334">stk11xx_next_image()</a>, and <a class="el" href="stk11xx_8h_source.html#l00172">STK_STREAM</a>.</p> </div> </div><p> <a class="anchor" name="5fb1deffc636cce6dffc8b5e971e6115"></a><!-- doxytag: member="stk11xx-v4l.c::v4l_stk11xx_register_video_device" ref="5fb1deffc636cce6dffc8b5e971e6115" args="(struct usb_stk11xx *dev)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int v4l_stk11xx_register_video_device </td> <td>(</td> <td class="paramtype">struct usb_stk11xx * </td> <td class="paramname"> <em>dev</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Register the video device. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>dev</em> </td><td>Device structure</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if all is OK</dd></dl> This function permits to register the USB device to the video device. <p>Definition at line <a class="el" href="stk11xx-v4l_8c_source.html#l01679">1679</a> of file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <p>References <a class="el" href="stk11xx_8h_source.html#l00041">DRIVER_DESC</a>, <a class="el" href="stk11xx_8h_source.html#l00147">STK_ERROR</a>, <a class="el" href="stk11xx_8h_source.html#l00146">STK_INFO</a>, and <a class="el" href="stk11xx-v4l_8c_source.html#l00053">v4l_stk11xx_fops</a>.</p> <p>Referenced by <a class="el" href="stk11xx-usb_8c_source.html#l00676">usb_stk11xx_probe()</a>.</p> </div> </div><p> <a class="anchor" name="d19987ae823d30d119e857b2719a74f2"></a><!-- doxytag: member="stk11xx-v4l.c::v4l_stk11xx_release" ref="d19987ae823d30d119e857b2719a74f2" args="(struct file *fp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static int v4l_stk11xx_release </td> <td>(</td> <td class="paramtype">struct file * </td> <td class="paramname"> <em>fp</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Release an opened file. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>fp</em> </td><td>File pointer</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if all is OK</dd></dl> This function permits to release an opened file with the 'open' method. <p>Definition at line <a class="el" href="stk11xx-v4l_8c_source.html#l00344">344</a> of file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <p>References <a class="el" href="stk11xx-dev_8c_source.html#l00287">dev_stk11xx_camera_asleep()</a>, <a class="el" href="stk11xx-dev_8c_source.html#l00264">dev_stk11xx_camera_off()</a>, <a class="el" href="stk11xx-dev_8c_source.html#l00604">dev_stk11xx_stop_stream()</a>, <a class="el" href="stk11xx-buf_8c_source.html#l00287">stk11xx_free_buffers()</a>, <a class="el" href="stk11xx_8h_source.html#l00147">STK_ERROR</a>, and <a class="el" href="stk11xx-usb_8c_source.html#l00431">usb_stk11xx_isoc_cleanup()</a>.</p> </div> </div><p> <a class="anchor" name="627028fbe327bdeb1589d74109e9ae77"></a><!-- doxytag: member="stk11xx-v4l.c::v4l_stk11xx_select_video_mode" ref="627028fbe327bdeb1589d74109e9ae77" args="(struct usb_stk11xx *dev, int width, int height)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int v4l_stk11xx_select_video_mode </td> <td>(</td> <td class="paramtype">struct usb_stk11xx * </td> <td class="paramname"> <em>dev</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>width</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>height</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Select a video mode. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>dev</em> </td><td></td></tr> <tr><td valign="top"></td><td valign="top"><em>width</em> </td><td>Width of wished resolution </td></tr> <tr><td valign="top"></td><td valign="top"><em>height</em> </td><td>Height of wished resolution</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if all is OK</dd></dl> This function permits to check and select a video mode. <p>Definition at line <a class="el" href="stk11xx-v4l_8c_source.html#l00128">128</a> of file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <p>References <a class="el" href="stk11xx-v4l_8c_source.html#l00060">stk11xx_image_sizes</a>, <a class="el" href="stk11xx_8h_source.html#l00198">STK11XX_SXGA</a>, <a class="el" href="stk11xx_8h_source.html#l00197">STK11XX_VGA</a>, and <a class="el" href="stk11xx_8h_source.html#l00149">STK_DEBUG</a>.</p> <p>Referenced by <a class="el" href="stk11xx-v4l_8c_source.html#l00612">v4l_stk11xx_do_ioctl()</a>, and <a class="el" href="stk11xx-v4l_8c_source.html#l00255">v4l_stk11xx_open()</a>.</p> </div> </div><p> <a class="anchor" name="62bc2469df7a6e1d2fe8c455012bd9ad"></a><!-- doxytag: member="stk11xx-v4l.c::v4l_stk11xx_unregister_video_device" ref="62bc2469df7a6e1d2fe8c455012bd9ad" args="(struct usb_stk11xx *dev)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int v4l_stk11xx_unregister_video_device </td> <td>(</td> <td class="paramtype">struct usb_stk11xx * </td> <td class="paramname"> <em>dev</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Unregister the video device. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>dev</em> </td><td>Device structure</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if all is OK</dd></dl> This function permits to unregister the video device. <p>Definition at line <a class="el" href="stk11xx-v4l_8c_source.html#l01712">1712</a> of file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <p>References <a class="el" href="stk11xx_8h_source.html#l00146">STK_INFO</a>.</p> <p>Referenced by <a class="el" href="stk11xx-usb_8c_source.html#l00904">usb_stk11xx_disconnect()</a>.</p> </div> </div><p> <hr><h2>Variable Documentation</h2> <a class="anchor" name="3aef683028a48feea4df78904b903e81"></a><!-- doxytag: member="stk11xx-v4l.c::stk11xx_controls" ref="3aef683028a48feea4df78904b903e81" args="[]" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="stk11xx-v4l_8c.html#3aef683028a48feea4df78904b903e81">stk11xx_controls</a><code> [static]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> List of all V4Lv2 controls supported by the driver <p>Definition at line <a class="el" href="stk11xx-v4l_8c_source.html#l00077">77</a> of file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <p>Referenced by <a class="el" href="stk11xx-v4l_8c_source.html#l00612">v4l_stk11xx_do_ioctl()</a>.</p> </div> </div><p> <a class="anchor" name="4977da08718c28052dab2096023754e2"></a><!-- doxytag: member="stk11xx-v4l.c::stk11xx_image_sizes" ref="4977da08718c28052dab2096023754e2" args="[STK11XX_NBR_SIZES]" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">struct stk11xx_coord <a class="el" href="stk11xx_8h.html#4977da08718c28052dab2096023754e2">stk11xx_image_sizes</a>[STK11XX_NBR_SIZES] </td> </tr> </table> </div> <div class="memdoc"> <p> <b>Initial value:</b><div class="fragment"><pre class="fragment"> { { 80, 60 }, { 128, 96 }, { 160, 120 }, { 213, 160 }, { 320, 240 }, { 640, 480 }, { 800, 600 }, { 1024, 768 }, { 1280, 1024 } } </pre></div>List of all resolutions supported by the driver <p>Definition at line <a class="el" href="stk11xx-v4l_8c_source.html#l00060">60</a> of file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <p>Referenced by <a class="el" href="stk11xx-sysfs_8c_source.html#l00107">show_informations()</a>, <a class="el" href="stk11xx-v4l_8c_source.html#l00612">v4l_stk11xx_do_ioctl()</a>, and <a class="el" href="stk11xx-v4l_8c_source.html#l00128">v4l_stk11xx_select_video_mode()</a>.</p> </div> </div><p> <a class="anchor" name="00a41f99999840e48ab4ae826e53b569"></a><!-- doxytag: member="stk11xx-v4l.c::v4l_stk11xx_fops" ref="00a41f99999840e48ab4ae826e53b569" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static struct v4l2_file_operations <a class="el" href="stk11xx-v4l_8c.html#00a41f99999840e48ab4ae826e53b569">v4l_stk11xx_fops</a><code> [static, read]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <b>Initial value:</b><div class="fragment"><pre class="fragment"> { .owner = THIS_MODULE, .open = <a class="code" href="stk11xx-v4l_8c.html#a2127105dfc03d43fd4ce48f8e0417ac" title="Open the video device.">v4l_stk11xx_open</a>, .release = <a class="code" href="stk11xx-v4l_8c.html#d19987ae823d30d119e857b2719a74f2" title="Release an opened file.">v4l_stk11xx_release</a>, .read = <a class="code" href="stk11xx-v4l_8c.html#e125a26fc4f36a4b64418acb87b958a4" title="Read the video device.">v4l_stk11xx_read</a>, .poll = <a class="code" href="stk11xx-v4l_8c.html#159e3f9cb0b7adb3d1b9e64298d2b42b" title="Polling function.">v4l_stk11xx_poll</a>, .mmap = <a class="code" href="stk11xx-v4l_8c.html#1baaafe560fe7466c7062aacd02aff8c" title="Memory map.">v4l_stk11xx_mmap</a>, .ioctl = <a class="code" href="stk11xx-v4l_8c.html#b8d6ae85407574b48fd686fe75c74e97" title="Manage IOCTL.">v4l_stk11xx_ioctl</a>, } </pre></div>This variable contains some callback <p>Definition at line <a class="el" href="stk11xx-v4l_8c_source.html#l00053">53</a> of file <a class="el" href="stk11xx-v4l_8c_source.html">stk11xx-v4l.c</a>.</p> <p>Referenced by <a class="el" href="stk11xx-v4l_8c_source.html#l01679">v4l_stk11xx_register_video_device()</a>.</p> </div> </div><p> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Nov 11 13:36:59 2009 for SyntekUSBVideoCamera by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> </body> </html>