https://www.linuxtv.org/wiki/api.php?action=feedcontributions&user=Lucgallant&feedformat=atomLinuxTVWiki - User contributions [en]2024-03-19T08:32:54ZUser contributionsMediaWiki 1.39.6https://www.linuxtv.org/wiki/index.php?title=Anatomy_of_a_V4L_driver&diff=17329Anatomy of a V4L driver2005-11-08T16:07:54Z<p>Lucgallant: added info on writing v4l drivers</p>
<hr />
<div>== How a driver gets loaded into memory ==<br />
<br />
Firstly, a v4l driver is a kernel module that hooks into at least the videodev module (v4l) and possibly other modules such as v4l1-compat or videobuf, depending what it uses.<br />
<br />
Since a v4l driver is a kernel module, it will be loaded using modprobe or insmod. If using insmod, make sure to load all dependancies, or else your module will have unresolved symboles and will fail to load, such as this: <br />
<br />
<br />
vloopback_crc: module not supported by Novell, setting U taint flag.<br />
vloopback_crc: Unknown symbol videobuf_reqbufs, st_info == 0x1<br />
vloopback_crc: Unknown symbol v4l_compat_translate_ioctl, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_dqbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_qbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_read_one, st_info == 0x1<br />
<br />
<br />
These errors can be frustrating, but a good place to start is determining the dependancies. In this case we look at the prefix (videobuf_), and it hints to us that the video-buf module needs to be loaded. Same thing for v4l-compat.<br />
More information about Unresolved Symbols is available [http://www.tldp.org/HOWTO/Module-HOWTO/basekerncompat.html here].<br />
<br />
== What happens when the driver first starts up ==<br />
<br />
When a driver, and pretty much any kernel module gets started up, there needs to be a generic way for the module to initialize itself (this must be a way that the kernel will know how to get the module going). In the code of the module, there needs to be code such as this:<br />
<br />
module_init(vloopback_init);<br />
module_exit(cleanup_vloopback_module);<br />
<br />
module_init and module_exit being the keywords here. With the appropriate make flags, the compiler will know to bind these functions (vloopback_init, cleanup_vloopback_module) to the initialize and cleanup functions for the kernel to call.<br />
<br />
It is in the initialize function that the device (/dev/video5) will actually be created and it is where the device can setup it's default parameters.<br />
<br />
<br />
<br />
== How applications communicate with a v4l driver ==<br />
<br />
v4l drivers are compliant with the ioctl interface of the kernel. This means that if a v4l driver is written, any application that is compatible with v4l will be able to communicate with that driver. To do this, the application needs to send generic v4l ioctl (Input Output Controls) commands that the driver will be able to understand and respond to. <br />
<br />
Usually, when an application (such as mythtv, xawtv) starts up, you need to tell it which device to communicate to. Say the device is on /dev/video5, then the application will bind itself to /dev/video5 and the ioctls will be forwared to the driver in question via videodev module. The driver will then interpret the ioctl command (such as channel up, down, volume up, down, read, open...) and do the appropriate action.<br />
<br />
<br />
== Additional information on writing v4l drivers ==<br />
<br />
A great resource for getting started writing drivers (although outdated), is the following [http://www.thedirks.org/v4l2/v4l2dwg.htm link]. <br />
<br />
Additionally, by checking out the v4l source, there are many files in there which can be used as templates for drivers. It is not easy to put all the knowledge together, but with time it comes.</div>Lucgallanthttps://www.linuxtv.org/wiki/index.php?title=Anatomy_of_a_V4L_driver&diff=17328Anatomy of a V4L driver2005-10-31T13:19:53Z<p>Lucgallant: </p>
<hr />
<div>== How a driver gets loaded into memory ==<br />
<br />
Firstly, a v4l driver is a kernel module that hooks into at least the videodev module (v4l) and possibly other modules such as v4l1-compat or videobuf, depending what it uses.<br />
<br />
Since a v4l driver is a kernel module, it will be loaded using modprobe or insmod. If using insmod, make sure to load all dependancies, or else your module will have unresolved symboles and will fail to load, such as this: <br />
<br />
<br />
vloopback_crc: module not supported by Novell, setting U taint flag.<br />
vloopback_crc: Unknown symbol videobuf_reqbufs, st_info == 0x1<br />
vloopback_crc: Unknown symbol v4l_compat_translate_ioctl, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_dqbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_qbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_read_one, st_info == 0x1<br />
<br />
<br />
These errors can be frustrating, but a good place to start is determining the dependancies. In this case we look at the prefix (videobuf_), and it hints to us that the video-buf module needs to be loaded. Same thing for v4l-compat.<br />
More information about Unresolved Symbols is available [http://www.tldp.org/HOWTO/Module-HOWTO/basekerncompat.html here].<br />
<br />
== What happens when the driver first starts up ==<br />
<br />
When a driver, and pretty much any kernel module gets started up, there needs to be a generic way for the module to initialize itself (this must be a way that the kernel will know how to get the module going). In the code of the module, there needs to be code such as this:<br />
<br />
module_init(vloopback_init);<br />
module_exit(cleanup_vloopback_module);<br />
<br />
module_init and module_exit being the keywords here. With the appropriate make flags, the compiler will know to bind these functions (vloopback_init, cleanup_vloopback_module) to the initialize and cleanup functions for the kernel to call.<br />
<br />
It is in the initialize function that the device (/dev/video5) will actually be created and it is where the device can setup it's default parameters.<br />
<br />
<br />
<br />
== How applications communicate with a v4l driver ==<br />
<br />
v4l drivers are compliant with the ioctl interface of the kernel. This means that if a v4l driver is written, any application that is compatible with v4l will be able to communicate with that driver. To do this, the application needs to send generic v4l ioctl (Input Output Controls) commands that the driver will be able to understand and respond to. <br />
<br />
Usually, when an application (such as mythtv, xawtv) starts up, you need to tell it which device to communicate to. Say the device is on /dev/video5, then the application will bind itself to /dev/video5 and the ioctls will be forwared to the driver in question via videodev module. The driver will then interpret the ioctl command (such as channel up, down, volume up, down, read, open...) and do the appropriate action.</div>Lucgallanthttps://www.linuxtv.org/wiki/index.php?title=Anatomy_of_a_V4L_driver&diff=17327Anatomy of a V4L driver2005-10-31T13:08:38Z<p>Lucgallant: </p>
<hr />
<div>== How a driver gets loaded into memory ==<br />
<br />
Firstly, a v4l driver is a kernel module that hooks into at least the videodev module (v4l) and possibly other modules such as v4l1-compat or videobuf, depending what it uses.<br />
<br />
Since a v4l driver is a kernel module, it will be loaded using modprobe or insmod. If using insmod, make sure to load all dependancies, or else your module will have unresolved symboles and will fail to load, such as this: <br />
<br />
<br />
<br />
vloopback_crc: module not supported by Novell, setting U taint flag.<br />
vloopback_crc: Unknown symbol videobuf_reqbufs, st_info == 0x1<br />
vloopback_crc: Unknown symbol v4l_compat_translate_ioctl, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_dqbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_qbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_read_one, st_info == 0x1<br />
<br />
<br />
<br />
These errors can be frustrating, but a good place to start is determining the dependancies. In this case we look at the prefix (videobuf_), and it hints to us that the video-buf module needs to be loaded. Same thing for v4l-compat.<br />
More information about Unresolved Symbols is available [http://www.tldp.org/HOWTO/Module-HOWTO/basekerncompat.html here].<br />
<br />
== What happens when the driver first starts up ==<br />
<br />
When a driver, and pretty much any kernel module gets started up, there needs to be a generic way for the module to initialize itself (this must be a way that the kernel will know how to get the module going). In the code of the module, there needs to be code such as this:<br />
<br />
<br />
module_init(vloopback_init);<br />
module_exit(cleanup_vloopback_module);<br />
<br />
<br />
<br />
module_init and module_exit being the keywords here. With the appropriate make flags, the compiler will know to bind these functions (vloopback_init, cleanup_vloopback_module) to the initialize and cleanup functions for the kernel to call.<br />
<br />
It is in the initialize function that the device (/dev/video5) will actually be created and it is where the device can setup it's default parameters.<br />
<br />
<br />
<br />
== How applications communicate with a v4l driver ==<br />
<br />
v4l drivers are compliant with the ioctl interface of the kernel. This means that if a v4l driver is written, any application that is compatible with v4l will be able to communicate with that driver. To do this, the application needs to send generic v4l ioctl (Input Output Controls) commands that the driver will be able to understand and respond to. <br />
<br />
Usually, when an application (such as mythtv, xawtv) starts up, you need to tell it which device to communicate to. Say the device is on /dev/video5, then the application will bind itself to /dev/video5 and the ioctls will be forwared to the driver in question via videodev module. The driver will then interpret the ioctl command (such as channel up, down, volume up, down, read, open...) and do the appropriate action.</div>Lucgallanthttps://www.linuxtv.org/wiki/index.php?title=Main_Page&diff=4620Main Page2005-10-28T15:55:16Z<p>Lucgallant: </p>
<hr />
<div>__NOTOC__<br />
__NOEDITSECTION__<br />
<br />
<div style="background-color:#6289AB; padding:0.3em; color:#ffffff; font-weight:bold; font-size:150%; text-align:center"><br />
Welcome to the linuxtv.org DVB Wiki! (For v4l wiki, click [http://linuxtv.org/v4lwiki/index.php/Main_Page here])<br />
</div><br />
{|valign=top background=none<br />
|valign=top|<br />
<div style="vertical-align:top; margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#ffffff"><br />
<center><br />
This Wiki is intended to become the ultimate resource regarding all questions about Video, TV and DVB support on Linux, free DVB software and cool projects.<br />
<br />
Like every other Wiki it relies on the contributions of its users. Also this Wiki can only get as good as you and we mean: YOU!!! make it. <br />
<br />
Whatever you can contribute will be highly appreciated, no matter if it's a HOWTO, help and explanations how to write a driver, how to install some a driver or whether you can explain how that beast called DVB is working. <br />
<br />
have fun, enjoy -- ''The LinuxTV WikiTeam''<br />
<br />
<br />
''' ''The basic plan is to collect facts about available hardware, linux-dvb experiences, HOWTOs, encyclopedia-like information and explanations about how [[DVB]], [[MPEG2 Standard|MPEG-2]] and [[MHP]] work, what an [[EPG]] is and so on, to make this a place useful for everybody who is doing anything related to [[analog TV|analog]] or [[digital TV]]. Save and share knowledge.'' '''<br />
</center><br />
</div><br />
|}<br />
<br />
<div style="margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#F7F9FB;"><br />
{|valign=top cellpadding=0 cellspacing=0 width=100%<br />
|valign=top bgcolor=#F7F9FB width=5%|<br />
|valign=top bgcolor=#F7F9FB width=45%|<br />
* '''Technical Background'''<br />
** [[DVB Standard]]<br />
** [[MPEG2 Standard]]<br />
** [[Analog TV]]<br />
** [[Digital TV]]<br />
** [[Modulation Scheme]]s used for Analog and Digital TV<br />
** [[PCI interface chipset]]s used for DVB cards<br />
** [[DVB at the USB bus]]<br />
** [[Hard- or Software Decoder?]]<br />
** [[i2c Protocol]]<br />
** [[DSM-CC ObjectCarousel Protocol]]<br />
<br />
* '''Developer Section'''<br />
**[[Supported DVB cards]]<br />
**[[Supported CAM modules]]<br />
**[[DVB cards requiring definition]]<br />
**[[DVB API history and future]]<br />
**[[Anatomy of a DVB device]]<br />
**[[Anatomy of a LinuxTV driver]]<br />
**[[Bug Report|File a Bug Report]]<br />
**[[Code Review|Invitation for Code Review]]<br />
**[[Hints for Refactoring existing DVB drivers]]<br />
**[[The DVB Decoder Challenge]]<br />
**[[Linux DVB API Version 4]]<br />
<br />
* '''LinuxTV-based example Setups'''<br />
** [[VDR-based STBs]]<br />
** [[MythTV STBs]]<br />
** [[KaxTV on the Desktop]]<br />
** [[Enigma on the dbox2]]<br />
** [[Neutrino on the dbox2]]<br />
** [[Enigma on the Dreambox]]<br />
<br />
|valign=top bgcolor=#F7F9FB width=45%|<br />
* '''Supported Hardware'''<br />
** [[Kernel Config Overview]]<br />
** [[DVB-S_cards|DVB-S devices]]<br />
** [[DVB-T_cards|DVB-T devices]]<br />
** [[DVB-C_cards|DVB-C devices]]<br />
** [[ATSC_cards|ATSC devices]]<br />
** [[DVB Card Vendors|Cards sorted by Vendor]]<br />
** [[DVB USB|DVB/ATSC USB boxes sorted by driver]]<br />
* '''Card modding'''<br />
** [[Memory Mod]]<br />
** [[Cooling Mods]]<br />
** [[Voltage Mod]] (Rev. 1.3 only)<br />
** [[DVB TT Budget Patch]]<br />
* '''Software'''<br />
** [[LinuxTV Drivers]]<br />
** [[LinuxTV dvb-apps]]<br />
** [[VDR]]<br />
** [[MythTV]]<br />
** [[Kaffeine]]<br />
** [[KaxTV]]<br />
** [[Klear]]<br />
** [[dvbstream]]<br />
** [[dvbsnoop]]<br />
** [[dvbsak]]<br />
** [[ZapDvb]]<br />
** [[xawtv]]<br />
** [[pluto]]<br />
** [[gdvb]]<br />
** [[ProjectX]]<br />
** [[Mini DVB Linux]]<br />
** [[LinVDR]]<br />
<br />
* '''Hardware solutions'''<br />
** [[Barebones and bundles]]<br />
** [[Commercial solutions]]<br />
** [[Examples of hardware]]<br />
** [[Streaming clients]]<br />
* '''Periphery for linuxtv-computers'''<br />
** [[Sat antenna]]<br />
** [[DVB-T antenna]]<br />
** [[DD receiver|Dolby Digital receiver]]<br />
** [[Remote Controllers]]<br />
<br />
* '''[[DVB Links]]'''<br />
|}<br />
</div><br />
<br />
[[Category:LinuxTV]]</div>Lucgallanthttps://www.linuxtv.org/wiki/index.php?title=Anatomy_of_a_V4L_driver&diff=17326Anatomy of a V4L driver2005-10-28T15:54:10Z<p>Lucgallant: </p>
<hr />
<div>== How a driver gets loaded into memory ==<br />
<br />
Firstly, a v4l driver is a kernel module that hooks into at least the videodev module (v4l) and possibly other modules such as v4l1-compat or videobuf, depending what it uses.<br />
<br />
Since a v4l driver is a kernel module, it will be loaded using modprobe or insmod. If using insmod, make sure to load all dependancies, or else your module will have unresolved symboles and will fail to load, such as this: <br />
<br />
*******************************************************************<br />
vloopback_crc: module not supported by Novell, setting U taint flag.<br />
vloopback_crc: Unknown symbol videobuf_reqbufs, st_info == 0x1<br />
vloopback_crc: Unknown symbol v4l_compat_translate_ioctl, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_dqbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_qbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_read_one, st_info == 0x1<br />
*******************************************************************<br />
<br />
These errors can be frustrating, but a good place to start is determining the dependancies. In this case we look at the prefix (videobuf_), and it hints to us that the video-buf module needs to be loaded. Same thing for v4l-compat.<br />
More information about Unresolved Symbols is available [http://www.tldp.org/HOWTO/Module-HOWTO/basekerncompat.html here].<br />
<br />
== What happens when the driver first starts up ==<br />
<br />
When a driver, and pretty much any kernel module gets started up, there needs to be a generic way for the module to initialize itself (this must be a way that the kernel will know how to get the module going). In the code of the module, there needs to be code such as this:<br />
<br />
*****************************************<br />
module_init(vloopback_init);<br />
module_exit(cleanup_vloopback_module);<br />
*****************************************<br />
module_init and module_exit being the keywords here. With the appropriate make flags, the compiler will know to bind these functions (vloopback_init, cleanup_vloopback_module) to the initialize and cleanup functions for the kernel to call.<br />
<br />
It is in the initialize function that the device (/dev/video5) will actually be created and it is where the device can setup it's default parameters.<br />
<br />
<br />
<br />
== How applications communicate with a v4l driver ==<br />
<br />
v4l drivers are compliant with the ioctl interface of the kernel. This means that if a v4l driver is written, any application that is compatible with v4l will be able to communicate with that driver. To do this, the application needs to send generic v4l ioctl (Input Output Controls) commands that the driver will be able to understand and respond to. <br />
<br />
Usually, when an application (such as mythtv, xawtv) starts up, you need to tell it which device to communicate to. Say the device is on /dev/video5, then the application will bind itself to /dev/video5 and the ioctls will be forwared to the driver in question via videodev module. The driver will then interpret the ioctl command (such as channel up, down, volume up, down, read, open...) and do the appropriate action.</div>Lucgallanthttps://www.linuxtv.org/wiki/index.php?title=Anatomy_of_a_V4L_driver&diff=17325Anatomy of a V4L driver2005-10-28T15:53:30Z<p>Lucgallant: </p>
<hr />
<div>I write this because throughout my time porting vloopback to v4l2, I have found it hard to determine how the v4l driver actually works. I am not an expert but hopefully what I write here can help someone.<br />
<br />
<br />
== How a driver gets loaded into memory ==<br />
<br />
Firstly, a v4l driver is a kernel module that hooks into at least the videodev module (v4l) and possibly other modules such as v4l1-compat or videobuf, depending what it uses.<br />
<br />
Since a v4l driver is a kernel module, it will be loaded using modprobe or insmod. If using insmod, make sure to load all dependancies, or else your module will have unresolved symboles and will fail to load, such as this: <br />
<br />
*******************************************************************<br />
vloopback_crc: module not supported by Novell, setting U taint flag.<br />
vloopback_crc: Unknown symbol videobuf_reqbufs, st_info == 0x1<br />
vloopback_crc: Unknown symbol v4l_compat_translate_ioctl, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_dqbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_qbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_read_one, st_info == 0x1<br />
*******************************************************************<br />
<br />
These errors can be frustrating, but a good place to start is determining the dependancies. In this case we look at the prefix (videobuf_), and it hints to us that the video-buf module needs to be loaded. Same thing for v4l-compat.<br />
More information about Unresolved Symbols is available [http://www.tldp.org/HOWTO/Module-HOWTO/basekerncompat.html here].<br />
<br />
== What happens when the driver first starts up ==<br />
<br />
When a driver, and pretty much any kernel module gets started up, there needs to be a generic way for the module to initialize itself (this must be a way that the kernel will know how to get the module going). In the code of the module, there needs to be code such as this:<br />
<br />
*****************************************<br />
module_init(vloopback_init);<br />
module_exit(cleanup_vloopback_module);<br />
*****************************************<br />
module_init and module_exit being the keywords here. With the appropriate make flags, the compiler will know to bind these functions (vloopback_init, cleanup_vloopback_module) to the initialize and cleanup functions for the kernel to call.<br />
<br />
It is in the initialize function that the device (/dev/video5) will actually be created and it is where the device can setup it's default parameters.<br />
<br />
<br />
<br />
== How applications communicate with a v4l driver ==<br />
<br />
v4l drivers are compliant with the ioctl interface of the kernel. This means that if a v4l driver is written, any application that is compatible with v4l will be able to communicate with that driver. To do this, the application needs to send generic v4l ioctl (Input Output Controls) commands that the driver will be able to understand and respond to. <br />
<br />
Usually, when an application (such as mythtv, xawtv) starts up, you need to tell it which device to communicate to. Say the device is on /dev/video5, then the application will bind itself to /dev/video5 and the ioctls will be forwared to the driver in question via videodev module. The driver will then interpret the ioctl command (such as channel up, down, volume up, down, read, open...) and do the appropriate action.</div>Lucgallanthttps://www.linuxtv.org/wiki/index.php?title=Anatomy_of_a_V4L_driver&diff=17324Anatomy of a V4L driver2005-10-28T15:51:35Z<p>Lucgallant: </p>
<hr />
<div>I write this because throughout my time porting vloopback to v4l2, I have found it hard to determine how the v4l driver actually works. I am not an expert but hopefully what I write here can help someone.<br />
<br />
<br />
== How a driver gets loaded into memory ==<br />
<br />
Firstly, a v4l driver is a kernel module that hooks into at least the videodev module (v4l) and possibly other modules such as v4l1-compat or videobuf, depending what it uses.<br />
<br />
Since a v4l driver is a kernel module, it will be loaded using modprobe or insmod. If using insmod, make sure to load all dependancies, or else your module will have unresolved symboles and will fail to load, such as this: <br />
<br />
---------------------------------------------------------------------<br />
'''vloopback_crc: module not supported by Novell, setting U taint flag.<br />
vloopback_crc: Unknown symbol videobuf_reqbufs, st_info == 0x1<br />
vloopback_crc: Unknown symbol v4l_compat_translate_ioctl, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_dqbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_qbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_read_one, st_info == 0x1'''<br />
---------------------------------------------------------------------<br />
<br />
These errors can be frustrating, but a good place to start is determining the dependancies. In this case we look at the prefix (videobuf_), and it hints to us that the video-buf module needs to be loaded. Same thing for v4l-compat.<br />
More information about Unresolved Symbols is available [http://www.tldp.org/HOWTO/Module-HOWTO/basekerncompat.html here].<br />
<br />
== What happens when the driver first starts up ==<br />
<br />
When a driver, and pretty much any kernel module gets started up, there needs to be a generic way for the module to initialize itself (this must be a way that the kernel will know how to get the module going). In the code of the module, there needs to be code such as this:<br />
<br />
-----------------------------------------<br />
'''module_init(vloopback_init);<br />
module_exit(cleanup_vloopback_module);'''<br />
-----------------------------------------<br />
module_init and module_exit being the keywords here. With the appropriate make flags, the compiler will know to bind these functions (vloopback_init, cleanup_vloopback_module) to the initialize and cleanup functions for the kernel to call.<br />
<br />
It is in the initialize function that the device (/dev/video5) will actually be created and it is where the device can setup it's default parameters.<br />
<br />
<br />
<br />
== How applications communicate with a v4l driver ==<br />
<br />
v4l drivers are compliant with the ioctl interface of the kernel. This means that if a v4l driver is written, any application that is compatible with v4l will be able to communicate with that driver. To do this, the application needs to send generic v4l ioctl (Input Output Controls) commands that the driver will be able to understand and respond to. <br />
<br />
Usually, when an application (such as mythtv, xawtv) starts up, you need to tell it which device to communicate to. Say the device is on /dev/video5, then the application will bind itself to /dev/video5 and the ioctls will be forwared to the driver in question via videodev module. The driver will then interpret the ioctl command (such as channel up, down, volume up, down, read, open...) and do the appropriate action.</div>Lucgallanthttps://www.linuxtv.org/wiki/index.php?title=Anatomy_of_a_V4L_driver&diff=17323Anatomy of a V4L driver2005-10-28T15:49:29Z<p>Lucgallant: </p>
<hr />
<div>I write this because throughout my time porting vloopback to v4l2, I have found it hard to determine how the v4l driver actually works. I am not an expert but hopefully what I write here can help someone.<br />
<br />
<br />
== How a driver gets loaded into memory ==<br />
<br />
Firstly, a v4l driver is a kernel module that hooks into at least the videodev module (v4l) and possibly other modules such as v4l1-compat or videobuf, depending what it uses.<br />
<br />
Since a v4l driver is a kernel module, it will be loaded using modprobe or insmod. If using insmod, make sure to load all dependancies, or else your module will have unresolved symboles and will fail to load, such as this: <br />
<br />
---------------------------------------------------------------------<br />
vloopback_crc: module not supported by Novell, setting U taint flag.<br />
vloopback_crc: Unknown symbol videobuf_reqbufs, st_info == 0x1<br />
vloopback_crc: Unknown symbol v4l_compat_translate_ioctl, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_dqbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_qbuf, st_info == 0x1<br />
vloopback_crc: Unknown symbol videobuf_read_one, st_info == 0x1<br />
---------------------------------------------------------------------<br />
<br />
These errors can be frustrating, but a good place to start is determining the dependancies. In this case we look at the prefix (videobuf_), and it hints to us that the video-buf module needs to be loaded. Same thing for v4l-compat.<br />
More information about Unresolved Symbols is available [http://www.tldp.org/HOWTO/Module-HOWTO/basekerncompat.html here].<br />
<br />
== What happens when the driver first starts up ==<br />
<br />
When a driver, and pretty much any kernel module gets started up, there needs to be a generic way for the module to initialize itself (this must be a way that the kernel will know how to get the module going). In the code of the module, there needs to be code such as this:<br />
<br />
-----------------------------------------<br />
module_init(vloopback_init);<br />
module_exit(cleanup_vloopback_module);<br />
-----------------------------------------<br />
module_init and module_exit being the keywords here. With the appropriate make flags, the compiler will know to bind these functions (vloopback_init, cleanup_vloopback_module) to the initialize and cleanup functions for the kernel to call.<br />
<br />
It is in the initialize function that the device (/dev/video5) will actually be created and it is where the device can setup it's default parameters.<br />
<br />
<br />
<br />
== How applications communicate with a driver ==<br />
<br />
v4l drivers are compliant with the ioctl interface of the kernel. This means that if a v4l driver is written, any application that is compatible with v4l will be able to communicate with that driver. To do this, the application needs to send generic v4l ioctl (Input Output Controls) commands that the driver will be able to understand and respond to. <br />
<br />
Usually, when an application (such as mythtv, xawtv) starts up, you need to tell it which device to communicate to. Say the device is on /dev/video5, then the application will bind itself to /dev/video5 and the ioctls will be forwared to the driver in question via videodev module. The driver will then interpret the ioctl command (such as channel up, down, volume up, down, read, open...) and do the appropriate action.</div>Lucgallanthttps://www.linuxtv.org/wiki/index.php?title=Archived:Main_Page-V4L&diff=24484Archived:Main Page-V4L2005-10-28T15:30:07Z<p>Lucgallant: </p>
<hr />
<div>__NOTOC__<br />
__NOEDITSECTION__<br />
<br />
<div style="background-color:#006600; padding:0.3em; color:#ffffff; font-weight:bold; font-size:150%; text-align:center"><br />
Welcome to the video4linux wiki (For DVB wiki, click [http://www.linuxtv.org/wiki here])<br />
</div><br />
<br />
{|valign=top background=none<br />
|valign=top|<br />
<div style="vertical-align:top; margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#ffffff"><br />
<br />
This wiki is designed to serve as a community focus and the resource of reference for users and developers of the Video4Linux framework. In the short term, the task is to document the operation and quirks of hardware supported by v4l applications, to complement and offload the [https://listman.redhat.com/mailman/listinfo/video4linux-list v4l mailing list] -- cf. [http://marc.theaimsgroup.com/?l=linux-video searchable archives].<br />
<br />
We are also encouraging developers to turn this site into a repository of knowledge about v4l, helping to ensure that expertise acquired through much hard labor and long dedication won't get lost, but can be passed on to new developers and keep free software thriving.<br />
<br />
If you are a user looking for help, please try searching the [http://marc.theaimsgroup.com/?l=linux-video mailing list archives] first, before asking a question on the [https://listman.redhat.com/mailman/listinfo/video4linux-list v4l mailing list]. You may also be able to get immediate help on the #v4l irc channel on irc.freenode.net -- hopefully someone there will be able to help you!<br />
<br />
The wiki will only be as useful as we make it. Every user of video4linux has something to contribute, and we encourage you to begin right away. Whatever you can contribute will be warmly appreciated, whether it is a set of instructions for how to get a certain card working, a report on the audio and video quality of a working card, suggestions for how to extend an existing driver or write a new one, or an explanation of the internal logic of v4l itself.<br />
<br />
To keep these instructions free, all contributions to this wiki are automatically licensed under the GNU General Public License [http://www.gnu.org/copyleft/gpl.html GPL]. If you wish, you may specify in each case that your contribution is dual-licensed under the [http://www.opensource.org/licenses/mit-license.html MIT License]. Please help us keep spam away by signing in before you post.<br />
<br />
Enjoy!<br />
<br />
The v4l wiki team<br />
<br />
<br />
<br />
''' These categories are provisional placeholders, drawn from LinuxTV's [http://linuxtv.org/wiki/index.php DVB wiki]. To make a contribution, just click on one of the links and start writing. The idea is to aggregate information about available hardware, v4l experiences, HOWTOs, and technical information about the workings of v4l devices work. In short, to make this a place a useful and well-organized resource for everyone interested in video4linux.<br />
</div><br />
|}<br />
<br />
<div style="margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#F7F9FB;"><br />
{|valign=top cellpadding=0 cellspacing=0 width=100%<br />
|valign=top bgcolor=#F7F9FB width=5%|<br />
|valign=top bgcolor=#F7F9FB width=45%|<br />
* '''Technical Background'''<br />
** '''Video4linux APIs'''<br />
*** [http://www.linuxtv.org/downloads/video4linux/API/V4L2_API Linux v4l2 API]<br />
*** [http://www.linuxtv.org/downloads/video4linux/API/V4L1_API.html Linux v4l API - Obsoleted]<br />
** [http://users.pandora.be/educypedia/electronics/television.htm TV Encyclopedia]<br />
** [http://www.ee.surrey.ac.uk/Contrib/WorldTV/ Analog TV]<br />
** [[Digital TV]]<br />
** [[PCI interface chipsets used for v4l cards]]<br />
** [[GPIO pins]]<br />
** [[v4l at the USB bus]]<br />
** [http://secure.netroedge.com/~lm78/docs.html i2c Protocol]<br />
** [[Radio Data System (RDS)]]<br />
* '''Developer Section'''<br />
** [[How to build from CVS |How to build from v4l CVS]]<br />
** [[How to write good problem report |How to write good problem report]]<br />
** [[How_to_submit_patches |How to submit patches]]<br />
** [[Anatomy of a v4l device]]<br />
** [[Anatomy of a v4l driver]]<br />
** [[Discussion of v4l api version 3]]<br />
** [[How to add support for a new card]]<br />
** [[TODO - main tasks]]<br />
** [[Maintaining CVS tree]]<br />
** '''Kernel Development'''<br />
*** [[SubmittingPatches | Kernel rules to submit patches]]<br />
*** [[Documentation/SubmittingDrivers | Kernel rules to submit drivers]]<br />
*** [[Documentation/CodingStyle | Kernel Coding Style]]<br />
*** [http://jungla.dit.upm.es/%7Ejmseyas/linux/kernel/hackers-docs.html Index of Documentation for People Interested in Writing and/or Understanding the Linux Kernel]<br />
<br />
* '''v4l-based Example Setups'''<br />
** [[Home brews]]<br />
** [[MythTV]]<br />
<br />
|valign=top bgcolor=#F7F9FB width=45%|<br />
* '''Supported Hardware'''<br />
** The types of [[Tuners]] <br />
*** (as listed in the kernel as of 2.6.12-rc2)<br />
** [[Hardware vs software encoders]]<br />
** [[v4l card vendors]]<br />
** TV cards and drivers<br />
*** Video via PCI<br />
**** [[List survey of cards in use now]]<br />
**** [[bttv devices (bt848, bt878)]]<br />
***** [[alternating field capture]]<br />
***** [[btaudio (bt878)]]<br />
**** [[saa7134 devices (saa713x)]]<br />
**** [[cx88 devices (cx2388x) ]]<br />
**** [[ivtv devices (cx23415, cx23416)]]<br />
**** [[zoran devices (zr36057, zr36067)]]<br />
*** [[zoran (zr36120, zr36125) ]]<br />
*** Video via USB<br />
**** [[USBVideo]] Request support for USB Video devices<br />
**** [[Em2820]]<br />
**** [[USBVision devices]]<br />
**** [[DiBcom USB devices]]<br />
**** [[OmniVision USB devices (OV511, etc)]]<br />
**** [[H&B TX-100]] analog to digital video converter<br />
** Other devices<br />
*** [[Radio]]s<br />
*** [[Webcams]]<br />
*** [[Scanners]]<br />
*** [[Loopback]]<br />
*** [[Digitisers]]<br />
<br />
* '''Applications'''<br />
** [[v4l watching]]<br />
** [[v4l recording]]<br />
** [[v4l capturing]] <br />
** [[text capture]]<br />
<br />
* '''Peripherals for v4l'''<br />
** [[Antennas]]<br />
** [[Remote controllers]]<br />
<br />
* '''[[v4l Links]]'''<br />
|}<br />
</div><br />
<br />
[http://linuxtv.org Category:LinuxTV]</div>Lucgallanthttps://www.linuxtv.org/wiki/index.php?title=Main_Page&diff=4606Main Page2005-10-28T15:28:20Z<p>Lucgallant: </p>
<hr />
<div>__NOTOC__<br />
__NOEDITSECTION__<br />
<br />
<div style="background-color:#6289AB; padding:0.3em; color:#ffffff; font-weight:bold; font-size:150%; text-align:center"><br />
Welcome to the linuxtv.org DVB Wiki! (For v4l wiki, click[http://linuxtv.org/v4lwiki/index.php/Main_Page here])<br />
</div><br />
{|valign=top background=none<br />
|valign=top|<br />
<div style="vertical-align:top; margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#ffffff"><br />
<center><br />
This Wiki is intended to become the ultimate resource regarding all questions about Video, TV and DVB support on Linux, free DVB software and cool projects.<br />
<br />
Like every other Wiki it relies on the contributions of its users. Also this Wiki can only get as good as you and we mean: YOU!!! make it. <br />
<br />
Whatever you can contribute will be highly appreciated, no matter if it's a HOWTO, help and explanations how to write a driver, how to install some a driver or whether you can explain how that beast called DVB is working. <br />
<br />
have fun, enjoy -- ''The LinuxTV WikiTeam''<br />
<br />
<br />
''' ''The basic plan is to collect facts about available hardware, linux-dvb experiences, HOWTOs, encyclopedia-like information and explanations about how [[DVB]], [[MPEG2 Standard|MPEG-2]] and [[MHP]] work, what an [[EPG]] is and so on, to make this a place useful for everybody who is doing anything related to [[analog TV|analog]] or [[digital TV]]. Save and share knowledge.'' '''<br />
</center><br />
</div><br />
|}<br />
<br />
<div style="margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#F7F9FB;"><br />
{|valign=top cellpadding=0 cellspacing=0 width=100%<br />
|valign=top bgcolor=#F7F9FB width=5%|<br />
|valign=top bgcolor=#F7F9FB width=45%|<br />
* '''Technical Background'''<br />
** [[DVB Standard]]<br />
** [[MPEG2 Standard]]<br />
** [[Analog TV]]<br />
** [[Digital TV]]<br />
** [[Modulation Scheme]]s used for Analog and Digital TV<br />
** [[PCI interface chipset]]s used for DVB cards<br />
** [[DVB at the USB bus]]<br />
** [[Hard- or Software Decoder?]]<br />
** [[i2c Protocol]]<br />
** [[DSM-CC ObjectCarousel Protocol]]<br />
<br />
* '''Developer Section'''<br />
**[[Supported DVB cards]]<br />
**[[Supported CAM modules]]<br />
**[[DVB cards requiring definition]]<br />
**[[DVB API history and future]]<br />
**[[Anatomy of a DVB device]]<br />
**[[Anatomy of a LinuxTV driver]]<br />
**[[Bug Report|File a Bug Report]]<br />
**[[Code Review|Invitation for Code Review]]<br />
**[[Hints for Refactoring existing DVB drivers]]<br />
**[[The DVB Decoder Challenge]]<br />
**[[Linux DVB API Version 4]]<br />
<br />
* '''LinuxTV-based example Setups'''<br />
** [[VDR-based STBs]]<br />
** [[MythTV STBs]]<br />
** [[KaxTV on the Desktop]]<br />
** [[Enigma on the dbox2]]<br />
** [[Neutrino on the dbox2]]<br />
** [[Enigma on the Dreambox]]<br />
<br />
|valign=top bgcolor=#F7F9FB width=45%|<br />
* '''Supported Hardware'''<br />
** [[Kernel Config Overview]]<br />
** [[DVB-S_cards|DVB-S devices]]<br />
** [[DVB-T_cards|DVB-T devices]]<br />
** [[DVB-C_cards|DVB-C devices]]<br />
** [[ATSC_cards|ATSC devices]]<br />
** [[DVB Card Vendors|Cards sorted by Vendor]]<br />
** [[DVB USB|DVB/ATSC USB boxes sorted by driver]]<br />
* '''Card modding'''<br />
** [[Memory Mod]]<br />
** [[Cooling Mods]]<br />
** [[Voltage Mod]] (Rev. 1.3 only)<br />
** [[DVB TT Budget Patch]]<br />
* '''Software'''<br />
** [[LinuxTV Drivers]]<br />
** [[LinuxTV dvb-apps]]<br />
** [[VDR]]<br />
** [[MythTV]]<br />
** [[Kaffeine]]<br />
** [[KaxTV]]<br />
** [[Klear]]<br />
** [[dvbstream]]<br />
** [[dvbsnoop]]<br />
** [[dvbsak]]<br />
** [[ZapDvb]]<br />
** [[xawtv]]<br />
** [[pluto]]<br />
** [[gdvb]]<br />
** [[ProjectX]]<br />
** [[Mini DVB Linux]]<br />
** [[LinVDR]]<br />
<br />
* '''Hardware solutions'''<br />
** [[Barebones and bundles]]<br />
** [[Commercial solutions]]<br />
** [[Examples of hardware]]<br />
** [[Streaming clients]]<br />
* '''Periphery for linuxtv-computers'''<br />
** [[Sat antenna]]<br />
** [[DVB-T antenna]]<br />
** [[DD receiver|Dolby Digital receiver]]<br />
** [[Remote Controllers]]<br />
<br />
* '''[[DVB Links]]'''<br />
|}<br />
</div><br />
<br />
[[Category:LinuxTV]]</div>Lucgallant