<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://linuxtv.org/wiki/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://linuxtv.org/wiki/index.php?title=Special:Contributions/Mauro_Carvalho_Chehab&amp;feed=atom&amp;limit=50&amp;target=Mauro_Carvalho_Chehab&amp;year=&amp;month=</id>
		<title>LinuxTVWiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://linuxtv.org/wiki/index.php?title=Special:Contributions/Mauro_Carvalho_Chehab&amp;feed=atom&amp;limit=50&amp;target=Mauro_Carvalho_Chehab&amp;year=&amp;month="/>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Special:Contributions/Mauro_Carvalho_Chehab"/>
		<updated>2013-05-25T05:11:13Z</updated>
		<subtitle>From LinuxTVWiki</subtitle>
		<generator>MediaWiki 1.16.5</generator>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:59:32Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission email ==&lt;br /&gt;
&lt;br /&gt;
The following example (based on a real patch submission) shows, in practice, how&lt;br /&gt;
a good patch should look like:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Reviewed-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
  ---&lt;br /&gt;
  &lt;br /&gt;
   v2: Coding Style fixed, as per-review.&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/platform/davinci/vpif_capture.c |    1 +&lt;br /&gt;
   1 file changed, 1 insertion(+)&lt;br /&gt;
&lt;br /&gt;
  diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  index 13aa46d..0bafeca 100644&lt;br /&gt;
  --- a/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  +++ b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  @@ -339,6 +339,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)&lt;br /&gt;
   	 * Set interrupt for both the fields in VPIF Register enable channel in&lt;br /&gt;
   	 * VPIF register&lt;br /&gt;
   	 */&lt;br /&gt;
  +	channel_first_int[VPIF_VIDEO_INDEX][ch-&amp;gt;channel_id] = 1;&lt;br /&gt;
   	if ((VPIF_CHANNEL0_VIDEO == ch-&amp;gt;channel_id)) {&lt;br /&gt;
   		channel0_intr_assert();&lt;br /&gt;
   		channel0_intr_enable(1);&lt;br /&gt;
&lt;br /&gt;
*The fist part contains the email header and the first part of the email body, with the patch description, followed by Signed-off/Reviewed-by/Acked-By tags.&lt;br /&gt;
&lt;br /&gt;
Note: For patches submitted by one person, but authored by another one, the '''first line''' of the email body should contain a ''From:'' tag with the name and email of the original author. For example, if the above e-mail was sent by ''Patch Reviewer'', it would contain, instead:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Reviewer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
    &lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Signed-off-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
*The second part is optional, separated by &amp;quot;---&amp;quot;, contains the patch diffstat. It can also contain any notice for the patch reviewers to read. The second part won't be merged at the patch commit.&lt;br /&gt;
&lt;br /&gt;
*The third part is the diff, using unified diff, -p1 format. It is typically generated by a &amp;quot;git diff&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
Note: on the above, ''Some User'', ''Patch Developer'' and ''Patch Reviewer'' should be the full email of real persons, in the form: ''some name &amp;lt;some email&amp;gt;''.&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:56:33Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission email ==&lt;br /&gt;
&lt;br /&gt;
The following example (based on a real patch submission) shows, in practice, how&lt;br /&gt;
a good patch should look like:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Reviewed-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
  ---&lt;br /&gt;
  &lt;br /&gt;
   v2: Coding Style fixed, as per-review.&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/platform/davinci/vpif_capture.c |    1 +&lt;br /&gt;
   1 file changed, 1 insertion(+)&lt;br /&gt;
&lt;br /&gt;
  diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  index 13aa46d..0bafeca 100644&lt;br /&gt;
  --- a/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  +++ b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  @@ -339,6 +339,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)&lt;br /&gt;
   	 * Set interrupt for both the fields in VPIF Register enable channel in&lt;br /&gt;
   	 * VPIF register&lt;br /&gt;
   	 */&lt;br /&gt;
  +	channel_first_int[VPIF_VIDEO_INDEX][ch-&amp;gt;channel_id] = 1;&lt;br /&gt;
   	if ((VPIF_CHANNEL0_VIDEO == ch-&amp;gt;channel_id)) {&lt;br /&gt;
   		channel0_intr_assert();&lt;br /&gt;
   		channel0_intr_enable(1);&lt;br /&gt;
&lt;br /&gt;
The fist part contains the email header and the first part of the email body, with the patch description, followed by Signed-off/Reviewed-by/Acked-By tags. &lt;br /&gt;
&lt;br /&gt;
Note: For patches submitted by one person, but authored by another one, the '''first line''' of the email body should contain a ''From:'' tag with the name and email of the original author. For example, if the above e-mail was sent by ''Patch Reviewer'', it would contain, instead:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Reviewer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
    &lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Signed-off-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
The second part is optional, separated by &amp;quot;---&amp;quot;, contains the patch diffstat. It can also contain any notice for the patch reviewers to read. The second part won't be merged at the patch commit.&lt;br /&gt;
&lt;br /&gt;
The third part is the diff, using unified diff, -p1 format. It is typically generated by a &amp;quot;git diff&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
Note: on the above, ''Some User'', ''Patch Developer'' and ''Patch Reviewer'' should be the full email of real persons, in the form: ''some name &amp;lt;some email&amp;gt;''.&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:55:09Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission email ==&lt;br /&gt;
&lt;br /&gt;
The following example (based on a real patch submission) shows, in practice, how&lt;br /&gt;
a good patch should look like:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Reviewed-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
  ---&lt;br /&gt;
  &lt;br /&gt;
   v2: Coding Style fixed, as per-review.&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/platform/davinci/vpif_capture.c |    1 +&lt;br /&gt;
   1 file changed, 1 insertion(+)&lt;br /&gt;
&lt;br /&gt;
  diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  index 13aa46d..0bafeca 100644&lt;br /&gt;
  --- a/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  +++ b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  @@ -339,6 +339,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)&lt;br /&gt;
   	 * Set interrupt for both the fields in VPIF Register enable channel in&lt;br /&gt;
   	 * VPIF register&lt;br /&gt;
   	 */&lt;br /&gt;
  +	channel_first_int[VPIF_VIDEO_INDEX][ch-&amp;gt;channel_id] = 1;&lt;br /&gt;
   	if ((VPIF_CHANNEL0_VIDEO == ch-&amp;gt;channel_id)) {&lt;br /&gt;
   		channel0_intr_assert();&lt;br /&gt;
   		channel0_intr_enable(1);&lt;br /&gt;
&lt;br /&gt;
The fist part contains the email header and the first part of the email body, with the patch description, followed by Signed-off/Reviewed-by/Acked-By tags. &lt;br /&gt;
&lt;br /&gt;
Note: For patches submitted by one person, but authored by another one, the '''first line''' of the email body should contain a ''From:'' tag with the name and email of the original author. For example, if the above e-mail is sent by ''Patch Reviewer'', it would contain, instead:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Reviewer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
    &lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Signed-off-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
The second part is optional, separated by &amp;quot;---&amp;quot;, contains the patch diffstat. It can also contain any notice for the patch reviewers to read. The second part won't be merged at the patch commit.&lt;br /&gt;
&lt;br /&gt;
The third part is the diff, using unified diff, -p1 format. It is typically generated by a &amp;quot;git diff&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
Note: on the above, ''Some User'', ''Patch Developer'' and ''Patch Reviewer'' should be the full email of real persons, in the form: ''some name &amp;lt;some email&amp;gt;''.&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:54:16Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission email ==&lt;br /&gt;
&lt;br /&gt;
The following example (part of a real patch submission) shows, in practice, how&lt;br /&gt;
a good patch should look like:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Reviewed-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
  ---&lt;br /&gt;
  &lt;br /&gt;
   v2: Coding Style fixed, as per-review.&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/platform/davinci/vpif_capture.c |    1 +&lt;br /&gt;
   1 file changed, 1 insertion(+)&lt;br /&gt;
&lt;br /&gt;
  diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  index 13aa46d..0bafeca 100644&lt;br /&gt;
  --- a/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  +++ b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  @@ -339,6 +339,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)&lt;br /&gt;
   	 * Set interrupt for both the fields in VPIF Register enable channel in&lt;br /&gt;
   	 * VPIF register&lt;br /&gt;
   	 */&lt;br /&gt;
  +	channel_first_int[VPIF_VIDEO_INDEX][ch-&amp;gt;channel_id] = 1;&lt;br /&gt;
   	if ((VPIF_CHANNEL0_VIDEO == ch-&amp;gt;channel_id)) {&lt;br /&gt;
   		channel0_intr_assert();&lt;br /&gt;
   		channel0_intr_enable(1);&lt;br /&gt;
&lt;br /&gt;
The fist part contains the email header and the first part of the email body, with the patch description, followed by Signed-off/Reviewed-by/Acked-By tags. &lt;br /&gt;
&lt;br /&gt;
Note: For patches submitted by one person, but authored by another one, the '''first line''' of the email body should contain a ''From:'' tag with the name and email of the original author. For example, if the above e-mail is sent by ''Patch Reviewer'', it would contain, instead:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Reviewer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
    &lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Signed-off-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
The second part is optional, separated by &amp;quot;---&amp;quot;, contains the patch diffstat. It can also contain any notice for the patch reviewers to read. The second part won't be merged at the patch commit.&lt;br /&gt;
&lt;br /&gt;
The third part is the diff, using unified diff, -p1 format. It is typically generated by a &amp;quot;git diff&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
Note: on the above, ''Some User'', ''Patch Developer'' and ''Patch Reviewer'' should be the full email of real persons, in the form: ''some name &amp;lt;some email&amp;gt;''.&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:53:18Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission email ==&lt;br /&gt;
&lt;br /&gt;
The following example (part of a real patch submission) shows, in practice, how&lt;br /&gt;
a good patch should look like:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Signed-off-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
  ---&lt;br /&gt;
  &lt;br /&gt;
   v2: Coding Style fixed, as per-review.&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/platform/davinci/vpif_capture.c |    1 +&lt;br /&gt;
   1 file changed, 1 insertion(+)&lt;br /&gt;
&lt;br /&gt;
  diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  index 13aa46d..0bafeca 100644&lt;br /&gt;
  --- a/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  +++ b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  @@ -339,6 +339,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)&lt;br /&gt;
   	 * Set interrupt for both the fields in VPIF Register enable channel in&lt;br /&gt;
   	 * VPIF register&lt;br /&gt;
   	 */&lt;br /&gt;
  +	channel_first_int[VPIF_VIDEO_INDEX][ch-&amp;gt;channel_id] = 1;&lt;br /&gt;
   	if ((VPIF_CHANNEL0_VIDEO == ch-&amp;gt;channel_id)) {&lt;br /&gt;
   		channel0_intr_assert();&lt;br /&gt;
   		channel0_intr_enable(1);&lt;br /&gt;
&lt;br /&gt;
The fist part contains the email header and the first part of the email body, with the patch description, followed by Signed-off/Reviewed-by/Acked-By tags. &lt;br /&gt;
&lt;br /&gt;
Note: For patches submitted by one person, but authored by another one, the '''first line''' of the email body should contain a ''From:'' tag with the name and email of the original author. For example, if the above e-mail is sent by ''Patch Reviewer'', it would contain, instead:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Reviewer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
    &lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Signed-off-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
The second part is optional, separated by &amp;quot;---&amp;quot;, contains the patch diffstat. It can also contain any notice for the patch reviewers to read. The second part won't be merged at the patch commit.&lt;br /&gt;
&lt;br /&gt;
The third part is the diff, using unified diff, -p1 format. It is typically generated by a &amp;quot;git diff&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
Note: on the above, ''Some User'', ''Patch Developer'' and ''Patch Reviewer'' should be the full email of real persons, in the form: ''some name &amp;lt;some email&amp;gt;''.&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:52:16Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission email ==&lt;br /&gt;
&lt;br /&gt;
The following example (part of a real patch submission) shows, in practice, how&lt;br /&gt;
a good patch should look like:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Signed-off-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
  ---&lt;br /&gt;
  &lt;br /&gt;
   v2: Coding Style fixed, as per-review.&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/platform/davinci/vpif_capture.c |    1 +&lt;br /&gt;
   1 file changed, 1 insertion(+)&lt;br /&gt;
&lt;br /&gt;
  diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  index 13aa46d..0bafeca 100644&lt;br /&gt;
  --- a/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  +++ b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  @@ -339,6 +339,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)&lt;br /&gt;
   	 * Set interrupt for both the fields in VPIF Register enable channel in&lt;br /&gt;
   	 * VPIF register&lt;br /&gt;
   	 */&lt;br /&gt;
  +	channel_first_int[VPIF_VIDEO_INDEX][ch-&amp;gt;channel_id] = 1;&lt;br /&gt;
   	if ((VPIF_CHANNEL0_VIDEO == ch-&amp;gt;channel_id)) {&lt;br /&gt;
   		channel0_intr_assert();&lt;br /&gt;
   		channel0_intr_enable(1);&lt;br /&gt;
&lt;br /&gt;
The fist part contains the email header and the first part of the email body, with the patch description, followed by Signed-off/Reviewed-by/Acked-By tags. &lt;br /&gt;
&lt;br /&gt;
Note: For patches submitted by one person, but authored by another one, the '''first line''' of the email body should contain a ''From:'' tag with the name and email of the original author. For example, if the above e-mail is sent by Patch Reviewer, it would contain, instead:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Reviewer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
    &lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Signed-off-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
The second part is optional, separated by &amp;quot;---&amp;quot;, contains the patch diffstat. It can also contain any notice for the patch reviewers to read. The second part won't be merged at the patch commit.&lt;br /&gt;
&lt;br /&gt;
The third part is the diff, using unified diff, -p1 format. It is typically generated by a &amp;quot;git diff&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
Note: on the above, ''Some User'', ''Patch Developer'' and ''Patch Reviewer'' should be the full email of real persons, in the form: ''some name &amp;lt;some email&amp;gt;''.&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:51:25Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission email ==&lt;br /&gt;
&lt;br /&gt;
The following example (part of a real patch submission) shows, in practice, how&lt;br /&gt;
a good patch should look like:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Signed-off-by: Patch Reviewer&lt;br /&gt;
  &lt;br /&gt;
  ---&lt;br /&gt;
  &lt;br /&gt;
   v2: Coding Style fixed, as per-review.&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/platform/davinci/vpif_capture.c |    1 +&lt;br /&gt;
   1 file changed, 1 insertion(+)&lt;br /&gt;
&lt;br /&gt;
  diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  index 13aa46d..0bafeca 100644&lt;br /&gt;
  --- a/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  +++ b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  @@ -339,6 +339,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)&lt;br /&gt;
   	 * Set interrupt for both the fields in VPIF Register enable channel in&lt;br /&gt;
   	 * VPIF register&lt;br /&gt;
   	 */&lt;br /&gt;
  +	channel_first_int[VPIF_VIDEO_INDEX][ch-&amp;gt;channel_id] = 1;&lt;br /&gt;
   	if ((VPIF_CHANNEL0_VIDEO == ch-&amp;gt;channel_id)) {&lt;br /&gt;
   		channel0_intr_assert();&lt;br /&gt;
   		channel0_intr_enable(1);&lt;br /&gt;
&lt;br /&gt;
The fist part contains the email header and the first part of the email body, with the patch description, followed by Signed-off/Reviewed-by/Acked-By tags. &lt;br /&gt;
&lt;br /&gt;
Note: For patches submitted by one person, but authored by another one, the '''first line''' of the email body should contain a ''From:'' tag with the name and email of the original author. For example, if the above e-mail is sent by Patch Reviewer, it would contain, instead:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Reviewer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
    &lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Signed-off-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
The second part is optional, separated by &amp;quot;---&amp;quot;, contains the patch diffstat. It can also contain any notice for the patch reviewers to read. The second part won't be merged at the patch commit.&lt;br /&gt;
&lt;br /&gt;
The third part is the diff, using unified diff, -p1 format. It is typically generated by a &amp;quot;git diff&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
Note: on the above, ''Some User'', ''Patch Developer'' and ''Patch Reviewer'' should be the full email of real persons, in the form: ''some name &amp;lt;some email&amp;gt;''.&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:46:08Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission email ==&lt;br /&gt;
&lt;br /&gt;
The following example (part of a real patch submission) shows, in practice, how&lt;br /&gt;
a good patch should look like:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Signed-off-by: Patch Reviewer&lt;br /&gt;
  &lt;br /&gt;
  ---&lt;br /&gt;
  &lt;br /&gt;
   v2: Coding Style fixed, as per-review.&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/platform/davinci/vpif_capture.c |    1 +&lt;br /&gt;
   1 file changed, 1 insertion(+)&lt;br /&gt;
&lt;br /&gt;
  diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  index 13aa46d..0bafeca 100644&lt;br /&gt;
  --- a/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  +++ b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  @@ -339,6 +339,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)&lt;br /&gt;
   	 * Set interrupt for both the fields in VPIF Register enable channel in&lt;br /&gt;
   	 * VPIF register&lt;br /&gt;
   	 */&lt;br /&gt;
  +	channel_first_int[VPIF_VIDEO_INDEX][ch-&amp;gt;channel_id] = 1;&lt;br /&gt;
   	if ((VPIF_CHANNEL0_VIDEO == ch-&amp;gt;channel_id)) {&lt;br /&gt;
   		channel0_intr_assert();&lt;br /&gt;
   		channel0_intr_enable(1);&lt;br /&gt;
&lt;br /&gt;
The fist part contains the email header and the first part of the email body, with the patch description, followed by Signed-off/Reviewed-by/Acked-By tags. &lt;br /&gt;
&lt;br /&gt;
Note: For patches submitted by one person, but authored by another one, the '''first line''' of the email body should contain a ''From:'' tag with the name and email of the original author. For example, if the above e-mail is sent by Patch Reviewer, it would contain, instead:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Reviewer&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
    &lt;br /&gt;
  From: Patch Developer&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User&lt;br /&gt;
  Signed-off-by: Patch Developer&lt;br /&gt;
  Signed-off-by: Patch Reviewer&lt;br /&gt;
&lt;br /&gt;
The second part is optional, separated by &amp;quot;---&amp;quot;, contains the patch diffstat. It can also contain any notice for the patch reviewers to read. The second part won't be merged at the patch commit.&lt;br /&gt;
&lt;br /&gt;
The third part is the diff, using unified diff, -p1 format. It is typically generated by a &amp;quot;git diff&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:35:55Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission email ==&lt;br /&gt;
&lt;br /&gt;
The following example (part of a real patch submission) shows, in practice, how&lt;br /&gt;
a good patch should look like:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Developer &amp;lt;patch@developer.com&amp;gt;&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User &amp;lt;some@user.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Patch Developer &amp;lt;patch@developer.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Patch Reviewer &amp;lt;patch@reviewer.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  ---&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/platform/davinci/vpif_capture.c |    1 +&lt;br /&gt;
   1 file changed, 1 insertion(+)&lt;br /&gt;
&lt;br /&gt;
  diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  index 13aa46d..0bafeca 100644&lt;br /&gt;
  --- a/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  +++ b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  @@ -339,6 +339,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)&lt;br /&gt;
   	 * Set interrupt for both the fields in VPIF Register enable channel in&lt;br /&gt;
   	 * VPIF register&lt;br /&gt;
   	 */&lt;br /&gt;
  +	channel_first_int[VPIF_VIDEO_INDEX][ch-&amp;gt;channel_id] = 1;&lt;br /&gt;
   	if ((VPIF_CHANNEL0_VIDEO == ch-&amp;gt;channel_id)) {&lt;br /&gt;
   		channel0_intr_assert();&lt;br /&gt;
   		channel0_intr_enable(1);&lt;br /&gt;
&lt;br /&gt;
The fist part contains the email header and the first part of the email body, with the patch description, followed by Signed-off/Reviewed-by/Acked-By tags. &lt;br /&gt;
&lt;br /&gt;
Note: For patches submitted by one person, but authored by another one, the '''first line''' of the email body should contain a ''From:'' tag with the name and email of the original author. For example, if the above e-mail is sent by Patch Reviewer, it would contain, instead:&lt;br /&gt;
&lt;br /&gt;
  From: Patch Reviewer &amp;lt;patch@reviewer.com&amp;gt;&lt;br /&gt;
  Date: Thu, 27 Sep 2012 05:32:52 -0300&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
    &lt;br /&gt;
  From: Patch Developer &amp;lt;patch@developer.com&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: Some User &amp;lt;some@user.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Patch Developer &amp;lt;patch@developer.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Patch Reviewer &amp;lt;patch@reviewer.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second part is optional, separated by &amp;quot;---&amp;quot;, contains the patch diffstat. It can also contain any notice for the patch reviewers to read. The second part won't be merged at the patch commit.&lt;br /&gt;
&lt;br /&gt;
The third part is the diff, using unified diff, -p1 format. It is typically generated by a &amp;quot;git diff&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:26:31Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission email ==&lt;br /&gt;
&lt;br /&gt;
The following example (part of a real patch submission) shows, in practice, how&lt;br /&gt;
a good patch should look like:&lt;br /&gt;
&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: David Oleszkiewicz &amp;lt;doleszki@adsyscontrols.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Lad, Prabhakar &amp;lt;prabhakar.lad@ti.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Manjunath Hadli &amp;lt;manjunath.hadli@ti.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  ---&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/platform/davinci/vpif_capture.c |    1 +&lt;br /&gt;
   1 file changed, 1 insertion(+)&lt;br /&gt;
&lt;br /&gt;
  diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  index 13aa46d..0bafeca 100644&lt;br /&gt;
  --- a/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  +++ b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  @@ -339,6 +339,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)&lt;br /&gt;
   	 * Set interrupt for both the fields in VPIF Register enable channel in&lt;br /&gt;
   	 * VPIF register&lt;br /&gt;
   	 */&lt;br /&gt;
  +	channel_first_int[VPIF_VIDEO_INDEX][ch-&amp;gt;channel_id] = 1;&lt;br /&gt;
   	if ((VPIF_CHANNEL0_VIDEO == ch-&amp;gt;channel_id)) {&lt;br /&gt;
   		channel0_intr_assert();&lt;br /&gt;
   		channel0_intr_enable(1);&lt;br /&gt;
&lt;br /&gt;
The fist part contains the email subject, and the patch description, followed by Signed-off/Reviewed-by/Acked-By tags. For patches submitted by one person, but authored by another one, the '''first line''' of the email body should contain a ''From:'' tag with the name and email of the original author (like ''From: someone &amp;lt;at@some.addr&amp;gt;'').&lt;br /&gt;
&lt;br /&gt;
The second part is optional, separated by &amp;quot;---&amp;quot;, contains the patch diffstat. It can also contain any notice for the patch reviewers to read. The second part won't be merged at the patch commit.&lt;br /&gt;
&lt;br /&gt;
The third part is the diff, using unified diff, -p1 format. It is typically generated by a &amp;quot;git diff&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:25:42Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission email ==&lt;br /&gt;
&lt;br /&gt;
The following example (part of a real patch submission) shows, in practice, how&lt;br /&gt;
a good patch should look like:&lt;br /&gt;
&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: David Oleszkiewicz &amp;lt;doleszki@adsyscontrols.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Lad, Prabhakar &amp;lt;prabhakar.lad@ti.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Manjunath Hadli &amp;lt;manjunath.hadli@ti.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  ---&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/platform/davinci/vpif_capture.c |    1 +&lt;br /&gt;
   1 file changed, 1 insertion(+)&lt;br /&gt;
&lt;br /&gt;
  diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  index 13aa46d..0bafeca 100644&lt;br /&gt;
  --- a/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  +++ b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  @@ -339,6 +339,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)&lt;br /&gt;
   	 * Set interrupt for both the fields in VPIF Register enable channel in&lt;br /&gt;
   	 * VPIF register&lt;br /&gt;
   	 */&lt;br /&gt;
  +	channel_first_int[VPIF_VIDEO_INDEX][ch-&amp;gt;channel_id] = 1;&lt;br /&gt;
   	if ((VPIF_CHANNEL0_VIDEO == ch-&amp;gt;channel_id)) {&lt;br /&gt;
   		channel0_intr_assert();&lt;br /&gt;
   		channel0_intr_enable(1);&lt;br /&gt;
&lt;br /&gt;
The fist part contains the email subject, and the patch description, followed by Signed-off/Reviewed-by/Acked-By tags. For patches submitted by one person, but authored by another one, the '''first''' line of the email body should contain a From: tag with the name and email of the original author (like &amp;quot;From: someone &amp;lt;at@some.addr&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
The second part is optional, separated by &amp;quot;---&amp;quot;, contains the patch diffstat. It can also contain any notice for the patch reviewers to read. The second part won't be merged at the patch commit.&lt;br /&gt;
&lt;br /&gt;
The third part is the diff, using unified diff, -p1 format. It is typically generated by a &amp;quot;git diff&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:22:26Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission email ==&lt;br /&gt;
&lt;br /&gt;
The following example (part of a real patch submission) shows, in practice, how&lt;br /&gt;
a good patch should look like:&lt;br /&gt;
&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: David Oleszkiewicz &amp;lt;doleszki@adsyscontrols.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Lad, Prabhakar &amp;lt;prabhakar.lad@ti.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Manjunath Hadli &amp;lt;manjunath.hadli@ti.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  ---&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/platform/davinci/vpif_capture.c |    1 +&lt;br /&gt;
   1 file changed, 1 insertion(+)&lt;br /&gt;
&lt;br /&gt;
  diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  index 13aa46d..0bafeca 100644&lt;br /&gt;
  --- a/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  +++ b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  @@ -339,6 +339,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)&lt;br /&gt;
   	 * Set interrupt for both the fields in VPIF Register enable channel in&lt;br /&gt;
   	 * VPIF register&lt;br /&gt;
   	 */&lt;br /&gt;
  +	channel_first_int[VPIF_VIDEO_INDEX][ch-&amp;gt;channel_id] = 1;&lt;br /&gt;
   	if ((VPIF_CHANNEL0_VIDEO == ch-&amp;gt;channel_id)) {&lt;br /&gt;
   		channel0_intr_assert();&lt;br /&gt;
   		channel0_intr_enable(1);&lt;br /&gt;
&lt;br /&gt;
The fist part contains the email subject, and the patch description, followed by Signed-off/Reviewed-by/Acked-By tags.&lt;br /&gt;
&lt;br /&gt;
The second part is optional, separated by &amp;quot;---&amp;quot;, contains the patch diffstat. It can also contain any notice for the patch reviewers to read. The second part won't be merged at the patch commit.&lt;br /&gt;
&lt;br /&gt;
The third part is the diff, using unified diff, -p1 format. It is typically generated by a &amp;quot;git diff&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:16:41Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission email ==&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: David Oleszkiewicz &amp;lt;doleszki@adsyscontrols.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Lad, Prabhakar &amp;lt;prabhakar.lad@ti.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Manjunath Hadli &amp;lt;manjunath.hadli@ti.com&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
---&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/platform/davinci/vpif_capture.c |    1 +&lt;br /&gt;
   1 file changed, 1 insertion(+)&lt;br /&gt;
&lt;br /&gt;
  diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  index 13aa46d..0bafeca 100644&lt;br /&gt;
  --- a/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  +++ b/drivers/media/platform/davinci/vpif_capture.c&lt;br /&gt;
  @@ -339,6 +339,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)&lt;br /&gt;
   	 * Set interrupt for both the fields in VPIF Register enable channel in&lt;br /&gt;
   	 * VPIF register&lt;br /&gt;
   	 */&lt;br /&gt;
  +	channel_first_int[VPIF_VIDEO_INDEX][ch-&amp;gt;channel_id] = 1;&lt;br /&gt;
   	if ((VPIF_CHANNEL0_VIDEO == ch-&amp;gt;channel_id)) {&lt;br /&gt;
   		channel0_intr_assert();&lt;br /&gt;
   		channel0_intr_enable(1);&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:13:12Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example of a good patch submission */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission ==&lt;br /&gt;
  Subject: [PATCH] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: David Oleszkiewicz &amp;lt;doleszki@adsyscontrols.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Lad, Prabhakar &amp;lt;prabhakar.lad@ti.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Manjunath Hadli &amp;lt;manjunath.hadli@ti.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches</id>
		<title>Development: How to submit patches</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches"/>
				<updated>2012-09-27T08:12:48Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Patch Preparation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article provides an overview for submitting patches against the [[What is V4L or DVB?|V4L-DVB source code]] (for either new or existing kernel driver modules and/or documentation), and as well as for the [[LinuxTV dvb-apps|dvb-apps]] source.  For general references in regards as to how to develop support for a particular device or in writing a new device driver, see [[Development: How to add support for a device|here]].&lt;br /&gt;
&lt;br /&gt;
== Patch Preparation ==&lt;br /&gt;
For V4L-DVB driver modules and/or documentation, patches should be created against the [http://git.linuxtv.org/media_tree.git master linux-media git tree]; for instructions on obtaining and building these sources, see the &amp;quot;[[How to Obtain, Build and Install V4L-DVB Device Drivers]]&amp;quot; article.  Similarly, for submissions related to the dvb-apps, one should patch against the [http://linuxtv.org/hg/dvb-apps dvb-apps ''mercurial'' tree]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The patch should contain an unified diff between the latest code at the tree and the code you modified. The best way to do it is by running the command ''git diff'' or ''hg diff''. Before submitting your patch, please run ''make checkpatch''. This will tell the build system to run a script that checks for coding style violations.&lt;br /&gt;
&lt;br /&gt;
Post your patches to the [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] for review and testing. [http://vger.kernel.org/vger-lists.html#linux-media Subscription to the mailing list] is recommended, though it is not required.&lt;br /&gt;
&lt;br /&gt;
Follow the guidelines in [[Development: Submitting Patches|Submitting Patches]] (cf. [http://linux.yyz.us/patch-format.html jgarzik's version]), including:&lt;br /&gt;
:* Verify best-practice [[Development: Coding Style|kernel coding style]]&lt;br /&gt;
:* Use [PATCH] in the subject line to get attention ... '''Note''': the patchwork tool (discussed below) actually does NOT rely upon this label for detection of patches; rather, patchwork utilizes logic algorithms to detect for the presence of a patch within an email message.  That being the case, the &amp;quot;[PATCH]&amp;quot; flag serves only to alert your human counterparts/peers on the mailing list of your submission&lt;br /&gt;
:* Explain what the patch does and to what hardware it applies.  Note: All comments you add on your patch will be part of the commit message (except for the meta-tags)&lt;br /&gt;
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files) &lt;br /&gt;
:* Add a '''Signed-off-by: Your name &amp;lt;name@yoursite.com&amp;gt;''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]&lt;br /&gt;
:* Send the patch inline, not as an attachment (unless otherwise asked to do so) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/email-clients.txt&amp;lt;/code&amp;gt; file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).&lt;br /&gt;
:* '''Note''': various web mail interfaces seem to be problematic for patch submission, in that:&lt;br /&gt;
:** they may break the patch (e.g. line wrapping it) or&lt;br /&gt;
:** in the case where you have sent the patch as an attachment, the emailer may use the wrong mime encoding type ... (web mailers often wrongly use &amp;quot;application/octet-stream&amp;quot; for diffs, whereas the proper type is &amp;quot;text/x-patch&amp;quot; ... Note: the patchwork tool (discussed below) is robust in that it supports both mime types &amp;quot;text/x-patch&amp;quot; and &amp;quot;text/plain&amp;quot;, but if the emailer has sent it with a different type, the attachment will be disregarded/discarded.&lt;br /&gt;
&lt;br /&gt;
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example of a good patch submission ==&lt;br /&gt;
  Subject: [PATCH] [media] davinci: vpif: capture/display: fix race condition&lt;br /&gt;
  &lt;br /&gt;
  channel_first_int[][] variable is used as a flag for the ISR,&lt;br /&gt;
  This flag was being set after enabling the interrupts, There&lt;br /&gt;
  where situations when the isr occurred even before the flag was set&lt;br /&gt;
  due to which it was causing the application hang.&lt;br /&gt;
  This patch sets  channel_first_int[][] flag just before enabling the&lt;br /&gt;
  interrupt.&lt;br /&gt;
  &lt;br /&gt;
  Reported-by: David Oleszkiewicz &amp;lt;doleszki@adsyscontrols.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Lad, Prabhakar &amp;lt;prabhakar.lad@ti.com&amp;gt;&lt;br /&gt;
  Signed-off-by: Manjunath Hadli &amp;lt;manjunath.hadli@ti.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firmware submission ==&lt;br /&gt;
&lt;br /&gt;
Some devices may require [[Firmware|firmware(s)]] in order for the device drivers to work properly. In such cases, if the firmware is not already available, some sort of procedure is needed so that end users may make use of the driver.&lt;br /&gt;
&lt;br /&gt;
In the spirit of Open Source Software (OSS) development and distribution, it is most preferable if the firmware can be provided by submitting it as open source code, licenced under the GPL.  Making the firmware open source facilitates tremendous advantages when it comes to debugging problems (i.e. the concept of many eyes to spot the trouble spots). Unfortunately, very few firmwares are submitted with sources, and, to be sure, this is certainly not a mandatory requirement.  Indeed, as it currently stands, most firmware are instead provided in a binary format.  However, there is an associated problem with distributing firmware as a closed source &amp;quot;binary blob&amp;quot; -- namely, for it to be made available within Linux distributions, it is required that each firmware should be provided with the distribution and redistribution rights, given specifically by the device or chipset manufacturer.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are a device vendor or original chipset manufacturer and wish to submit the requisite firmware for inclusion within Linux distributions, in order to do so, please email the [mailto://linux-media@vger.kernel.org Linux Media Mailing List (LMML)], and/or to [mailto:mchehab@infradead.org Mauro (the V4L/DVB Maintainer)], sending copies of the firmware files and the appropriate license terms. &lt;br /&gt;
&lt;br /&gt;
If the licensing terms are deemed acceptable for legally permitting wide redistribution of the firmware software, then the firmware files will be added at the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git V4L/DVB Linux-firmware git tree] and submitted to the upstream Linux-firmware tree.&lt;br /&gt;
&lt;br /&gt;
Note that there is no unique model for firmware licensing, but there are some examples provided within the [http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-firmware.git;a=blob_plain;f=WHENCE;hb=HEAD WHENCE] file and within the several LICENCE files avaiable at the tree. The most common models for non GPL'd firmwares are: &lt;br /&gt;
:* [[firmware model1]]&lt;br /&gt;
:* [[firmware model2]]&lt;br /&gt;
There are also some existing examples of firmwares released as Open Source Software:&lt;br /&gt;
:* [[GPL model]]&lt;br /&gt;
:* [[Cinergy T2 license]]&lt;br /&gt;
&lt;br /&gt;
== After you've Submitted: What happens Next? ==&lt;br /&gt;
In conjunction with the move to the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.linuxtv.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here] and [http://www.linuxtv.org/news.php?entry=2011-09-18.mchehab here]).  In the past, it was, unfortunately, not uncommon for patches to be overlooked and become lost on the V4L-DVB mailing lists; thus making the adoption of the patchwork tool a very welcome addition.  So, provided you have correctly submitted your patch (as discussed above), the steps towards having your code adopted will have automatically been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].  If patchwork has not picked up your patch (after a reasonable period of time has elapsed), it is quite probable that your submission was incorrect for some reason; please review the information contained in the above section and try again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 0.5em; background-color: Lavender;&amp;quot;&amp;gt;&amp;quot;The most difficult problem isn't fixing bugs, but fixing bugs without breaking other configurations.  There are many: different cards, different TV norms, whereas most of the developers can test only one TV norm.&amp;quot; - Gerd Knorr&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After being picked up by patchwork, the first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties.  This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the same steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)&lt;br /&gt;
&lt;br /&gt;
Then, when your patch is accepted, it will initially be applied to the main linux-media git tree.  Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and, upon request, periodically pulled by Linus into one of his own git trees in an intermediate step towards final inclusion into the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers</id>
		<title>How to Obtain, Build and Install V4L-DVB Device Drivers</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers"/>
				<updated>2012-04-11T19:34:05Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Retrieving and Building/Compiling the Latest V4L-DVB Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The LinuxTV project hosts the latest set of Linux kernel driver modules for [[What is V4L or DVB?|V4L-DVB devices]]. This page contains information to help an &amp;quot;end user&amp;quot; install these device drivers in a GNU/Linux system.  &lt;br /&gt;
&lt;br /&gt;
{{Note|This article assumes that:&lt;br /&gt;
* your device is actually supported by the drivers -- Just because your board happens to have a chip on it that corresponds to some existing driver does NOT mean your product is supported.  The driver has to be aware that it's related to some hardware (typically through the [[Supported_Hardware#Determining_the_Device's_Identity|subsystem ID from the USB ID or PCI ID]]). If the driver doesn't recognize/bind to your particular hardware, then the module will probably load but then proceed to not do anything. In other words, support for your device would have to be added to the driver.&lt;br /&gt;
* you have already physically installed the hardware device into, or connected it to, your system. (Refer to the manufacturer's instructions for such details)}}.&lt;br /&gt;
&lt;br /&gt;
== Software Requirements ==&lt;br /&gt;
===Kernel Support===&lt;br /&gt;
The LinuxTV V4L-DVB drivers will work only in conjunction with relatively modern 2.6 kernels; specifically, &lt;br /&gt;
&lt;br /&gt;
{{Note|CityK here:  I have no clue as to where the current backwards compatibility status stands.  Suffice to say, more modern kernels (which I'd define as ~2.6.32 and newer) are much more likely to work with the new media_build snapshots of the git tree.  When the situation is more clear, please update this section accordingly.}}&lt;br /&gt;
&lt;br /&gt;
===Additional Software Requrirements===&lt;br /&gt;
In order to be able to build the V4L-DVB kernel driver modules, you will need: &lt;br /&gt;
* kernel-source or kernel-headers&lt;br /&gt;
* (OpenSuSE and fedora only) kernel-devel&lt;br /&gt;
* (Debian) libdigest-sha1-perl&lt;br /&gt;
* make &lt;br /&gt;
* gcc&lt;br /&gt;
* git&lt;br /&gt;
* patch&lt;br /&gt;
* patchutils&lt;br /&gt;
* libproc-processtable-perl (&amp;quot;perl-Proc-ProcessTable&amp;quot;)&lt;br /&gt;
If these packages are not currently installed on your system, you should do so now.&lt;br /&gt;
&lt;br /&gt;
==Retrieving and Building/Compiling the Latest V4L-DVB Source Code==&lt;br /&gt;
There are a couple of different methods by which you can obtain and build the latest source code.  Regardless of which route you take, all are performed from the command line within a console.  The &amp;quot;basic&amp;quot; method is likely appropriate for most end users, though, in some cases, some users will have to use the slightly more &amp;quot;manually intensive&amp;quot; approach.  This second approach is effectively, for all intents and purposes, really just the same as the &amp;quot;basic&amp;quot; method, but performing the steps in a piecemeal fashion affords you the opportunity to tailor the source code or the &amp;quot;make&amp;quot;/build process as might be required in your particular situation. Again, before proceeding with either approach, make sure you have installed all the prerequisite software listed above.&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are using Ubuntu, you were previously very likely to run into a fatal compilation error within the v4l-dvb build process when it reaches the firedtv module.  The reason for this is because Ubuntu had a bug in their packaging of the kernel headers. &amp;lt;b&amp;gt;This seems to be fixed&amp;lt;/b&amp;gt; on a fully updated systtem (5 July 2011) This was a long standing issue, and one of the most frequently reported on the mailing list.   &amp;lt;br&amp;gt;&lt;br /&gt;
If you still have the problem, you should be able to correct this compilation problem by following the more manual procedure listed below.  In particular, before proceeding to build the modules, you will have to edit the file ''v4l/.config'' and change the line for the firedtv driver from &amp;lt;nowiki&amp;gt;&amp;quot;firedtv=m&amp;quot; to &amp;quot;firedtv=n&amp;quot;&amp;lt;/nowiki&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are having build failures like &amp;quot;implicit declaration of function 'mfd_get_data'&amp;quot; try editing v4l/Makefile.media, and just comment out anything related to CONFIG_*_TIMBERALE.  [[http://sourceforge.net/mailarchive/message.php?msg_id=27353778 Source]] }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+'''Retreiving the Source Code &amp;amp; Building/Compiling the Modules'''&lt;br /&gt;
|-&lt;br /&gt;
! &amp;quot;Basic&amp;quot; Approach !! Developer's Approach !! More &amp;quot;Manually Intensive&amp;quot; Approach&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| valign=top |&lt;br /&gt;
 git clone git://linuxtv.org/media_build.git&lt;br /&gt;
 cd media_build &lt;br /&gt;
 ./build&lt;br /&gt;
&lt;br /&gt;
These commands will download the newest tarball of the source code from linuxtv.org, apply the backport patches to it and then build/compile the source via the included script build.sh.  &lt;br /&gt;
&lt;br /&gt;
NB: to add a patch copy the .patch file to the backports directory, and add the patch file as a line to the {kernel-version}_series file in the packports dir.&lt;br /&gt;
| valign=top |&lt;br /&gt;
 ~ $ git clone git://linuxtv.org/media_build.git&lt;br /&gt;
 ~ $ cd media_build &lt;br /&gt;
 ~/media_build $./build --main-git&lt;br /&gt;
{{Note|'''The build script will clone the entire media-tree.git, with will take some time'''}}&lt;br /&gt;
 &lt;br /&gt;
In order to modify a driver foo.c:&lt;br /&gt;
&lt;br /&gt;
 ~/media_build $ cd media&lt;br /&gt;
 ~/media $ gedit drivers/media/video/foo.c&lt;br /&gt;
 ~/media $ make -C ../v4l&lt;br /&gt;
 ~/media $ make -C ../ install&lt;br /&gt;
 ~/media $ make -C .. rmmod&lt;br /&gt;
 ~/media $ modprobe foo&lt;br /&gt;
&lt;br /&gt;
 (some procedure to test the &amp;quot;foo&amp;quot; driver)&lt;br /&gt;
&lt;br /&gt;
To generate a patch, use:&lt;br /&gt;
&lt;br /&gt;
 ~/media $ git commit -as&lt;br /&gt;
&lt;br /&gt;
Then submit the patch upstream. If your sendmail is properly configured, you can easily send the patch upstream with:&lt;br /&gt;
&lt;br /&gt;
 ~/media $ git send-email HEAD^1&lt;br /&gt;
&lt;br /&gt;
or, to send a patch series:&lt;br /&gt;
&lt;br /&gt;
 ~/media $ git send-email ''initial_branch''&lt;br /&gt;
&lt;br /&gt;
Where ''initial_branch'' is the name of a branch of a changeset number for the last patch before your changes.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
 git clone git://linuxtv.org/media_build.git&lt;br /&gt;
 cd media_build/linux&lt;br /&gt;
 make tar DIR=&amp;lt;some dir with media -git tree&amp;gt;&lt;br /&gt;
 make untar&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
If you need to make any sort of change or modification to the source code, now is the time. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 1em; background-color: Lavender;&amp;quot;&amp;gt;&lt;br /&gt;
'''Optional Pre-Compilation Steps'''&amp;lt;br&amp;gt;&lt;br /&gt;
These optional command steps are applicable only in certain situations approaching a new build of the driver set, or for experienced users wishing to streamline the build process to consist of only those components they want to install.&lt;br /&gt;
* &amp;lt;code&amp;gt;make rminstall&amp;lt;/code&amp;gt;  ... you would use this to remove the currently installed driver set (located within the relevant ''/lib/modules/[&amp;quot;kernel version&amp;quot;]/kernel/drivers/media'' directory to which they were installed)&lt;br /&gt;
* &amp;lt;code&amp;gt;make distclean&amp;lt;/code&amp;gt; ... cleans up the build configuration environment ... noteworthy is that it will set things up such that a following &amp;quot;make&amp;quot; build process will be against &amp;quot;''/usr/src/[uname -r]''” kernel source&lt;br /&gt;
* &amp;lt;code&amp;gt;make menuconfig&amp;lt;/code&amp;gt; ... this will open up the ncurses based menu that allows you to select only those components you wish to build and install&lt;br /&gt;
&lt;br /&gt;
The building system offers some other make targets that may be useful for advanced users or developers. For listing the supported targets, please use &amp;lt;code&amp;gt;make help&amp;lt;/code&amp;gt;.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, build/compile the modules from the source code with the command:&lt;br /&gt;
 make&lt;br /&gt;
{{Note|For multi-core processor systems, the ''make'' command has available options that can be beneficial in terms of the reducing the amount of time required for the process' completion.  Specifically, you can run &amp;quot;''make -jN''&amp;quot; (where &amp;quot;''N''&amp;quot; &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;  1 + the number of cores your cpu has ... i.e. if you have a dual core cpu use: ''make -j3'' )}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===Information Regarding the Build Process===&lt;br /&gt;
Generally, this step will tend to take a while to complete; being dependent upon both the number of modules being built and your system's processing power.&lt;br /&gt;
&lt;br /&gt;
You can monitor the build progress via the console output. You will notice that a ''/v4l'' directory will have been created and within which the completed *.ko module files are written.  Some drivers included within the snapshot may have their own requirements in regards to the kernel that you must be running in order for the module to be built; such cases can be found listed at the beginning of the build process' console output.&lt;br /&gt;
&lt;br /&gt;
The entire build process should complete without error.  If any errors are encountered, the compilation will be halted and, at this point, you should not attempt to proceed any further (unless you really, really enjoy experiencing the outcome of a preordained failure).  Errors that prevent building a particular V4L-DVB snapshot do indeed surface from time to time, but these are usually corrected quickly upon notification from an end user submitted [[Bug Report|bug report]], or upon detection from the daily automated build tests (see note below).  If you have run into a build error via the &amp;quot;basic&amp;quot; approach outlined above, you may wish to see if you can remedy the error and attempt a module build via the more &amp;quot;manually intensive&amp;quot; approach also outlined above.&lt;br /&gt;
&lt;br /&gt;
{{Note|'''The Daily Automated Build Tests'''&amp;lt;br&amp;gt;&lt;br /&gt;
Hans Verkuil has set up an automated daily build of the V4L-DVB source code upon all supported kernels, as well as testing that very same upon several CPU architectures.  A brief synopsis of the results from those tests is published each day on the Linux-Media Mailing List (LMML) under a message subject heading prefix of &amp;quot;''[cron job] v4l-dvb daily build ...''&amp;quot;.  A link to more detailed results of these tests is also provided within that message or can be found directly from [http://www.xs4all.nl/~hverkuil/logs/ here].}}  &lt;br /&gt;
&lt;br /&gt;
If you do run into any problems during the build step, you should:&lt;br /&gt;
* first, see whether the issue is already known or not -- consult the results of the daily automated build tests (see note above)&lt;br /&gt;
* if it appears that this is a new issue, please [[Bug Report|inform the developers of the bug via the LMML]] (preferred) or thorough one of the irc.freenode.net irc channels (#v4l or #linuxtv or #dvb).&lt;br /&gt;
* you may also wish to consult any errata that might be found on this article's talk page&lt;br /&gt;
&lt;br /&gt;
In general, if the source builds correctly, it is likely that the drivers will work, though this is not a guarantee.&lt;br /&gt;
&lt;br /&gt;
== Installing the Compiled Driver Modules ==&lt;br /&gt;
The next step is to install the kernel driver modules by executing:&lt;br /&gt;
 sudo make install&lt;br /&gt;
The command above will prompt you for your root password, and will then copy the *.ko module files you built in the above step into the ''/lib/modules/[kernel version]/kernel/drivers/media'' directories.  &lt;br /&gt;
&lt;br /&gt;
{{Note|If your distribution doesn't support the sudo command (i.e the command line returns ''&amp;quot;bash: sudo: command not found&amp;quot;''), use the &amp;quot;su&amp;quot; command instead.  &amp;quot;su&amp;quot; will prompt you for the root password, and after which entering, you can then proceed with the command. Ex.:&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|In the case where you have more then one kernel installed but have used the pre-compilation option of &amp;quot;make distclean&amp;quot;, the new modules will be installed only into the ''/lib/modules/[uname -r]/kernel/drivers/media'' directory}} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== First Use: Out with the Old, In with the New==&lt;br /&gt;
{| &lt;br /&gt;
| valign=top |&lt;br /&gt;
Before trying to use the device with your newly installed driver set, you should remove from system memory any older versions of related modules that may have been loaded by the running kernel; otherwise, you will likely run into various fatal mismatch errors -- typified by an &amp;quot;unknown symbol&amp;quot; or &amp;quot;unknown parameter&amp;quot; -- as a result of your system trying to work from a mixture of old and new modules.  &lt;br /&gt;
&lt;br /&gt;
To achieve a [[Wikipedia:Tabula rasa |clean slate]] state, you could either: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''1. Reboot:''' Perhaps the most straightforward thing to do at this point,  particularly for Linux newbies, is to just restart your system; the reboot will, obviously, clear out the old modules loaded into memory and, as an added bonus, create a fresh running environment under which the new modules should have been automagically loaded into system memory. &lt;br /&gt;
&lt;br /&gt;
Or, on the other hand,&lt;br /&gt;
&lt;br /&gt;
'''2. Take care of business yourself:''' More experienced users might prefer to use more eloquent approaches.  For example, using &lt;br /&gt;
 sudo make unload&lt;br /&gt;
will essentially (and similar as to manually using &amp;quot;rmmod&amp;quot; commands) remove all older modules for the device that might be currently loaded in memory by the running kernel.  After which, one can then load, from the newly installed device driver set, the appropriate modules for the device using relevant&lt;br /&gt;
 modprobe ''driver_name'' &lt;br /&gt;
commands.&lt;br /&gt;
&lt;br /&gt;
| valign=top halign=right width=30% |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 1em; background-color: Lavender;&amp;quot;&amp;gt;&lt;br /&gt;
'''For Advanced Users'''&amp;lt;br&amp;gt;&lt;br /&gt;
The following information is likely useful only for developers.  After building the modules as per usual (&amp;quot;make&amp;quot;), and without needing to install them, you can:&lt;br /&gt;
* remove all older modules from memory at once using &amp;quot;make unload&amp;quot; and &lt;br /&gt;
* then insert all the newly built modules into memory for the running kernel with &amp;quot;make load&amp;quot;&lt;br /&gt;
Alternatively, to perform the previous two commands (&amp;quot;make unload&amp;quot; and &amp;quot;make load&amp;quot;) in a single step, you can use &amp;quot;make reload&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note, however, that it is highly recommended that you avoid using either the make load or make reload options, as they will end up inserting &amp;lt;u&amp;gt;all&amp;lt;/u&amp;gt; V4L-DVB device drivers into memory, and that may introduce instability, or complicate testing.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Regardless of which approach you take to remove the old modules and to insert the new ones, the end result should be the same. In addition, upon future starts of your system, your device should &amp;quot;automagically&amp;quot; be detected and will have the appropriate driver modules loaded into memory. &lt;br /&gt;
&lt;br /&gt;
===If the Modules load correctly:===&lt;br /&gt;
Provided that the modules were loaded correctly into system memory:&lt;br /&gt;
&lt;br /&gt;
'''1. They should be listed in ''/proc/modules''''': you can use either &amp;lt;code&amp;gt;cat /proc/modules&amp;lt;/code&amp;gt; or, even better, &amp;lt;code&amp;gt;lsmod&amp;lt;/code&amp;gt; to see this content.&lt;br /&gt;
&lt;br /&gt;
Which modules should you be looking for? Well, the answer to that question depends entirely upon the chipsets used by your device -- see the relevant wiki article for your device for a listing of such components and required drivers (or search the web if such information does not exist. '''Note''': Please add any information missing from the wiki!)&lt;br /&gt;
&lt;br /&gt;
'''2. They should provide some indication within your system log''':  you can consult the output from the &amp;quot;&amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt;&amp;quot; command or directly review your system log file (typically housed within the ''/var/log'' directory) for indication that they have been successfully loaded and that the device is now correctly configured for operation.  Examples of successful module loads are provided by users under the &amp;quot;Sample kernel output&amp;quot; section in many device articles witin the wiki.&lt;br /&gt;
&lt;br /&gt;
'''3. The device manager [[Wikipedia:udev|udev]] will &amp;quot;automagically&amp;quot; create appropriate [[Device nodes and character devices|device nodes]] on ''/dev''''': &amp;lt;br&amp;gt;&lt;br /&gt;
'''(a) For a DVB device''', you should now have a non-empty ''/dev/dvb'' directory.  You can check on whether this is true for you with the following command:&lt;br /&gt;
: &amp;lt;code&amp;gt;ls -l /dev/dvb/&amp;lt;/code&amp;gt;&lt;br /&gt;
(alternatively, you can browse your directory structure with the graphical file manager of your choice).  If you have a single DVB device installed in your system, then the output of the above command should reveal that /dev/dvb/ is populated by adapter0.  Digging further,  &lt;br /&gt;
: &amp;lt;code&amp;gt;ls -l /dev/dvb/adapter0 &amp;lt;/code&amp;gt;&lt;br /&gt;
reveals the [[Device_nodes_and_character_devices#DVB_character_devices|character devices]] associated with adapter0 for which the drivers have control.  If you have more then one DVB device, you can see the same for all with &lt;br /&gt;
: &amp;lt;code&amp;gt;ls -l /dev/dvb/adapter* &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''(b) For a V4L device''', you should now have a non-empty ''/dev/v4l'' directory.  You can check on whether this is true for you with the following command:&lt;br /&gt;
: &amp;lt;code&amp;gt;ls -l /dev/v4l&amp;lt;/code&amp;gt;&lt;br /&gt;
Digging further,  &lt;br /&gt;
: &amp;lt;code&amp;gt;ls -l /dev/v4l/by-path &amp;lt;/code&amp;gt;&lt;br /&gt;
reveals the symbolic links to the [[Device_nodes_and_character_devices#V4L_character_devices|character devices]] associated with your V4L adapter for which the drivers have control.  The most typical of which is ''/dev/video0''.  If you have more then one V4L device, you can see the same for all with &lt;br /&gt;
: &amp;lt;code&amp;gt;ls -l /dev/video* &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===If the Modules did not load correctly or the device is still not configured correctly for use:===&lt;br /&gt;
There could be several reasons why you may have encountered a module loading error or, absent such an error, why the device is still not configured correctly for use, even after having correctly followed the steps from the above procedure.  If either of these cases applies, the very first thing you should do is [[Supported Hardware|check whether your device is actually supported]] by the driver (see the very first note at the top of this page).  Next, provided your device is supposed to be supported, check within your system log/dmesg for any messages that may give indication as to the problem.  The following points address a few common trouble spots:&lt;br /&gt;
&lt;br /&gt;
'''Module Load Order Can Matter'''&lt;br /&gt;
* in cases where loading more then one module is necessary, the order in which you load the modules can matter!  &lt;br /&gt;
&lt;br /&gt;
'''Sometimes Automagic just isn't Automagic'''&lt;br /&gt;
* If a module was, for whatever reason, not loaded, you can try manually loading it with the appropriate ''modprobe'' command.&lt;br /&gt;
&lt;br /&gt;
'''Unresolved Symbols'''&lt;br /&gt;
* if you tried the second method (&amp;quot;make unload&amp;quot; followed by an appropriate modprobe command) but encountered errors in relation to unresolved symbols, e.g. using the saa7134 module as an example:&lt;br /&gt;
 sudo modprobe saa7134&lt;br /&gt;
 FATAL: Error inserting saa7134 (/lib/modules/''[your kernel version]''/kernel/drivers/media/video/saa7134/saa7134.ko):\ &lt;br /&gt;
 Unknown symbol in module, or unknown parameter (see dmesg) &lt;br /&gt;
please try a system reboot before filing an [[Bug Report|error report]].  Irregardless of what caused the unresolved symbols errors, usually, after performing the reboot, you will find that the install was actually successful and the drivers will work as intended.&lt;br /&gt;
&lt;br /&gt;
* Special case: If your system uses compressed kernel modules, after running the &amp;quot;make install&amp;quot; command of the V4L-DVB installation process, you could end up with a mixture of new modules (*.ko) and their older compressed version (*.ko.gz) installed.  If the system attempts to concurrently load both sets into memory, you are bound to run into modprobe insertion errors (eg. unknown symbol or unknown parameter). All conflicting *.ko.gz files must be removed. The following command line can help you locate these conflicting files in all your installed kernels:&lt;br /&gt;
 for file in `find /lib/modules -name &amp;quot;*.ko&amp;quot;`; do if &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt; -e $file.gz &amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;; then echo &amp;quot;$file.gz should be removed&amp;quot;; fi; done&lt;br /&gt;
Usually all conflicting module files resulting of v4l-dvb installation will be located in:&lt;br /&gt;
 /lib/modules/''[your kernel version]''/kernel/drivers/media&lt;br /&gt;
Once the conflicting *.ko.gz have been moved elsewhere or renamed (to *.ko.gz.disabled for example), use the v4l-dvb reload command and, to be safe, also add a &amp;quot;depmod&amp;quot; step in order to rebuild modules dependencies):&lt;br /&gt;
 make reload&lt;br /&gt;
 depmod -a&lt;br /&gt;
Your new modules should now be loaded correctly.&lt;br /&gt;
&lt;br /&gt;
'''A Note on Firmware'''&lt;br /&gt;
* You have all the modules active (listed in lsmod) but device nodes are nowhere to be found: The problem may be as simple as the [[Firmware|firmware]] for the device not being loaded; some devices also require a [[Firmware|firmware]], which is uploaded from the host PC to the device, in order to operate. &lt;br /&gt;
&lt;br /&gt;
In some cases, when the device is correctly recognized, the associated drivers provide information as to which firmware file is required -- look in the system log output.  For example, for many [[TechnoTrend]] &amp;amp; [[Hauppauge]] (and other similar &amp;quot;premium&amp;quot; cards), if the dvb-ttpci firmware is not available you will observe an error such as:&lt;br /&gt;
 &amp;lt;pre&amp;gt;  dvb-ttpci: could not load firmware, file not found: dvb-ttpci-01.fw&lt;br /&gt;
  dvb-ttpci: usually this should be in /usr/lib/hotplug/firmware or /lib/firmware&lt;br /&gt;
  dvb-ttpci: and can be downloaded from http://www.linuxtv.org/download/dvb/firmware/&amp;lt;/pre&amp;gt;&lt;br /&gt;
Resolving that missing firmware issue should then result in proper detection and configuration of your device.&lt;br /&gt;
In other cases, obtaining the correct firmware is not so straightforward a task.  The very first thing you need to know is what device you're using; see &amp;quot;[[Supported_Hardware#Determining_the_Device's_Identity|Determining the Device's Identity]]&amp;quot;.  Once you have established which particular device you are in possession of, you can then move on to [[Firmware#Acquiring the Firmware|obtaining the correct firmware]].  In addition, information in wiki articles (eg. such as [[DVB-T USB Devices]]) will cite the appropriate firmware required.  If you're still at a loss, a Google search may shed light on what file you need. Note, however, that not all supported devices have easily available firmware (eg. Hauppauge HVR 1100 &amp;amp; 1300). Firmware for such cards could be loaded via temporary installation in a Mirosoft Windows System with the manufacturer-supplied drivers.&lt;br /&gt;
&lt;br /&gt;
In any regard, once you find and obtain the necessary firmware for your device, copy it into the appropriate directory; the directory location depends upon that used by your distro, but typically it is: &lt;br /&gt;
*/lib/firmware&lt;br /&gt;
Consult resources for your distro if its preferred location is somewhere otherwise.&lt;br /&gt;
&lt;br /&gt;
==Some Further Documentation==&lt;br /&gt;
* See [[Testing your DVB device]] for instructions on testing your newly installed DVB device&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Drivers]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers</id>
		<title>How to Obtain, Build and Install V4L-DVB Device Drivers</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers"/>
				<updated>2012-04-11T19:01:34Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Retrieving and Building/Compiling the Latest V4L-DVB Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The LinuxTV project hosts the latest set of Linux kernel driver modules for [[What is V4L or DVB?|V4L-DVB devices]]. This page contains information to help an &amp;quot;end user&amp;quot; install these device drivers in a GNU/Linux system.  &lt;br /&gt;
&lt;br /&gt;
{{Note|This article assumes that:&lt;br /&gt;
* your device is actually supported by the drivers -- Just because your board happens to have a chip on it that corresponds to some existing driver does NOT mean your product is supported.  The driver has to be aware that it's related to some hardware (typically through the [[Supported_Hardware#Determining_the_Device's_Identity|subsystem ID from the USB ID or PCI ID]]). If the driver doesn't recognize/bind to your particular hardware, then the module will probably load but then proceed to not do anything. In other words, support for your device would have to be added to the driver.&lt;br /&gt;
* you have already physically installed the hardware device into, or connected it to, your system. (Refer to the manufacturer's instructions for such details)}}.&lt;br /&gt;
&lt;br /&gt;
== Software Requirements ==&lt;br /&gt;
===Kernel Support===&lt;br /&gt;
The LinuxTV V4L-DVB drivers will work only in conjunction with relatively modern 2.6 kernels; specifically, &lt;br /&gt;
&lt;br /&gt;
{{Note|CityK here:  I have no clue as to where the current backwards compatibility status stands.  Suffice to say, more modern kernels (which I'd define as ~2.6.32 and newer) are much more likely to work with the new media_build snapshots of the git tree.  When the situation is more clear, please update this section accordingly.}}&lt;br /&gt;
&lt;br /&gt;
===Additional Software Requrirements===&lt;br /&gt;
In order to be able to build the V4L-DVB kernel driver modules, you will need: &lt;br /&gt;
* kernel-source or kernel-headers&lt;br /&gt;
* (OpenSuSE and fedora only) kernel-devel&lt;br /&gt;
* (Debian) libdigest-sha1-perl&lt;br /&gt;
* make &lt;br /&gt;
* gcc&lt;br /&gt;
* git&lt;br /&gt;
* patch&lt;br /&gt;
* patchutils&lt;br /&gt;
* libproc-processtable-perl (&amp;quot;perl-Proc-ProcessTable&amp;quot;)&lt;br /&gt;
If these packages are not currently installed on your system, you should do so now.&lt;br /&gt;
&lt;br /&gt;
==Retrieving and Building/Compiling the Latest V4L-DVB Source Code==&lt;br /&gt;
There are a couple of different methods by which you can obtain and build the latest source code.  Regardless of which route you take, all are performed from the command line within a console.  The &amp;quot;basic&amp;quot; method is likely appropriate for most end users, though, in some cases, some users will have to use the slightly more &amp;quot;manually intensive&amp;quot; approach.  This second approach is effectively, for all intents and purposes, really just the same as the &amp;quot;basic&amp;quot; method, but performing the steps in a piecemeal fashion affords you the opportunity to tailor the source code or the &amp;quot;make&amp;quot;/build process as might be required in your particular situation. Again, before proceeding with either approach, make sure you have installed all the prerequisite software listed above.&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are using Ubuntu, you were previously very likely to run into a fatal compilation error within the v4l-dvb build process when it reaches the firedtv module.  The reason for this is because Ubuntu had a bug in their packaging of the kernel headers. &amp;lt;b&amp;gt;This seems to be fixed&amp;lt;/b&amp;gt; on a fully updated systtem (5 July 2011) This was a long standing issue, and one of the most frequently reported on the mailing list.   &amp;lt;br&amp;gt;&lt;br /&gt;
If you still have the problem, you should be able to correct this compilation problem by following the more manual procedure listed below.  In particular, before proceeding to build the modules, you will have to edit the file ''v4l/.config'' and change the line for the firedtv driver from &amp;lt;nowiki&amp;gt;&amp;quot;firedtv=m&amp;quot; to &amp;quot;firedtv=n&amp;quot;&amp;lt;/nowiki&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are having build failures like &amp;quot;implicit declaration of function 'mfd_get_data'&amp;quot; try editing v4l/Makefile.media, and just comment out anything related to CONFIG_*_TIMBERALE.  [[http://sourceforge.net/mailarchive/message.php?msg_id=27353778 Source]] }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+'''Retreiving the Source Code &amp;amp; Building/Compiling the Modules'''&lt;br /&gt;
|-&lt;br /&gt;
! &amp;quot;Basic&amp;quot; Approach !! Developer's Approach !! More &amp;quot;Manually Intensive&amp;quot; Approach&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| valign=top |&lt;br /&gt;
 git clone git://linuxtv.org/media_build.git&lt;br /&gt;
 cd media_build &lt;br /&gt;
 ./build&lt;br /&gt;
&lt;br /&gt;
These commands will download the newest tarball of the source code from linuxtv.org, apply the backport patches to it and then build/compile the source via the included script build.sh.  &lt;br /&gt;
&lt;br /&gt;
NB: to add a patch copy the .patch file to the backports directory, and add the patch file as a line to the {kernel-version}_series file in the packports dir.&lt;br /&gt;
| valign=top |&lt;br /&gt;
 ~ $ git clone git://linuxtv.org/media_build.git&lt;br /&gt;
 ~ $ cd media_build &lt;br /&gt;
 ~/media_build $./build --main-git&lt;br /&gt;
{{Note|'''The build script will clone the entire media-tree.git, with will take some time'''}}&lt;br /&gt;
 &lt;br /&gt;
In order to modify a driver foo.c:&lt;br /&gt;
&lt;br /&gt;
 ~/media_build $ cd media&lt;br /&gt;
 ~/media $ gedit drivers/media/video/foo.c&lt;br /&gt;
 ~/media $ make -C ../v4l&lt;br /&gt;
 ~/media $ make -C ../ install&lt;br /&gt;
 ~/media $ make -C .. rmmod&lt;br /&gt;
 ~/media $ modprobe foo&lt;br /&gt;
&lt;br /&gt;
 (some procedure to test the &amp;quot;foo&amp;quot; driver)&lt;br /&gt;
&lt;br /&gt;
To generate a patch, use:&lt;br /&gt;
&lt;br /&gt;
 ~/media $ git commit -as&lt;br /&gt;
&lt;br /&gt;
Then submit the patch upstream. If your sendmail is propery configured, you can easily send the patch upstream with:&lt;br /&gt;
&lt;br /&gt;
 ~/media $ git send-email HEAD^1&lt;br /&gt;
&lt;br /&gt;
or, to send a patch series:&lt;br /&gt;
&lt;br /&gt;
 ~/media $ git send-email ''initial_branch''&lt;br /&gt;
&lt;br /&gt;
Where ''initial_branch'' is the name of a branch of a changeset number for the last patch before your changes.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
 git clone git://linuxtv.org/media_build.git&lt;br /&gt;
 cd media_build/linux&lt;br /&gt;
 make tar DIR=&amp;lt;some dir with media -git tree&amp;gt;&lt;br /&gt;
 make untar&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
If you need to make any sort of change or modification to the source code, now is the time. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 1em; background-color: Lavender;&amp;quot;&amp;gt;&lt;br /&gt;
'''Optional Pre-Compilation Steps'''&amp;lt;br&amp;gt;&lt;br /&gt;
These optional command steps are applicable only in certain situations approaching a new build of the driver set, or for experienced users wishing to streamline the build process to consist of only those components they want to install.&lt;br /&gt;
* &amp;lt;code&amp;gt;make rminstall&amp;lt;/code&amp;gt;  ... you would use this to remove the currently installed driver set (located within the relevant ''/lib/modules/[&amp;quot;kernel version&amp;quot;]/kernel/drivers/media'' directory to which they were installed)&lt;br /&gt;
* &amp;lt;code&amp;gt;make distclean&amp;lt;/code&amp;gt; ... cleans up the build configuration environment ... noteworthy is that it will set things up such that a following &amp;quot;make&amp;quot; build process will be against &amp;quot;''/usr/src/[uname -r]''” kernel source&lt;br /&gt;
* &amp;lt;code&amp;gt;make menuconfig&amp;lt;/code&amp;gt; ... this will open up the ncurses based menu that allows you to select only those components you wish to build and install&lt;br /&gt;
&lt;br /&gt;
The building system offers some other make targets that may be useful for advanced users or developers. For listing the supported targets, please use &amp;lt;code&amp;gt;make help&amp;lt;/code&amp;gt;.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, build/compile the modules from the source code with the command:&lt;br /&gt;
 make&lt;br /&gt;
{{Note|For multi-core processor systems, the ''make'' command has available options that can be beneficial in terms of the reducing the amount of time required for the process' completion.  Specifically, you can run &amp;quot;''make -jN''&amp;quot; (where &amp;quot;''N''&amp;quot; &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;  1 + the number of cores your cpu has ... i.e. if you have a dual core cpu use: ''make -j3'' )}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===Information Regarding the Build Process===&lt;br /&gt;
Generally, this step will tend to take a while to complete; being dependent upon both the number of modules being built and your system's processing power.&lt;br /&gt;
&lt;br /&gt;
You can monitor the build progress via the console output. You will notice that a ''/v4l'' directory will have been created and within which the completed *.ko module files are written.  Some drivers included within the snapshot may have their own requirements in regards to the kernel that you must be running in order for the module to be built; such cases can be found listed at the beginning of the build process' console output.&lt;br /&gt;
&lt;br /&gt;
The entire build process should complete without error.  If any errors are encountered, the compilation will be halted and, at this point, you should not attempt to proceed any further (unless you really, really enjoy experiencing the outcome of a preordained failure).  Errors that prevent building a particular V4L-DVB snapshot do indeed surface from time to time, but these are usually corrected quickly upon notification from an end user submitted [[Bug Report|bug report]], or upon detection from the daily automated build tests (see note below).  If you have run into a build error via the &amp;quot;basic&amp;quot; approach outlined above, you may wish to see if you can remedy the error and attempt a module build via the more &amp;quot;manually intensive&amp;quot; approach also outlined above.&lt;br /&gt;
&lt;br /&gt;
{{Note|'''The Daily Automated Build Tests'''&amp;lt;br&amp;gt;&lt;br /&gt;
Hans Verkuil has set up an automated daily build of the V4L-DVB source code upon all supported kernels, as well as testing that very same upon several CPU architectures.  A brief synopsis of the results from those tests is published each day on the Linux-Media Mailing List (LMML) under a message subject heading prefix of &amp;quot;''[cron job] v4l-dvb daily build ...''&amp;quot;.  A link to more detailed results of these tests is also provided within that message or can be found directly from [http://www.xs4all.nl/~hverkuil/logs/ here].}}  &lt;br /&gt;
&lt;br /&gt;
If you do run into any problems during the build step, you should:&lt;br /&gt;
* first, see whether the issue is already known or not -- consult the results of the daily automated build tests (see note above)&lt;br /&gt;
* if it appears that this is a new issue, please [[Bug Report|inform the developers of the bug via the LMML]] (preferred) or thorough one of the irc.freenode.net irc channels (#v4l or #linuxtv or #dvb).&lt;br /&gt;
* you may also wish to consult any errata that might be found on this article's talk page&lt;br /&gt;
&lt;br /&gt;
In general, if the source builds correctly, it is likely that the drivers will work, though this is not a guarantee.&lt;br /&gt;
&lt;br /&gt;
== Installing the Compiled Driver Modules ==&lt;br /&gt;
The next step is to install the kernel driver modules by executing:&lt;br /&gt;
 sudo make install&lt;br /&gt;
The command above will prompt you for your root password, and will then copy the *.ko module files you built in the above step into the ''/lib/modules/[kernel version]/kernel/drivers/media'' directories.  &lt;br /&gt;
&lt;br /&gt;
{{Note|If your distribution doesn't support the sudo command (i.e the command line returns ''&amp;quot;bash: sudo: command not found&amp;quot;''), use the &amp;quot;su&amp;quot; command instead.  &amp;quot;su&amp;quot; will prompt you for the root password, and after which entering, you can then proceed with the command. Ex.:&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|In the case where you have more then one kernel installed but have used the pre-compilation option of &amp;quot;make distclean&amp;quot;, the new modules will be installed only into the ''/lib/modules/[uname -r]/kernel/drivers/media'' directory}} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== First Use: Out with the Old, In with the New==&lt;br /&gt;
{| &lt;br /&gt;
| valign=top |&lt;br /&gt;
Before trying to use the device with your newly installed driver set, you should remove from system memory any older versions of related modules that may have been loaded by the running kernel; otherwise, you will likely run into various fatal mismatch errors -- typified by an &amp;quot;unknown symbol&amp;quot; or &amp;quot;unknown parameter&amp;quot; -- as a result of your system trying to work from a mixture of old and new modules.  &lt;br /&gt;
&lt;br /&gt;
To achieve a [[Wikipedia:Tabula rasa |clean slate]] state, you could either: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''1. Reboot:''' Perhaps the most straightforward thing to do at this point,  particularly for Linux newbies, is to just restart your system; the reboot will, obviously, clear out the old modules loaded into memory and, as an added bonus, create a fresh running environment under which the new modules should have been automagically loaded into system memory. &lt;br /&gt;
&lt;br /&gt;
Or, on the other hand,&lt;br /&gt;
&lt;br /&gt;
'''2. Take care of business yourself:''' More experienced users might prefer to use more eloquent approaches.  For example, using &lt;br /&gt;
 sudo make unload&lt;br /&gt;
will essentially (and similar as to manually using &amp;quot;rmmod&amp;quot; commands) remove all older modules for the device that might be currently loaded in memory by the running kernel.  After which, one can then load, from the newly installed device driver set, the appropriate modules for the device using relevant&lt;br /&gt;
 modprobe ''driver_name'' &lt;br /&gt;
commands.&lt;br /&gt;
&lt;br /&gt;
| valign=top halign=right width=30% |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px; border-color: blue; margin: 1em; padding: 1em; background-color: Lavender;&amp;quot;&amp;gt;&lt;br /&gt;
'''For Advanced Users'''&amp;lt;br&amp;gt;&lt;br /&gt;
The following information is likely useful only for developers.  After building the modules as per usual (&amp;quot;make&amp;quot;), and without needing to install them, you can:&lt;br /&gt;
* remove all older modules from memory at once using &amp;quot;make unload&amp;quot; and &lt;br /&gt;
* then insert all the newly built modules into memory for the running kernel with &amp;quot;make load&amp;quot;&lt;br /&gt;
Alternatively, to perform the previous two commands (&amp;quot;make unload&amp;quot; and &amp;quot;make load&amp;quot;) in a single step, you can use &amp;quot;make reload&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note, however, that it is highly recommended that you avoid using either the make load or make reload options, as they will end up inserting &amp;lt;u&amp;gt;all&amp;lt;/u&amp;gt; V4L-DVB device drivers into memory, and that may introduce instability, or complicate testing.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Regardless of which approach you take to remove the old modules and to insert the new ones, the end result should be the same. In addition, upon future starts of your system, your device should &amp;quot;automagically&amp;quot; be detected and will have the appropriate driver modules loaded into memory. &lt;br /&gt;
&lt;br /&gt;
===If the Modules load correctly:===&lt;br /&gt;
Provided that the modules were loaded correctly into system memory:&lt;br /&gt;
&lt;br /&gt;
'''1. They should be listed in ''/proc/modules''''': you can use either &amp;lt;code&amp;gt;cat /proc/modules&amp;lt;/code&amp;gt; or, even better, &amp;lt;code&amp;gt;lsmod&amp;lt;/code&amp;gt; to see this content.&lt;br /&gt;
&lt;br /&gt;
Which modules should you be looking for? Well, the answer to that question depends entirely upon the chipsets used by your device -- see the relevant wiki article for your device for a listing of such components and required drivers (or search the web if such information does not exist. '''Note''': Please add any information missing from the wiki!)&lt;br /&gt;
&lt;br /&gt;
'''2. They should provide some indication within your system log''':  you can consult the output from the &amp;quot;&amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt;&amp;quot; command or directly review your system log file (typically housed within the ''/var/log'' directory) for indication that they have been successfully loaded and that the device is now correctly configured for operation.  Examples of successful module loads are provided by users under the &amp;quot;Sample kernel output&amp;quot; section in many device articles witin the wiki.&lt;br /&gt;
&lt;br /&gt;
'''3. The device manager [[Wikipedia:udev|udev]] will &amp;quot;automagically&amp;quot; create appropriate [[Device nodes and character devices|device nodes]] on ''/dev''''': &amp;lt;br&amp;gt;&lt;br /&gt;
'''(a) For a DVB device''', you should now have a non-empty ''/dev/dvb'' directory.  You can check on whether this is true for you with the following command:&lt;br /&gt;
: &amp;lt;code&amp;gt;ls -l /dev/dvb/&amp;lt;/code&amp;gt;&lt;br /&gt;
(alternatively, you can browse your directory structure with the graphical file manager of your choice).  If you have a single DVB device installed in your system, then the output of the above command should reveal that /dev/dvb/ is populated by adapter0.  Digging further,  &lt;br /&gt;
: &amp;lt;code&amp;gt;ls -l /dev/dvb/adapter0 &amp;lt;/code&amp;gt;&lt;br /&gt;
reveals the [[Device_nodes_and_character_devices#DVB_character_devices|character devices]] associated with adapter0 for which the drivers have control.  If you have more then one DVB device, you can see the same for all with &lt;br /&gt;
: &amp;lt;code&amp;gt;ls -l /dev/dvb/adapter* &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''(b) For a V4L device''', you should now have a non-empty ''/dev/v4l'' directory.  You can check on whether this is true for you with the following command:&lt;br /&gt;
: &amp;lt;code&amp;gt;ls -l /dev/v4l&amp;lt;/code&amp;gt;&lt;br /&gt;
Digging further,  &lt;br /&gt;
: &amp;lt;code&amp;gt;ls -l /dev/v4l/by-path &amp;lt;/code&amp;gt;&lt;br /&gt;
reveals the symbolic links to the [[Device_nodes_and_character_devices#V4L_character_devices|character devices]] associated with your V4L adapter for which the drivers have control.  The most typical of which is ''/dev/video0''.  If you have more then one V4L device, you can see the same for all with &lt;br /&gt;
: &amp;lt;code&amp;gt;ls -l /dev/video* &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===If the Modules did not load correctly or the device is still not configured correctly for use:===&lt;br /&gt;
There could be several reasons why you may have encountered a module loading error or, absent such an error, why the device is still not configured correctly for use, even after having correctly followed the steps from the above procedure.  If either of these cases applies, the very first thing you should do is [[Supported Hardware|check whether your device is actually supported]] by the driver (see the very first note at the top of this page).  Next, provided your device is supposed to be supported, check within your system log/dmesg for any messages that may give indication as to the problem.  The following points address a few common trouble spots:&lt;br /&gt;
&lt;br /&gt;
'''Module Load Order Can Matter'''&lt;br /&gt;
* in cases where loading more then one module is necessary, the order in which you load the modules can matter!  &lt;br /&gt;
&lt;br /&gt;
'''Sometimes Automagic just isn't Automagic'''&lt;br /&gt;
* If a module was, for whatever reason, not loaded, you can try manually loading it with the appropriate ''modprobe'' command.&lt;br /&gt;
&lt;br /&gt;
'''Unresolved Symbols'''&lt;br /&gt;
* if you tried the second method (&amp;quot;make unload&amp;quot; followed by an appropriate modprobe command) but encountered errors in relation to unresolved symbols, e.g. using the saa7134 module as an example:&lt;br /&gt;
 sudo modprobe saa7134&lt;br /&gt;
 FATAL: Error inserting saa7134 (/lib/modules/''[your kernel version]''/kernel/drivers/media/video/saa7134/saa7134.ko):\ &lt;br /&gt;
 Unknown symbol in module, or unknown parameter (see dmesg) &lt;br /&gt;
please try a system reboot before filing an [[Bug Report|error report]].  Irregardless of what caused the unresolved symbols errors, usually, after performing the reboot, you will find that the install was actually successful and the drivers will work as intended.&lt;br /&gt;
&lt;br /&gt;
* Special case: If your system uses compressed kernel modules, after running the &amp;quot;make install&amp;quot; command of the V4L-DVB installation process, you could end up with a mixture of new modules (*.ko) and their older compressed version (*.ko.gz) installed.  If the system attempts to concurrently load both sets into memory, you are bound to run into modprobe insertion errors (eg. unknown symbol or unknown parameter). All conflicting *.ko.gz files must be removed. The following command line can help you locate these conflicting files in all your installed kernels:&lt;br /&gt;
 for file in `find /lib/modules -name &amp;quot;*.ko&amp;quot;`; do if &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt; -e $file.gz &amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;; then echo &amp;quot;$file.gz should be removed&amp;quot;; fi; done&lt;br /&gt;
Usually all conflicting module files resulting of v4l-dvb installation will be located in:&lt;br /&gt;
 /lib/modules/''[your kernel version]''/kernel/drivers/media&lt;br /&gt;
Once the conflicting *.ko.gz have been moved elsewhere or renamed (to *.ko.gz.disabled for example), use the v4l-dvb reload command and, to be safe, also add a &amp;quot;depmod&amp;quot; step in order to rebuild modules dependencies):&lt;br /&gt;
 make reload&lt;br /&gt;
 depmod -a&lt;br /&gt;
Your new modules should now be loaded correctly.&lt;br /&gt;
&lt;br /&gt;
'''A Note on Firmware'''&lt;br /&gt;
* You have all the modules active (listed in lsmod) but device nodes are nowhere to be found: The problem may be as simple as the [[Firmware|firmware]] for the device not being loaded; some devices also require a [[Firmware|firmware]], which is uploaded from the host PC to the device, in order to operate. &lt;br /&gt;
&lt;br /&gt;
In some cases, when the device is correctly recognized, the associated drivers provide information as to which firmware file is required -- look in the system log output.  For example, for many [[TechnoTrend]] &amp;amp; [[Hauppauge]] (and other similar &amp;quot;premium&amp;quot; cards), if the dvb-ttpci firmware is not available you will observe an error such as:&lt;br /&gt;
 &amp;lt;pre&amp;gt;  dvb-ttpci: could not load firmware, file not found: dvb-ttpci-01.fw&lt;br /&gt;
  dvb-ttpci: usually this should be in /usr/lib/hotplug/firmware or /lib/firmware&lt;br /&gt;
  dvb-ttpci: and can be downloaded from http://www.linuxtv.org/download/dvb/firmware/&amp;lt;/pre&amp;gt;&lt;br /&gt;
Resolving that missing firmware issue should then result in proper detection and configuration of your device.&lt;br /&gt;
In other cases, obtaining the correct firmware is not so straightforward a task.  The very first thing you need to know is what device you're using; see &amp;quot;[[Supported_Hardware#Determining_the_Device's_Identity|Determining the Device's Identity]]&amp;quot;.  Once you have established which particular device you are in possession of, you can then move on to [[Firmware#Acquiring the Firmware|obtaining the correct firmware]].  In addition, information in wiki articles (eg. such as [[DVB-T USB Devices]]) will cite the appropriate firmware required.  If you're still at a loss, a Google search may shed light on what file you need. Note, however, that not all supported devices have easily available firmware (eg. Hauppauge HVR 1100 &amp;amp; 1300). Firmware for such cards could be loaded via temporary installation in a Mirosoft Windows System with the manufacturer-supplied drivers.&lt;br /&gt;
&lt;br /&gt;
In any regard, once you find and obtain the necessary firmware for your device, copy it into the appropriate directory; the directory location depends upon that used by your distro, but typically it is: &lt;br /&gt;
*/lib/firmware&lt;br /&gt;
Consult resources for your distro if its preferred location is somewhere otherwise.&lt;br /&gt;
&lt;br /&gt;
==Some Further Documentation==&lt;br /&gt;
* See [[Testing your DVB device]] for instructions on testing your newly installed DVB device&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Drivers]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Development:_Submitting_Drivers</id>
		<title>Development: Submitting Drivers</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Development:_Submitting_Drivers"/>
				<updated>2011-07-11T00:23:22Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Who To Submit Drivers To */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following content is a copy of the &amp;lt;code&amp;gt;/usr/src/linux/Documentation/SubmittingDrivers&amp;lt;/code&amp;gt; file (modified slightly for visual presentation). A current copy can also be found online [http://lxr.linux.no/source/Documentation/SubmittingDrivers here].  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''Submitting Drivers For The Linux Kernel'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This document is intended to explain how to submit device drivers to the various development trees of the Linux kernel. Note that if you are interested in video card drivers you should probably talk to [http://x.org/ X.Org] and/or [http://www.xfree86.org/ XFree86] instead.&lt;br /&gt;
&lt;br /&gt;
Also read the [[Development: Submitting Patches|Documentation/SubmittingPatches]] document.&lt;br /&gt;
&lt;br /&gt;
== Allocating Device Numbers ==&lt;br /&gt;
Major and minor numbers for block and character devices are allocated by the Linux assigned name and number authority (currently better known as H Peter Anvin). The site is http://www.lanana.org/. This also deals with allocating numbers for devices that are not going to be submitted to the mainstream kernel.&lt;br /&gt;
&lt;br /&gt;
If you don't use assigned numbers then when you device is submitted it will get given an assigned number even if that is different from values you may&lt;br /&gt;
have shipped to customers before.&lt;br /&gt;
&lt;br /&gt;
== Who To Submit Drivers To ==&lt;br /&gt;
;Linux 3.x: Any patches for a media driver (drivers/media) should be submitted to the Linux Media Mailing list &amp;lt;linux-media@vger.kernel.org&amp;gt;&lt;br /&gt;
;Linux 2.6: A patch that also applies to an stable kernel should have a &amp;quot;Cc: stable@kernel.org&amp;quot; in the body of the email. Once reached upstream, it will be sent to the Stable maintainer. If there's already a patch for it upstream, you can submit it directly to the stable Mailing list (stable@kernel.org).&lt;br /&gt;
&lt;br /&gt;
== What Criteria Determine Acceptance ==&lt;br /&gt;
;Licensing:	The code must be released to us under the GNU General Public License. We don't insist on any kind of exclusively GPL licensing, and if you wish the driver to be useful to other communities such as BSD you may well wish to release under multiple licenses.&lt;br /&gt;
&lt;br /&gt;
;Copyright:	The copyright owner must agree to use of GPL. It's best if the submitter and copyright owner are the same person/entity. If not, the name of	the person/entity authorizing use of GPL should be listed in case it's necessary to verify the will of the copright owner.&lt;br /&gt;
&lt;br /&gt;
:Interfaces:	If your driver uses existing interfaces and behaves like other drivers in the same class it will be much more likely to be accepted than if it invents gratuitous new ones. If you need to implement a common API over Linux and NT drivers do it in userspace.&lt;br /&gt;
&lt;br /&gt;
;Code:		Please use the Linux style of code formatting as documented in Documentation/CodingStyle. If you have sections of code that need to be in other formats, for example because they are shared with a windows driver kit and you want to maintain them just once separate them out nicely and note this fact.&lt;br /&gt;
&lt;br /&gt;
;Portability:	Pointers are not always 32bits, not all computers are little endian, people do not all have floating point and you shouldn't use inline x86 assembler in your driver without careful thought. Pure x86 drivers generally are not popular. If you only have x86 hardware it is hard to test portability but it is easy to make sure the code can easily be made portable.&lt;br /&gt;
&lt;br /&gt;
;Clarity:	It helps if anyone can see how to fix the driver. It helps you because you get patches not bug reports. If you submit a driver that intentionally obfuscates how the hardware works it will go in the bitbucket.&lt;br /&gt;
&lt;br /&gt;
;Control:	In general if there is active maintainance of a driver by the author then patches will be redirected to them unless they are totally obvious and without need of checking.  If you want to be the contact and update point for the driver it is a good idea to state this in the comments, and include an entry in MAINTAINERS for your driver.&lt;br /&gt;
&lt;br /&gt;
== What Criteria Do Not Determine Acceptance ==&lt;br /&gt;
;Vendor:	Being the hardware vendor and maintaining the driver is often a good thing. If there is a stable working driver from other people already in the tree don't expect 'we are the vendor' to get your driver chosen. Ideally work with the existing driver author to build a single perfect driver. &lt;br /&gt;
&lt;br /&gt;
;Author: 	It doesn't matter if a large Linux company wrote the driver, or you did. Nobody has any special access to the kernel tree. Anyone who tells you otherwise isn't telling the whole story.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
;Linux kernel master tree:	ftp.??.kernel.org:/pub/linux/kernel/...&amp;lt;br&amp;gt; where ?? is your country code, such as &amp;quot;us&amp;quot;, &amp;quot;uk&amp;quot;, &amp;quot;fr&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
;Linux kernel mailing list:	linux-kernel@vger.kernel.org &amp;lt;br&amp;gt; [mail majordomo@vger.kernel.org to subscribe]&lt;br /&gt;
&lt;br /&gt;
;Linux Device Drivers, Third Edition (covers 2.6.10): 	http://lwn.net/Kernel/LDD3/  (free version)&lt;br /&gt;
&lt;br /&gt;
;Kernel traffic [http://www.kerneltraffic.org/kernel-traffic/]:  Weekly summary of kernel list activity (much easier to read)&lt;br /&gt;
&lt;br /&gt;
;LWN.net [http://lwn.net/]: Weekly summary of kernel development activity &amp;lt;br&amp;gt; * [http://lwn.net/Articles/2.6-kernel-api/ 2.6 API changes] &amp;lt;br&amp;gt; * [http://lwn.net/Articles/driver-porting/ Porting drivers from prior kernels to 2.6]		&lt;br /&gt;
&lt;br /&gt;
;KernelTrap [http://kerneltrap.org/]: Occasional Linux kernel articles and developer interviews&lt;br /&gt;
&lt;br /&gt;
; KernelNewbies [http://kernelnewbies.org/]: 	Documentation and assistance for new kernel programmers&lt;br /&gt;
	&lt;br /&gt;
;Linux USB project [http://sourceforge.net/projects/linux-usb/]: Helpful for the development of USB based device drivers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Bus_snooping/sniffing</id>
		<title>Bus snooping/sniffing</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Bus_snooping/sniffing"/>
				<updated>2011-03-16T15:04:21Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Snooping Procedures: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Purpose and relevance to development work -- description coming soon&lt;br /&gt;
&lt;br /&gt;
==PCI / PCIe == &lt;br /&gt;
===Snooping Utilities:===&lt;br /&gt;
* BTSpy [http://btwincap.sourceforge.net/custom.html] - Windows based snoop for BT8x8 based devices&lt;br /&gt;
* Dscaler's RegSpy [http://www.dscaler.com/] - Windows based; contains the ability to snoop the registers of [[Interface chipsets|PCI / PCIe interface chipsets]] ... also see [http://marc.info/?l=linux-dvb&amp;amp;m=122823618002379&amp;amp;w=2 this note]&lt;br /&gt;
&lt;br /&gt;
==USB ==&lt;br /&gt;
===Snooping Utilities:===&lt;br /&gt;
* [[usbsnoop]] - a Windows based utility for sniffing/monitoring communications traffic for a USB device.  Note: In case usbsnoop/SniffUSB doesn't work for you, here are a few time limited apps that should work under Vista:&lt;br /&gt;
** [http://www.hhdsoftware.com/Family/usb-monitor.html USB Monitor] - 14-day trial period&lt;br /&gt;
** [http://www.usblyzer.com/ USBlyzer] - fully functional evaluation version for 33 days (only 32 bit)&lt;br /&gt;
* SnoopyPro - Windows based snoop for USB device communications traffic&lt;br /&gt;
* usbsnoop/SniffUSB - Windows based snoop for USB device communications traffic&lt;br /&gt;
* usbmon - Linux kernel module which can snoop USB device communications traffic&lt;br /&gt;
** [http://git.linuxtv.org/v4l-utils.git?a=blob;f=contrib/parse_tcpdump_log.pl;hb=HEAD parse_tcpdump_log.pl] - a script to directly talk with usbmon, parsing the result into a format feasible for analysis. This is part of the contrib stuff at the [http://git.linuxtv.org/v4l-utils.git v4l-utils tree]. It allows both realtime and offline parsing of usbmon data, and its format output is compatible with other parsers like the [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/em28xx/parse_em28xx.pl;h=master;hb=HEAD em28xx log parser].&lt;br /&gt;
** Wireshark - logs usbmon output, via libpcap&lt;br /&gt;
** USBMon - logs usbmon output&lt;br /&gt;
&lt;br /&gt;
===Log parsers, format etc===&lt;br /&gt;
&lt;br /&gt;
* [[usbmon2usbsnoop]]&lt;br /&gt;
* [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-usbsnoop.php;h=master;hb=HEAD parse-usbsnoop.php]&lt;br /&gt;
* [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-sniffusb2.pl;h=master;hb=HEAD parse-sniffusb2.pl]&lt;br /&gt;
* [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/em28xx/parse_em28xx.pl;h=master;hb=HEAD em28xx log parser]&lt;br /&gt;
&lt;br /&gt;
===Snooping Procedures:===&lt;br /&gt;
* Use a Snopping utility to get the log. &lt;br /&gt;
* Group URB transactions into a shorter log by using a parser, like [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-usbsnoop.php;h=master;hb=HEAD parse-usbsnoop.php]&lt;br /&gt;
* Identify the URB transactions at the control endpoint. URB transactions look like those:&lt;br /&gt;
&lt;br /&gt;
40 02 00 00 ba 00 03 00 &amp;gt;&amp;gt;&amp;gt; 20 11 00&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+'''URB fields'''&lt;br /&gt;
|-&lt;br /&gt;
| Byte || Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 1 || {| bit 7 = 1 - IN / 0 - OUT&lt;br /&gt;
bit 6 = 1 - Vendor Class&lt;br /&gt;
|-&lt;br /&gt;
| 2 || URB Request&lt;br /&gt;
|-&lt;br /&gt;
| 3-4 || URB Value in big endian &lt;br /&gt;
|-&lt;br /&gt;
| 5-6 || URB Index in big endian &lt;br /&gt;
|-&lt;br /&gt;
| 7-8 || URB message size in big endian &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, let's analyse the folowing URB's:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+'''control URB examples '''&lt;br /&gt;
|-&lt;br /&gt;
| URB sequence log (URB setup + URB IN or OUT) || Byte 1 || Byte 2 || Bytes 3-4 || Bytes 5-6 || Bytes 7-8 || Message&lt;br /&gt;
|-&lt;br /&gt;
| 40 00 00 00 08 00 01 00 &amp;gt;&amp;gt;&amp;gt; 3d || USB OUT,  Vendor Class || Req = 0x00 || Value = 0x0000 || Index = 0x0008 || Size = 0x0001 || { 0x3d }&lt;br /&gt;
|-&lt;br /&gt;
| 40 02 00 00 ba 00 03 00 &amp;gt;&amp;gt;&amp;gt; 20 11 00 || USB OUT, Vendor Class || Req = 0x02 || Value = 0x0000 || Index = 0x00ba || Size = 0x0003 ||{ 0x20, 0x11, 0x00 }&lt;br /&gt;
|-&lt;br /&gt;
| c0 00 00 00 15 00 01 00 &amp;lt;&amp;lt;&amp;lt; 00 || USB IN, Vendor Class || Req = 0x00 || Value = 0x0000 || Index = 0x0015 || Size = 0x0001 || { 0x00 }&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After getting the log, you should analyse and understand the meaning of each of URB fields on your device.&lt;br /&gt;
&lt;br /&gt;
For example, in the case of [[Em28xx_devices | em28xx]], Req is used to indicate internal registers or I2C, Value is always 0 and Index indicates what device register is being used.&lt;br /&gt;
&lt;br /&gt;
On em28xx, the [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/em28xx/parse_em28xx.pl;h=master;hb=HEAD em28xx log parser] could be used in order to proccess the URBs and the driver dmesg dumps (in the compact format as shown above) and print them into a more human way, generating C like statements that can be added at em28xx source code (with a few adaptations, in the case of i2c messages):&lt;br /&gt;
&lt;br /&gt;
  em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x3d);&lt;br /&gt;
  i2c_master_send(0xba&amp;gt;&amp;gt;1, { 20 11 00  }, 0x03);&lt;br /&gt;
  em28xx_read_reg(dev, EM28XX_R15_RGAIN);         /* read 0x00 */&lt;br /&gt;
&lt;br /&gt;
If all you want is to check what the em28xx Linux driver is doing, and provided that the usbmon module is loaded (the Kernel should be compiled with CONFIG_USB_MON option), you can just use:&lt;br /&gt;
&lt;br /&gt;
   ./parse_tcpdump_log.pl --pcap |./parse_em28xx.pl&lt;br /&gt;
&lt;br /&gt;
There are some other parsers for some specific devices at the [http://git.linuxtv.org/v4l-utils.git?a=tree;f=contrib;hb=HEAD contrib directory of the v4l-tools git tree].&lt;br /&gt;
&lt;br /&gt;
===Command Playback Utilities:===&lt;br /&gt;
* usb-robot - plays back USB Snoopy capture logs&lt;br /&gt;
* usbreplay - plays back usbsnoop capture logs&lt;br /&gt;
&lt;br /&gt;
==i2c==&lt;br /&gt;
* i2c Tools: see [http://www.lm-sensors.org/wiki/I2CTools here] and [http://www.lm-sensors.org/wiki/i2cToolsDocumentation here]&lt;br /&gt;
* http://en.wikipedia.org/wiki/I2C#Development_Tools&lt;br /&gt;
* also see [http://www.spinics.net/lists/linux-dvb/msg16845.html this thread]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [[Wikipedia:Bus sniffing|Wikipedia's Bus sniffing article]]; note that the [[Wikipedia:Cache coherency|Cache coherency]] article is a probably a little less vague or more enlightening&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Bus_snooping/sniffing</id>
		<title>Bus snooping/sniffing</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Bus_snooping/sniffing"/>
				<updated>2011-03-16T14:54:32Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Purpose and relevance to development work -- description coming soon&lt;br /&gt;
&lt;br /&gt;
==PCI / PCIe == &lt;br /&gt;
===Snooping Utilities:===&lt;br /&gt;
* BTSpy [http://btwincap.sourceforge.net/custom.html] - Windows based snoop for BT8x8 based devices&lt;br /&gt;
* Dscaler's RegSpy [http://www.dscaler.com/] - Windows based; contains the ability to snoop the registers of [[Interface chipsets|PCI / PCIe interface chipsets]] ... also see [http://marc.info/?l=linux-dvb&amp;amp;m=122823618002379&amp;amp;w=2 this note]&lt;br /&gt;
&lt;br /&gt;
==USB ==&lt;br /&gt;
===Snooping Utilities:===&lt;br /&gt;
* [[usbsnoop]] - a Windows based utility for sniffing/monitoring communications traffic for a USB device.  Note: In case usbsnoop/SniffUSB doesn't work for you, here are a few time limited apps that should work under Vista:&lt;br /&gt;
** [http://www.hhdsoftware.com/Family/usb-monitor.html USB Monitor] - 14-day trial period&lt;br /&gt;
** [http://www.usblyzer.com/ USBlyzer] - fully functional evaluation version for 33 days (only 32 bit)&lt;br /&gt;
* SnoopyPro - Windows based snoop for USB device communications traffic&lt;br /&gt;
* usbsnoop/SniffUSB - Windows based snoop for USB device communications traffic&lt;br /&gt;
* usbmon - Linux kernel module which can snoop USB device communications traffic&lt;br /&gt;
** [http://git.linuxtv.org/v4l-utils.git?a=blob;f=contrib/parse_tcpdump_log.pl;hb=HEAD parse_tcpdump_log.pl] - a script to directly talk with usbmon, parsing the result into a format feasible for analysis. This is part of the contrib stuff at the [http://git.linuxtv.org/v4l-utils.git v4l-utils tree]. It allows both realtime and offline parsing of usbmon data, and its format output is compatible with other parsers like the [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/em28xx/parse_em28xx.pl;h=master;hb=HEAD em28xx log parser].&lt;br /&gt;
** Wireshark - logs usbmon output, via libpcap&lt;br /&gt;
** USBMon - logs usbmon output&lt;br /&gt;
&lt;br /&gt;
===Log parsers, format etc===&lt;br /&gt;
&lt;br /&gt;
* [[usbmon2usbsnoop]]&lt;br /&gt;
* [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-usbsnoop.php;h=master;hb=HEAD parse-usbsnoop.php]&lt;br /&gt;
* [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-sniffusb2.pl;h=master;hb=HEAD parse-sniffusb2.pl]&lt;br /&gt;
* [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/em28xx/parse_em28xx.pl;h=master;hb=HEAD em28xx log parser]&lt;br /&gt;
&lt;br /&gt;
===Snooping Procedures:===&lt;br /&gt;
* Use a Snopping utility to get the log. &lt;br /&gt;
* Group URB transactions into a shorter log by using a parser, like [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-usbsnoop.php;h=master;hb=HEAD parse-usbsnoop.php]&lt;br /&gt;
* Identify the URB transactions at the control endpoint. URB transactions look like those:&lt;br /&gt;
&lt;br /&gt;
40 02 00 00 ba 00 03 00 &amp;gt;&amp;gt;&amp;gt; 20 11 00&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+'''URB fields'''&lt;br /&gt;
|-&lt;br /&gt;
| Byte || Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 1 || {| bit 7 = 1 - IN / 0 - OUT&lt;br /&gt;
bit 6 = 1 - Vendor Class&lt;br /&gt;
|-&lt;br /&gt;
| 2 || URB Request&lt;br /&gt;
|-&lt;br /&gt;
| 3-4 || URB Value in big endian &lt;br /&gt;
|-&lt;br /&gt;
| 5-6 || URB Index in big endian &lt;br /&gt;
|-&lt;br /&gt;
| 7-8 || URB message size in big endian &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, let's analyse the folowing URB's:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+'''control URB examples '''&lt;br /&gt;
|-&lt;br /&gt;
| URB sequence log (URB setup + URB IN or OUT) || Byte 1 || Byte 2 || Bytes 3-4 || Bytes 5-6 || Bytes 7-8 || Message&lt;br /&gt;
|-&lt;br /&gt;
| 40 00 00 00 08 00 01 00 &amp;gt;&amp;gt;&amp;gt; 3d || USB OUT,  Vendor Class || Req = 0x00 || Value = 0x0000 || Index = 0x0008 || Size = 0x0001 || { 0x3d }&lt;br /&gt;
|-&lt;br /&gt;
| 40 02 00 00 ba 00 03 00 &amp;gt;&amp;gt;&amp;gt; 20 11 00 || USB OUT, Vendor Class || Req = 0x02 || Value = 0x0000 || Index = 0x00ba || Size = 0x0003 ||{ 0x20, 0x11, 0x00 }&lt;br /&gt;
|-&lt;br /&gt;
| c0 00 00 00 15 00 01 00 &amp;lt;&amp;lt;&amp;lt; 00 || USB IN, Vendor Class || Req = 0x00 || Value = 0x0000 || Index = 0x0015 || Size = 0x0001 || { 0x00 }&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After getting the log, you should analyse and understand the meaning of each of URB fields on your device.&lt;br /&gt;
&lt;br /&gt;
For example, in the case of [[Em28xx_devices | em28xx]], Req is used to indicate internal registers or I2C, Value is always 0 and Index indicates what device register is being used.&lt;br /&gt;
&lt;br /&gt;
On em28xx, the [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/em28xx/parse_em28xx.pl;h=master;hb=HEAD em28xx log parser] could be used in order to proccess the URBs and the driver dmesg dumps (in the compact format as shown above) and print them into a more human way, generating C like statements that can be added at em28xx source code (with a few adaptations, in the case of i2c messages):&lt;br /&gt;
&lt;br /&gt;
  em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x3d);&lt;br /&gt;
  i2c_master_send(0xba&amp;gt;&amp;gt;1, { 20 11 00  }, 0x03);&lt;br /&gt;
  em28xx_read_reg(dev, EM28XX_R15_RGAIN);         /* read 0x00 */&lt;br /&gt;
&lt;br /&gt;
===Command Playback Utilities:===&lt;br /&gt;
* usb-robot - plays back USB Snoopy capture logs&lt;br /&gt;
* usbreplay - plays back usbsnoop capture logs&lt;br /&gt;
&lt;br /&gt;
==i2c==&lt;br /&gt;
* i2c Tools: see [http://www.lm-sensors.org/wiki/I2CTools here] and [http://www.lm-sensors.org/wiki/i2cToolsDocumentation here]&lt;br /&gt;
* http://en.wikipedia.org/wiki/I2C#Development_Tools&lt;br /&gt;
* also see [http://www.spinics.net/lists/linux-dvb/msg16845.html this thread]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [[Wikipedia:Bus sniffing|Wikipedia's Bus sniffing article]]; note that the [[Wikipedia:Cache coherency|Cache coherency]] article is a probably a little less vague or more enlightening&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Usbmon</id>
		<title>Usbmon</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Usbmon"/>
				<updated>2011-03-16T14:48:14Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase|usbmon}}&lt;br /&gt;
&lt;br /&gt;
A Linux kernel module which can snoop and output USB communications traffic.   The output produced by usbmon can be examined by using utilities such as '''usbdump''', '''USBMon''' or '''[[Wireshark]].&lt;br /&gt;
&lt;br /&gt;
The [http://git.linuxtv.org/v4l-utils.git v4l-utils tree] provides the [http://git.linuxtv.org/v4l-utils.git?a=blob;f=contrib/parse_tcpdump_log.pl;hb=HEAD parse_tcpdump_log.pl] script to directly talk with usbmon, parsing the result into a format feasible for analysis.&lt;br /&gt;
&lt;br /&gt;
==Also see==&lt;br /&gt;
* [[Usbmon2usbsnoop|usbmon2usbsnoop]] - a perl script that convert's usbmon output into [[usbsnoop]] log file format (thereby making the data compatible for use with, for example, [[usbreplay]])&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [http://www.mjmwired.net/kernel/Documentation/usb/usbmon.txt kernel documentation]&lt;br /&gt;
* [http://74.125.95.132/search?q=cache:bMh9AGUtqasJ:people.redhat.com/zaitcev/linux/OLS05_zaitcev.pdf+usbmon&amp;amp;hl=en&amp;amp;ct=clnk&amp;amp;cd=4&amp;amp;gl=ca&amp;amp;client=firefox-a The usbmon: USB monitoring framework] article&lt;br /&gt;
* [http://www.linux-usb.org/USBMon USBMon] - an old java program that can interface with the output from the usbmon kernel module; unfinished ? see: [http://people.redhat.com/zaitcev/linux/ the notes on this page] and those from [http://www.quietearth.us/articles/2006/10/16/USB-Snoop-in-linux this article] on USB snooping under Linux&lt;br /&gt;
* [http://www.wireshark.org/ Wireshark] - a more polished way to interface, via libpcap, with the usbmon kernel module's output; see the Wireshark wiki page's regarding USB: [http://wiki.wireshark.org/USB here] and [http://wiki.wireshark.org/CaptureSetup/USB here]&lt;br /&gt;
&lt;br /&gt;
[[category:software]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Libv4l_Progress</id>
		<title>Libv4l Progress</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Libv4l_Progress"/>
				<updated>2010-10-24T16:54:44Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Progress of applications that are in need of libv4l2 conversion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; &lt;br /&gt;
|+'''A sortable list of applications that are in need of libv4l2 conversion'''&lt;br /&gt;
|-&lt;br /&gt;
! application !! upstream !! fedora !! suse !! debian &lt;br /&gt;
|-&lt;br /&gt;
| v4l-utils (includes libv4l) || - || [https://fedoraproject.org/wiki/Features/BetterWebcamSupportF13 available] || [http://software.opensuse.org/search?q=v4l-utils&amp;amp;baseproject=openSUSE%3A11.3 available] || [http://packages.qa.debian.org/v/v4l-utils.html available]&lt;br /&gt;
|-&lt;br /&gt;
| [http://gstreamer.net GStreamer] || [http://bugzilla.gnome.org/show_bug.cgi?id=545033 bug] || [https://bugzilla.redhat.com/show_bug.cgi?id=456825 bug] || bug || [http://packages.debian.org/changelogs/pool/main/g/gst-plugins-good0.10/current/changelog#versionversion0.10.11-2 done]&lt;br /&gt;
|-&lt;br /&gt;
| [http://share.skype.com/site/linux Skype] || [https://developer.skype.com/jira/browse/SCL-403 Skype] || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://blogs.adobe.com/penguin.swf/ Adobe Flash] || Contacted Mike via email (philips) || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://dvr.sourceforge.net DVR] || bug || bug || bug || bug &lt;br /&gt;
|-&lt;br /&gt;
| [http://www.opalvoip.org/wiki/index.php?n=Main.Subversion PTLib/Ekiga] || [http://bugzilla.gnome.org/show_bug.cgi?id=545108 bug] [https://opalvoip.svn.sourceforge.net/svnroot/opalvoip/ptlib/trunk/ ptlib svn] r20635, fixed in ptlib 2.4.2 || [https://bugzilla.redhat.com/show_bug.cgi?id=456868 bug] || bug || bug &lt;br /&gt;
|-&lt;br /&gt;
| [http://ffmpeg.sourceforge.net/index.php ffmpeg] || bug || bug || bug || bug &lt;br /&gt;
|-&lt;br /&gt;
| [http://fftv.sourceforge.net fftv] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://xawdecode.sourceforge.net/ XdTV] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://freevo.sourceforge.net Freevo] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [[MEncoder]] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [[streamer]] || See xawtv || NA || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| [[transcode]] || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://paginas.terra.com.br/informatica/gleicon/video4linux/videodog.html videodog] || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.kdetv.org kdetv]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.mplayerhq.hu MPlayer]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://tvtime.sourceforge.net tvtime]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.videolan.org/vlc/ VLC]  || [https://trac.videolan.org/vlc/ticket/1804 bug] fixed upstream, version 0.9.5 || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://linux.bytesex.org/xawtv/ xawtv and motv]  || Upstream is dead, see Fedora bug link || [https://bugzilla.redhat.com/show_bug.cgi?id=457796 bug] || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://xinehq.de xine]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://zapping.sourceforge.net zapping]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.videolan.org/vlc/streaming.html  VideoLan]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://ffmpeg.mplayerhq.hu/ffserver-doc.html ffserver]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://mpeg4ip.sourceforge.net MPEG4IP]  || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://developer.apple.com/darwin/projects/streaming Darwin streaming server]   || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.litech.org/spook spook]  || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.flumotion.net Flumotion]  || see GStreamer || NA || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| [[MythTV]]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| camE || bug || [http://cvs.fedoraproject.org/viewvc/devel/camE/camE-1.9-libv4l1.patch?revision=1.1 patch] || bug || [http://bugs.debian.org/569095 bug]&lt;br /&gt;
|-&lt;br /&gt;
| camstream || bug || [http://cvs.fedoraproject.org/viewvc/devel/camstream/camstream-0.26.3-libv4l.patch?revision=1.1 patch] || bug || [http://bugs.debian.org/569090 bug]&lt;br /&gt;
|-&lt;br /&gt;
| gyachi || bug || [http://cvs.fedoraproject.org/viewvc/devel/gyachi/gyachi-1.1.46-libv4l.patch?revision=1.1 patch] || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| sane-v4l || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| unicap/ucview || Patch in latest upstream release needs ./configure argument to enable || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| amsn || Patch in upstream svn || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.winehq.org Wine] || [http://bugs.winehq.org/show_bug.cgi?id=16147 Bug 16147] || bug || bug || bug&lt;br /&gt;
|}&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Libv4l_Progress</id>
		<title>Libv4l Progress</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Libv4l_Progress"/>
				<updated>2010-10-24T16:35:22Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Progress of applications that are in need of libv4l2 conversion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; &lt;br /&gt;
|+'''A sortable list of applications that are in need of libv4l2 conversion'''&lt;br /&gt;
|-&lt;br /&gt;
! application !! upstream !! fedora !! suse !! debian &lt;br /&gt;
|-&lt;br /&gt;
| v4l-utils (includes libv4l) || - || available || [http://software.opensuse.org/search?q=v4l-utils&amp;amp;baseproject=openSUSE%3A11.3 available] || [http://packages.qa.debian.org/v/v4l-utils.html available]&lt;br /&gt;
|-&lt;br /&gt;
| [http://gstreamer.net GStreamer] || [http://bugzilla.gnome.org/show_bug.cgi?id=545033 bug] || [https://bugzilla.redhat.com/show_bug.cgi?id=456825 bug] || bug || [http://packages.debian.org/changelogs/pool/main/g/gst-plugins-good0.10/current/changelog#versionversion0.10.11-2 done]&lt;br /&gt;
|-&lt;br /&gt;
| [http://share.skype.com/site/linux Skype] || [https://developer.skype.com/jira/browse/SCL-403 Skype] || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://blogs.adobe.com/penguin.swf/ Adobe Flash] || Contacted Mike via email (philips) || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://dvr.sourceforge.net DVR] || bug || bug || bug || bug &lt;br /&gt;
|-&lt;br /&gt;
| [http://www.opalvoip.org/wiki/index.php?n=Main.Subversion PTLib/Ekiga] || [http://bugzilla.gnome.org/show_bug.cgi?id=545108 bug] [https://opalvoip.svn.sourceforge.net/svnroot/opalvoip/ptlib/trunk/ ptlib svn] r20635, fixed in ptlib 2.4.2 || [https://bugzilla.redhat.com/show_bug.cgi?id=456868 bug] || bug || bug &lt;br /&gt;
|-&lt;br /&gt;
| [http://ffmpeg.sourceforge.net/index.php ffmpeg] || bug || bug || bug || bug &lt;br /&gt;
|-&lt;br /&gt;
| [http://fftv.sourceforge.net fftv] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://xawdecode.sourceforge.net/ XdTV] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://freevo.sourceforge.net Freevo] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [[MEncoder]] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [[streamer]] || See xawtv || NA || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| [[transcode]] || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://paginas.terra.com.br/informatica/gleicon/video4linux/videodog.html videodog] || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.kdetv.org kdetv]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.mplayerhq.hu MPlayer]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://tvtime.sourceforge.net tvtime]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.videolan.org/vlc/ VLC]  || [https://trac.videolan.org/vlc/ticket/1804 bug] fixed upstream, version 0.9.5 || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://linux.bytesex.org/xawtv/ xawtv and motv]  || Upstream is dead, see Fedora bug link || [https://bugzilla.redhat.com/show_bug.cgi?id=457796 bug] || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://xinehq.de xine]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://zapping.sourceforge.net zapping]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.videolan.org/vlc/streaming.html  VideoLan]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://ffmpeg.mplayerhq.hu/ffserver-doc.html ffserver]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://mpeg4ip.sourceforge.net MPEG4IP]  || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://developer.apple.com/darwin/projects/streaming Darwin streaming server]   || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.litech.org/spook spook]  || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.flumotion.net Flumotion]  || see GStreamer || NA || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| [[MythTV]]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| camE || bug || [http://cvs.fedoraproject.org/viewvc/devel/camE/camE-1.9-libv4l1.patch?revision=1.1 patch] || bug || [http://bugs.debian.org/569095 bug]&lt;br /&gt;
|-&lt;br /&gt;
| camstream || bug || [http://cvs.fedoraproject.org/viewvc/devel/camstream/camstream-0.26.3-libv4l.patch?revision=1.1 patch] || bug || [http://bugs.debian.org/569090 bug]&lt;br /&gt;
|-&lt;br /&gt;
| gyachi || bug || [http://cvs.fedoraproject.org/viewvc/devel/gyachi/gyachi-1.1.46-libv4l.patch?revision=1.1 patch] || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| sane-v4l || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| unicap/ucview || Patch in latest upstream release needs ./configure argument to enable || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| amsn || Patch in upstream svn || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.winehq.org Wine] || [http://bugs.winehq.org/show_bug.cgi?id=16147 Bug 16147] || bug || bug || bug&lt;br /&gt;
|}&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Libv4l_Progress</id>
		<title>Libv4l Progress</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Libv4l_Progress"/>
				<updated>2010-10-24T16:34:52Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Progress of applications that are in need of libv4l2 conversion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; &lt;br /&gt;
|+'''A sortable list of applications that are in need of libv4l2 conversion'''&lt;br /&gt;
|-&lt;br /&gt;
! application !! upstream !! fedora !! suse !! debian &lt;br /&gt;
|-&lt;br /&gt;
| v4l-utils (includes libv4l) || - || available || in factory soon, [http://software.opensuse.org/search?q=v4l-utils&amp;amp;baseproject=openSUSE%3A11.3 available] || [http://packages.qa.debian.org/v/v4l-utils.html available]&lt;br /&gt;
|-&lt;br /&gt;
| [http://gstreamer.net GStreamer] || [http://bugzilla.gnome.org/show_bug.cgi?id=545033 bug] || [https://bugzilla.redhat.com/show_bug.cgi?id=456825 bug] || bug || [http://packages.debian.org/changelogs/pool/main/g/gst-plugins-good0.10/current/changelog#versionversion0.10.11-2 done]&lt;br /&gt;
|-&lt;br /&gt;
| [http://share.skype.com/site/linux Skype] || [https://developer.skype.com/jira/browse/SCL-403 Skype] || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://blogs.adobe.com/penguin.swf/ Adobe Flash] || Contacted Mike via email (philips) || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://dvr.sourceforge.net DVR] || bug || bug || bug || bug &lt;br /&gt;
|-&lt;br /&gt;
| [http://www.opalvoip.org/wiki/index.php?n=Main.Subversion PTLib/Ekiga] || [http://bugzilla.gnome.org/show_bug.cgi?id=545108 bug] [https://opalvoip.svn.sourceforge.net/svnroot/opalvoip/ptlib/trunk/ ptlib svn] r20635, fixed in ptlib 2.4.2 || [https://bugzilla.redhat.com/show_bug.cgi?id=456868 bug] || bug || bug &lt;br /&gt;
|-&lt;br /&gt;
| [http://ffmpeg.sourceforge.net/index.php ffmpeg] || bug || bug || bug || bug &lt;br /&gt;
|-&lt;br /&gt;
| [http://fftv.sourceforge.net fftv] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://xawdecode.sourceforge.net/ XdTV] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://freevo.sourceforge.net Freevo] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [[MEncoder]] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [[streamer]] || See xawtv || NA || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| [[transcode]] || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://paginas.terra.com.br/informatica/gleicon/video4linux/videodog.html videodog] || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.kdetv.org kdetv]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.mplayerhq.hu MPlayer]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://tvtime.sourceforge.net tvtime]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.videolan.org/vlc/ VLC]  || [https://trac.videolan.org/vlc/ticket/1804 bug] fixed upstream, version 0.9.5 || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://linux.bytesex.org/xawtv/ xawtv and motv]  || Upstream is dead, see Fedora bug link || [https://bugzilla.redhat.com/show_bug.cgi?id=457796 bug] || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://xinehq.de xine]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://zapping.sourceforge.net zapping]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.videolan.org/vlc/streaming.html  VideoLan]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://ffmpeg.mplayerhq.hu/ffserver-doc.html ffserver]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://mpeg4ip.sourceforge.net MPEG4IP]  || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://developer.apple.com/darwin/projects/streaming Darwin streaming server]   || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.litech.org/spook spook]  || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.flumotion.net Flumotion]  || see GStreamer || NA || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| [[MythTV]]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| camE || bug || [http://cvs.fedoraproject.org/viewvc/devel/camE/camE-1.9-libv4l1.patch?revision=1.1 patch] || bug || [http://bugs.debian.org/569095 bug]&lt;br /&gt;
|-&lt;br /&gt;
| camstream || bug || [http://cvs.fedoraproject.org/viewvc/devel/camstream/camstream-0.26.3-libv4l.patch?revision=1.1 patch] || bug || [http://bugs.debian.org/569090 bug]&lt;br /&gt;
|-&lt;br /&gt;
| gyachi || bug || [http://cvs.fedoraproject.org/viewvc/devel/gyachi/gyachi-1.1.46-libv4l.patch?revision=1.1 patch] || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| sane-v4l || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| unicap/ucview || Patch in latest upstream release needs ./configure argument to enable || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| amsn || Patch in upstream svn || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.winehq.org Wine] || [http://bugs.winehq.org/show_bug.cgi?id=16147 Bug 16147] || bug || bug || bug&lt;br /&gt;
|}&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Libv4l_Progress</id>
		<title>Libv4l Progress</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Libv4l_Progress"/>
				<updated>2010-10-24T16:29:34Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Progress of applications that are in need of libv4l2 conversion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; &lt;br /&gt;
|+'''A sortable list of applications that are in need of libv4l2 conversion'''&lt;br /&gt;
|-&lt;br /&gt;
! application !! upstream !! fedora !! suse !! debian &lt;br /&gt;
|-&lt;br /&gt;
| libv4l || - || available || in factory soon, [http://software.opensuse.org/search?q=libv4l 1-Clicks] || [http://packages.qa.debian.org/v/v4l-utils.html available]&lt;br /&gt;
|-&lt;br /&gt;
| [http://gstreamer.net GStreamer] || [http://bugzilla.gnome.org/show_bug.cgi?id=545033 bug] || [https://bugzilla.redhat.com/show_bug.cgi?id=456825 bug] || bug || [http://packages.debian.org/changelogs/pool/main/g/gst-plugins-good0.10/current/changelog#versionversion0.10.11-2 done]&lt;br /&gt;
|-&lt;br /&gt;
| [http://share.skype.com/site/linux Skype] || [https://developer.skype.com/jira/browse/SCL-403 Skype] || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://blogs.adobe.com/penguin.swf/ Adobe Flash] || Contacted Mike via email (philips) || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://dvr.sourceforge.net DVR] || bug || bug || bug || bug &lt;br /&gt;
|-&lt;br /&gt;
| [http://www.opalvoip.org/wiki/index.php?n=Main.Subversion PTLib/Ekiga] || [http://bugzilla.gnome.org/show_bug.cgi?id=545108 bug] [https://opalvoip.svn.sourceforge.net/svnroot/opalvoip/ptlib/trunk/ ptlib svn] r20635, fixed in ptlib 2.4.2 || [https://bugzilla.redhat.com/show_bug.cgi?id=456868 bug] || bug || bug &lt;br /&gt;
|-&lt;br /&gt;
| [http://ffmpeg.sourceforge.net/index.php ffmpeg] || bug || bug || bug || bug &lt;br /&gt;
|-&lt;br /&gt;
| [http://fftv.sourceforge.net fftv] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://xawdecode.sourceforge.net/ XdTV] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://freevo.sourceforge.net Freevo] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [[MEncoder]] || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [[streamer]] || See xawtv || NA || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| [[transcode]] || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://paginas.terra.com.br/informatica/gleicon/video4linux/videodog.html videodog] || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.kdetv.org kdetv]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.mplayerhq.hu MPlayer]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://tvtime.sourceforge.net tvtime]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.videolan.org/vlc/ VLC]  || [https://trac.videolan.org/vlc/ticket/1804 bug] fixed upstream, version 0.9.5 || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://linux.bytesex.org/xawtv/ xawtv and motv]  || Upstream is dead, see Fedora bug link || [https://bugzilla.redhat.com/show_bug.cgi?id=457796 bug] || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://xinehq.de xine]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://zapping.sourceforge.net zapping]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.videolan.org/vlc/streaming.html  VideoLan]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://ffmpeg.mplayerhq.hu/ffserver-doc.html ffserver]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://mpeg4ip.sourceforge.net MPEG4IP]  || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://developer.apple.com/darwin/projects/streaming Darwin streaming server]   || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.litech.org/spook spook]  || bug || bug || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.flumotion.net Flumotion]  || see GStreamer || NA || NA || NA&lt;br /&gt;
|-&lt;br /&gt;
| [[MythTV]]  || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| camE || bug || [http://cvs.fedoraproject.org/viewvc/devel/camE/camE-1.9-libv4l1.patch?revision=1.1 patch] || bug || [http://bugs.debian.org/569095 bug]&lt;br /&gt;
|-&lt;br /&gt;
| camstream || bug || [http://cvs.fedoraproject.org/viewvc/devel/camstream/camstream-0.26.3-libv4l.patch?revision=1.1 patch] || bug || [http://bugs.debian.org/569090 bug]&lt;br /&gt;
|-&lt;br /&gt;
| gyachi || bug || [http://cvs.fedoraproject.org/viewvc/devel/gyachi/gyachi-1.1.46-libv4l.patch?revision=1.1 patch] || bug || not packaged&lt;br /&gt;
|-&lt;br /&gt;
| sane-v4l || bug || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| unicap/ucview || Patch in latest upstream release needs ./configure argument to enable || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| amsn || Patch in upstream svn || bug || bug || bug&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.winehq.org Wine] || [http://bugs.winehq.org/show_bug.cgi?id=16147 Bug 16147] || bug || bug || bug&lt;br /&gt;
|}&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Remote_Controllers</id>
		<title>Remote Controllers</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Remote_Controllers"/>
				<updated>2010-05-12T18:57:36Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Adding support for new IR's */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently, most analog and digital devices have an Infrared input for a remote control. Each manufacturer has their own type of control. It is not uncommon for the same manufacturer to ship different types of remote controls, depending on the device. &lt;br /&gt;
&lt;br /&gt;
===Adding support for new IR's===&lt;br /&gt;
&lt;br /&gt;
In order to add support for a new keyboard, you need first to discover how the IR code is sent to the device. There are several possibilities:&lt;br /&gt;
  * IR sensor is directly connected with a GPIO pin of the PCI/USB bridge. This is a very common case nowadays.&lt;br /&gt;
     * This is probably the easiest way to add support, provided that the driver has already other similar devices. For an example, please see: [[add IR support for saa7134]].&lt;br /&gt;
  * Bridge has an IR decoder inside. Some chipsets have already some internal decoder for IR, like dib0700 and em2884;&lt;br /&gt;
  * There's a small chip that does serial to parallel conversion, outputting the IR code at several GPIO pins.&lt;br /&gt;
&lt;br /&gt;
The way to get the data is hardware specific. Once the driver is able to get an IR scancode, it is generally required to create a new table for it.&lt;br /&gt;
  NOTE: before adding a new table, please check if the existing ones have already the proper mapping.&lt;br /&gt;
&lt;br /&gt;
The first step to add a new map is to create an alias for it atinclude/media/rc-map.h:&lt;br /&gt;
&lt;br /&gt;
  /* Names of the several keytables defined in-kernel */&lt;br /&gt;
&lt;br /&gt;
  #define RC_MAP_ADSTECH_DVB_T_PCI         &amp;quot;rc-adstech-dvb-t-pci&amp;quot;&lt;br /&gt;
  ...&lt;br /&gt;
  #define RC_MAP_VIDEOMATE_TV_PVR          &amp;quot;rc-videomate-tv-pvr&amp;quot;&lt;br /&gt;
  #define RC_MAP_WINFAST                   &amp;quot;rc-winfast&amp;quot;&lt;br /&gt;
  #define RC_MAP_WINFAST_USBII_DELUXE      &amp;quot;rc-winfast-usbii-deluxe&amp;quot;&lt;br /&gt;
  /*&lt;br /&gt;
   * Please, do not just append newer Remote Controller names at the end.&lt;br /&gt;
   * The names should be ordered in alphabetical order&lt;br /&gt;
   */&lt;br /&gt;
&lt;br /&gt;
Just add a new line there with the IR name, on alphabetical order:&lt;br /&gt;
  #define RC_MAP_NAME_OF_MY_NEW_BOARD_MAP  &amp;quot;rc-name-of-my-new-board-map&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then copy one of the existing keymaps, for example, drivers/media/IR/keymaps/rc-empty.c,&lt;br /&gt;
replacing the names for the name of your new IR.&lt;br /&gt;
&lt;br /&gt;
Remove all keys at static struct ir_scancode, and add your new keycodes.&lt;br /&gt;
&lt;br /&gt;
For example, assuming that you have a driver with raw decode. By loading ir_core with debug=1, with:&lt;br /&gt;
  modprobe ir_core debug=1&lt;br /&gt;
  (be sure that ir_core weren't loaded before)&lt;br /&gt;
you'll start to generate lots of logs at the syslog. Use the dmesg command to get those codes:&lt;br /&gt;
  dmesg |grep scancode&lt;br /&gt;
&lt;br /&gt;
Let's assume that this get you the following results:&lt;br /&gt;
for power key:&lt;br /&gt;
  ir_nec_decode: NEC scancode 0x0300&lt;br /&gt;
  ir_getkeycode: unknown key for scancode 0x0300&lt;br /&gt;
for channel up key:&lt;br /&gt;
  ir_nec_decode: NEC scancode 0x030c&lt;br /&gt;
  ir_getkeycode: unknown key for scancode 0x030c&lt;br /&gt;
for channel down key:&lt;br /&gt;
  ir_nec_decode: NEC scancode 0x0310&lt;br /&gt;
  ir_getkeycode: unknown key for scancode 0x0310&lt;br /&gt;
&lt;br /&gt;
All you need to do is to make sure that those codes are properly mapped at the keycode table, and to specify&lt;br /&gt;
the ir_type (in this case, IR_TYPE_NEC). So, to support the above, the main content of the new rc map will be:&lt;br /&gt;
&lt;br /&gt;
  static struct ir_scancode name_of_my_new_keyboard[] = {&lt;br /&gt;
          { 0x0300, KEY_POWER2 },&lt;br /&gt;
          { 0x030c, KEY_CHANNELUP },&lt;br /&gt;
          { 0x0310, KEY_CHANNELDOWN },&lt;br /&gt;
  };&lt;br /&gt;
  static struct rc_keymap name_of_my_new_keyboard_map = {&lt;br /&gt;
          .map = {&lt;br /&gt;
                  .scan    = name_of_my_new_keyboard,&lt;br /&gt;
                  .size    = ARRAY_SIZE(name_of_my_new_keyboard),&lt;br /&gt;
                  .ir_type = IR_TYPE_NEC,&lt;br /&gt;
                  .name    = RC_MAP_EMPTY,&lt;br /&gt;
          }&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
Don't forget to add the new module at drivers/media/IR/keymaps/Makefile, otherwise, it won't be built.&lt;br /&gt;
&lt;br /&gt;
===IR Keycode map used by media devices===&lt;br /&gt;
&lt;br /&gt;
While there has been effort over the years to keep track of the varying IR layouts (documenting them within ir-common.c), unfortunately, there was never any effort to uniform the actual IR keycodes used by the different devices.  This lack of uniformity resulted in cases where the same IR keyname was mapped completely different on different IR's.  The overall state of confusion that existed is perhaps best demonstrated by viewing what [[ir-common.c]] IR summary looked like as of Aug, 26 2009.&lt;br /&gt;
&lt;br /&gt;
On Aug, 27 2009, having a common mapping for supported IR's became the subject of a [[Development: A proposal for a common IR keycode definition map|proposal]] which would allow userspace applications to make use of common keycode definitions. The table bellow reflects the expected keycode mappings for IR keys.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!Key code&lt;br /&gt;
!Meaning&lt;br /&gt;
!Key examples on IR&lt;br /&gt;
!Notes&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Numeric keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_0 || Keyboard digit 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
|KEY_1 || Keyboard digit 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
|KEY_2 || Keyboard digit 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
|KEY_3 || Keyboard digit 3 || 3&lt;br /&gt;
|-&lt;br /&gt;
|KEY_4 || Keyboard digit 4 || 4&lt;br /&gt;
|-&lt;br /&gt;
|KEY_5 || Keyboard digit 5 || 5&lt;br /&gt;
|-&lt;br /&gt;
|KEY_6 || Keyboard digit 6 || 6&lt;br /&gt;
|-&lt;br /&gt;
|KEY_7 || Keyboard digit 7 || 7&lt;br /&gt;
|-&lt;br /&gt;
|KEY_8 || Keyboard digit 8 || 8&lt;br /&gt;
|-&lt;br /&gt;
|KEY_9 || Keyboard digit 9 || 9&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Movie play control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FORWARD || Instantly advance in time ||  &amp;gt;&amp;gt; / FORWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BACK || Instantly go back in time || &amp;lt;&amp;lt;&amp;lt; / BACK&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FASTFORWARD || Play movie faster ||  &amp;gt;&amp;gt;&amp;gt; / FORWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_REWIND || Play movie back || REWIND / BACKWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_NEXT || Select next chapter / sub-chapter / interval || NEXT / SKIP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PREVIOUS || Select previous chapter / sub-chapter / interval ||  BACK / |&amp;lt;&amp;lt; /  PREV / PREVIOUS&lt;br /&gt;
|-&lt;br /&gt;
|KEY_AGAIN || Repeat the video or a video interval || REPEAT / LOOP / RECALL&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PAUSE || Pause stream ||  PAUSE / FREEZE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PLAY || Play movie at the normal timeshift ||  NORMAL TIMESHIFT / LIVE / &amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PLAYPAUSE || Alternate between play and pause || PLAY / PAUSE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_STOP || Stop stream ||  STOP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_RECORD || Start/stop recording stream ||  CAPTURE / REC / RECORD/PAUSE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CAMERA || Take a picture of the image ||  CAMERA ICON / CAPTURE / SNAPSHOT&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SHUFFLE || Enable shuffle mode ||  SHUFFLE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TIME || Activate time shift mode ||  TIME SHIFT &lt;br /&gt;
|-&lt;br /&gt;
|KEY_TITLE || Allow changing the chapter || CHAPTER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SUBTITLE || Allow changing the subtitle || SUBTITLE&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Image control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BRIGHTNESSDOWN || Decrease Brightness ||  BRIGHTNESS DECREASE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_BRIGHTNESSUP || Increase Brightness ||  BRIGHTNESS INCREASE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_ANGLE || Switch video camera angle (on videos with more than one angle stored) || ANGLE / SWAP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_EPG || Open the Electronic Play Guide (EPG) || EPG / GUIDE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TEXT || Activate/change closed caption mode ||  CLOSED CAPTION/TELETEXT / DVD TEXT / TELETEXT / TTX&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Audio control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_AUDIO || Change audio source || AUDIO SOURCE / AUDIO / MUSIC&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MUTE || Mute/unmute audio ||  MUTE / DEMUTE / UNMUTE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VOLUMEDOWN || Decrease volume ||  VOLUME- / VOLUME DOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VOLUMEUP || Increase volume ||  VOLUME+ / VOLUME UP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MODE || Change sound mode || MONO/STEREO&lt;br /&gt;
|-&lt;br /&gt;
|KEY_LANGUAGE || Select Language ||  1ST / 2ND LANGUAGE / DVD LANG / MTS/SAP / MTS SEL&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Channel control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNEL || Go to the next favorite channel ||  ALT / CHANNEL / CH SURFING / SURF / FAV&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNELDOWN || Decrease channel sequencially ||  CHANNEL - / CHANNEL DOWN / DOWN &lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNELUP || Increase channel sequencially ||  CHANNEL + / CHANNEL UP / UP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DIGITS || Use more than one digit for channel ||  PLUS / 100/ 1xx / xxx /  -/--  / Single Double Triple Digit&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SEARCH || Start channel autoscan ||  SCAN / AUTOSCAN&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Colored keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BLUE || IR “Blue” key &lt;br /&gt;
|style= &amp;quot;color: blue&amp;quot; | BLUE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_GREEN || IR “Green” Key &lt;br /&gt;
|style= &amp;quot;color: green&amp;quot; | GREEN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RED || IR “Red” key &lt;br /&gt;
|style= &amp;quot;color: red&amp;quot; | RED &lt;br /&gt;
|-&lt;br /&gt;
|KEY_YELLOW || IR “Yellow” key &lt;br /&gt;
|style= &amp;quot;color: yellow&amp;quot; | YELLOW&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Media selection&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CD || Change input source to Compact Disc ||  CD &lt;br /&gt;
|-&lt;br /&gt;
|KEY_DVD || Change input to DVD ||  DVD / DVD MENU &lt;br /&gt;
|-&lt;br /&gt;
|KEY_EJECTCLOSECD || Open/close the CD/DVD player ||  -&amp;gt; ) / CLOSE / OPEN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MEDIA || Turn on/off Media application ||  PC/TV /  TURN ON/OFF APP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_PC || Selects from TV to PC || PC&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RADIO || Put into AM/FM radio mode ||  RADIO / TV/FM / TV/RADIO / FM / FM/RADIO&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TV || Select tv mode || TV / LIVE TV&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TV2 || Select Cable mode ||  AIR/CBL &lt;br /&gt;
|-&lt;br /&gt;
|KEY_VCR || Select VCR mode ||  VCR MODE / DTR&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VIDEO || Alternate between input modes || SOURCE / SELECT / DISPLAY / SWITCH INPUTS / VIDEO&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Power control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_POWER || Turn on/off computer ||  SYSTEM POWER / COMPUTER POWER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_POWER2 || Turn on/off application ||  TV ON/OFF / POWER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SLEEP || Activate sleep timer ||  SLEEP / SLEEP TIMER &lt;br /&gt;
|-&lt;br /&gt;
|KEY_SUSPEND || Put computer into suspend mode ||  STANDBY / SUSPEND &lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Window control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CLEAR || Stop stream and return to default input video/audio ||  CLEAR / RESET / BOSS KEY&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CYCLEWINDOWS || Minimize windows and move to the next one || ALT-TAB / MINIMIZE / DESKTOP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FAVORITES || Open the favorites stream window || TV WALL / Favorites&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MENU || Call application menu ||  2ND CONTROLS (USA: MENU) / DVD/MENU / SHOW/HIDE CTRL&lt;br /&gt;
|-&lt;br /&gt;
|KEY_NEW || Open/Close Picture in Picture ||  PIP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_OK || Send a confirmation code to application || OK / ENTER / RETURN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SCREEN || Select screen aspect ratio ||  4:3 16:9 SELECT &lt;br /&gt;
|-&lt;br /&gt;
|KEY_ZOOM || Put device into zoom/full screen mode ||  ZOOM / FULL SCREEN / ZOOM+ / HIDE PANNEL / SWITCH&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Navigation keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_ESC || Cancel current operation || CANCEL / BACK&lt;br /&gt;
|-&lt;br /&gt;
|KEY_HELP || Open a Help window ||  HELP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_HOMEPAGE || Navigate to Homepage || HOME&lt;br /&gt;
|-&lt;br /&gt;
|KEY_INFO || Open On Screen Display ||  DISPLAY INFORMATION / OSD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_WWW || Open the default browser ||  WEB &lt;br /&gt;
|-&lt;br /&gt;
|KEY_UP || Up key || UP || On simpler IR's, without separate channel keys, you need to map UP as KEY_CHANNELUP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DOWN || Down key || DOWN || On simpler IR's, without separate channel keys, you need to map DOWN as KEY_CHANNELDOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_LEFT || Left key || LEFT || On simpler IR's, without separate volume keys, you need to map LEFT as KEY_VOLUMEDOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RIGHT || Right key || RIGHT || On simpler IR's, without separate volume keys, you need to map RIGHT as KEY_VOLUMEUP&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Miscelaneous keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DOT || Return a dot ||  . &lt;br /&gt;
|-&lt;br /&gt;
|KEY_FN || Select a function ||  FUNCTION &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Technical details about IR===&lt;br /&gt;
http://linuxtv.org/wiki/index.php/Remote_controllers-V4L&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Add_IR_support_for_saa7134</id>
		<title>Add IR support for saa7134</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Add_IR_support_for_saa7134"/>
				<updated>2010-05-12T18:56:19Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: Created page with 'Saa7134 was the first driver to support the new ir core raw input event infrastructure. As such, it is very easy to add there support for any new IR that uses GPIO18 or GPIO16 to...'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Saa7134 was the first driver to support the new ir core raw input event infrastructure. As such, it is very&lt;br /&gt;
easy to add there support for any new IR that uses GPIO18 or GPIO16 to receive raw pulse/space events.&lt;br /&gt;
&lt;br /&gt;
In order to add support for a new board called SAA7134_BOARD_FOO, you just need to add:&lt;br /&gt;
&lt;br /&gt;
For GPIO18:&lt;br /&gt;
        case SAA7134_BOARD_FOO:&lt;br /&gt;
                ir_codes     = RC_MAP_FOO;&lt;br /&gt;
                mask_keydown = 0x0040000;&lt;br /&gt;
                mask_keyup   = 0x0040000;&lt;br /&gt;
                mask_keycode = 0xffff;&lt;br /&gt;
                raw_decode   = 1;&lt;br /&gt;
                break;&lt;br /&gt;
&lt;br /&gt;
For GPIO16, the mask_kewdown and mask_keyup should be 0x10000. However, a small trivial  2 line change at &lt;br /&gt;
saa7134_hw_enable2() is required, in order to enable both positive and negative IRQ transitions.&lt;br /&gt;
This change weren't done yet, since we lack the need for it currently.&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Remote_Controllers</id>
		<title>Remote Controllers</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Remote_Controllers"/>
				<updated>2010-05-12T18:46:45Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Adding support for new IR's */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently, most analog and digital devices have an Infrared input for a remote control. Each manufacturer has their own type of control. It is not uncommon for the same manufacturer to ship different types of remote controls, depending on the device. &lt;br /&gt;
&lt;br /&gt;
===Adding support for new IR's===&lt;br /&gt;
&lt;br /&gt;
In order to add support for a new keyboard, you need first to discover how the IR code is sent to the device. There are several possibilities:&lt;br /&gt;
  * IR sensor is directly connected with a GPIO pin of the PCI/USB bridge. This is a very common case nowadays.&lt;br /&gt;
     * This is probably the easiest way to add support, provided that the driver has already other similar devices. For an example, please see: [[add IR support for saa7134]].&lt;br /&gt;
  * Bridge has an IR decoder inside. Some chipsets have already some internal decoder for IR, like dib0700 and em2884;&lt;br /&gt;
  * There's a small chip that does serial to parallel conversion, outputting the IR code at several GPIO pins.&lt;br /&gt;
&lt;br /&gt;
The way to get the data is hardware specific. Once the driver is able to get an IR scancode, it is generally required to create a new table for it.&lt;br /&gt;
  NOTE: before adding a new table, please check if the existing ones have already the proper mapping.&lt;br /&gt;
&lt;br /&gt;
The first step to add a new map is to create an alias for it atinclude/media/rc-map.h:&lt;br /&gt;
&lt;br /&gt;
  /* Names of the several keytables defined in-kernel */&lt;br /&gt;
&lt;br /&gt;
  #define RC_MAP_ADSTECH_DVB_T_PCI         &amp;quot;rc-adstech-dvb-t-pci&amp;quot;&lt;br /&gt;
  ...&lt;br /&gt;
  #define RC_MAP_VIDEOMATE_TV_PVR          &amp;quot;rc-videomate-tv-pvr&amp;quot;&lt;br /&gt;
  #define RC_MAP_WINFAST                   &amp;quot;rc-winfast&amp;quot;&lt;br /&gt;
  #define RC_MAP_WINFAST_USBII_DELUXE      &amp;quot;rc-winfast-usbii-deluxe&amp;quot;&lt;br /&gt;
  /*&lt;br /&gt;
   * Please, do not just append newer Remote Controller names at the end.&lt;br /&gt;
   * The names should be ordered in alphabetical order&lt;br /&gt;
   */&lt;br /&gt;
&lt;br /&gt;
Just add a new line there with the IR name, on alphabetical order:&lt;br /&gt;
  #define RC_MAP_NAME_OF_MY_NEW_BOARD_MAP  &amp;quot;rc-name-of-my-new-board-map&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then copy one of the existing keymaps, for example, drivers/media/IR/keymaps/rc-empty.c,&lt;br /&gt;
replacing the names for the name of your new IR.&lt;br /&gt;
&lt;br /&gt;
Remove all keys at static struct ir_scancode, and add your new keycodes.&lt;br /&gt;
&lt;br /&gt;
For example, assuming that you have a driver with raw decode. By loading ir_core with debug=1, with:&lt;br /&gt;
  modprobe ir_core debug=1&lt;br /&gt;
  (be sure that ir_core weren't loaded before)&lt;br /&gt;
you'll start to generate lots of logs at the syslog. Use the dmesg command to get those codes:&lt;br /&gt;
  dmesg |grep scancode&lt;br /&gt;
&lt;br /&gt;
Let's assume that this get you the following results:&lt;br /&gt;
for power key:&lt;br /&gt;
  ir_nec_decode: NEC scancode 0x0300&lt;br /&gt;
  ir_getkeycode: unknown key for scancode 0x0300&lt;br /&gt;
for channel up key:&lt;br /&gt;
  ir_nec_decode: NEC scancode 0x030c&lt;br /&gt;
  ir_getkeycode: unknown key for scancode 0x030c&lt;br /&gt;
for channel down key:&lt;br /&gt;
  ir_nec_decode: NEC scancode 0x0310&lt;br /&gt;
  ir_getkeycode: unknown key for scancode 0x0310&lt;br /&gt;
&lt;br /&gt;
All you need to do is to make sure that those codes are properly mapped at the keycode table, and to specify&lt;br /&gt;
the ir_type (in this case, IR_TYPE_NEC). So, to support the above, the main content of the new rc map will be:&lt;br /&gt;
&lt;br /&gt;
  static struct ir_scancode name_of_my_new_keyboard[] = {&lt;br /&gt;
          { 0x0300, KEY_POWER2 },&lt;br /&gt;
          { 0x030c, KEY_CHANNELUP },&lt;br /&gt;
          { 0x0310, KEY_CHANNELDOWN },&lt;br /&gt;
  };&lt;br /&gt;
  static struct rc_keymap name_of_my_new_keyboard_map = {&lt;br /&gt;
          .map = {&lt;br /&gt;
                  .scan    = name_of_my_new_keyboard,&lt;br /&gt;
                  .size    = ARRAY_SIZE(name_of_my_new_keyboard),&lt;br /&gt;
                  .ir_type = IR_TYPE_NEC,&lt;br /&gt;
                  .name    = RC_MAP_EMPTY,&lt;br /&gt;
          }&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
===IR Keycode map used by media devices===&lt;br /&gt;
&lt;br /&gt;
While there has been effort over the years to keep track of the varying IR layouts (documenting them within ir-common.c), unfortunately, there was never any effort to uniform the actual IR keycodes used by the different devices.  This lack of uniformity resulted in cases where the same IR keyname was mapped completely different on different IR's.  The overall state of confusion that existed is perhaps best demonstrated by viewing what [[ir-common.c]] IR summary looked like as of Aug, 26 2009.&lt;br /&gt;
&lt;br /&gt;
On Aug, 27 2009, having a common mapping for supported IR's became the subject of a [[Development: A proposal for a common IR keycode definition map|proposal]] which would allow userspace applications to make use of common keycode definitions. The table bellow reflects the expected keycode mappings for IR keys.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!Key code&lt;br /&gt;
!Meaning&lt;br /&gt;
!Key examples on IR&lt;br /&gt;
!Notes&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Numeric keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_0 || Keyboard digit 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
|KEY_1 || Keyboard digit 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
|KEY_2 || Keyboard digit 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
|KEY_3 || Keyboard digit 3 || 3&lt;br /&gt;
|-&lt;br /&gt;
|KEY_4 || Keyboard digit 4 || 4&lt;br /&gt;
|-&lt;br /&gt;
|KEY_5 || Keyboard digit 5 || 5&lt;br /&gt;
|-&lt;br /&gt;
|KEY_6 || Keyboard digit 6 || 6&lt;br /&gt;
|-&lt;br /&gt;
|KEY_7 || Keyboard digit 7 || 7&lt;br /&gt;
|-&lt;br /&gt;
|KEY_8 || Keyboard digit 8 || 8&lt;br /&gt;
|-&lt;br /&gt;
|KEY_9 || Keyboard digit 9 || 9&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Movie play control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FORWARD || Instantly advance in time ||  &amp;gt;&amp;gt; / FORWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BACK || Instantly go back in time || &amp;lt;&amp;lt;&amp;lt; / BACK&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FASTFORWARD || Play movie faster ||  &amp;gt;&amp;gt;&amp;gt; / FORWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_REWIND || Play movie back || REWIND / BACKWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_NEXT || Select next chapter / sub-chapter / interval || NEXT / SKIP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PREVIOUS || Select previous chapter / sub-chapter / interval ||  BACK / |&amp;lt;&amp;lt; /  PREV / PREVIOUS&lt;br /&gt;
|-&lt;br /&gt;
|KEY_AGAIN || Repeat the video or a video interval || REPEAT / LOOP / RECALL&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PAUSE || Pause stream ||  PAUSE / FREEZE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PLAY || Play movie at the normal timeshift ||  NORMAL TIMESHIFT / LIVE / &amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PLAYPAUSE || Alternate between play and pause || PLAY / PAUSE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_STOP || Stop stream ||  STOP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_RECORD || Start/stop recording stream ||  CAPTURE / REC / RECORD/PAUSE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CAMERA || Take a picture of the image ||  CAMERA ICON / CAPTURE / SNAPSHOT&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SHUFFLE || Enable shuffle mode ||  SHUFFLE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TIME || Activate time shift mode ||  TIME SHIFT &lt;br /&gt;
|-&lt;br /&gt;
|KEY_TITLE || Allow changing the chapter || CHAPTER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SUBTITLE || Allow changing the subtitle || SUBTITLE&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Image control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BRIGHTNESSDOWN || Decrease Brightness ||  BRIGHTNESS DECREASE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_BRIGHTNESSUP || Increase Brightness ||  BRIGHTNESS INCREASE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_ANGLE || Switch video camera angle (on videos with more than one angle stored) || ANGLE / SWAP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_EPG || Open the Electronic Play Guide (EPG) || EPG / GUIDE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TEXT || Activate/change closed caption mode ||  CLOSED CAPTION/TELETEXT / DVD TEXT / TELETEXT / TTX&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Audio control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_AUDIO || Change audio source || AUDIO SOURCE / AUDIO / MUSIC&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MUTE || Mute/unmute audio ||  MUTE / DEMUTE / UNMUTE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VOLUMEDOWN || Decrease volume ||  VOLUME- / VOLUME DOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VOLUMEUP || Increase volume ||  VOLUME+ / VOLUME UP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MODE || Change sound mode || MONO/STEREO&lt;br /&gt;
|-&lt;br /&gt;
|KEY_LANGUAGE || Select Language ||  1ST / 2ND LANGUAGE / DVD LANG / MTS/SAP / MTS SEL&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Channel control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNEL || Go to the next favorite channel ||  ALT / CHANNEL / CH SURFING / SURF / FAV&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNELDOWN || Decrease channel sequencially ||  CHANNEL - / CHANNEL DOWN / DOWN &lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNELUP || Increase channel sequencially ||  CHANNEL + / CHANNEL UP / UP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DIGITS || Use more than one digit for channel ||  PLUS / 100/ 1xx / xxx /  -/--  / Single Double Triple Digit&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SEARCH || Start channel autoscan ||  SCAN / AUTOSCAN&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Colored keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BLUE || IR “Blue” key &lt;br /&gt;
|style= &amp;quot;color: blue&amp;quot; | BLUE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_GREEN || IR “Green” Key &lt;br /&gt;
|style= &amp;quot;color: green&amp;quot; | GREEN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RED || IR “Red” key &lt;br /&gt;
|style= &amp;quot;color: red&amp;quot; | RED &lt;br /&gt;
|-&lt;br /&gt;
|KEY_YELLOW || IR “Yellow” key &lt;br /&gt;
|style= &amp;quot;color: yellow&amp;quot; | YELLOW&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Media selection&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CD || Change input source to Compact Disc ||  CD &lt;br /&gt;
|-&lt;br /&gt;
|KEY_DVD || Change input to DVD ||  DVD / DVD MENU &lt;br /&gt;
|-&lt;br /&gt;
|KEY_EJECTCLOSECD || Open/close the CD/DVD player ||  -&amp;gt; ) / CLOSE / OPEN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MEDIA || Turn on/off Media application ||  PC/TV /  TURN ON/OFF APP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_PC || Selects from TV to PC || PC&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RADIO || Put into AM/FM radio mode ||  RADIO / TV/FM / TV/RADIO / FM / FM/RADIO&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TV || Select tv mode || TV / LIVE TV&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TV2 || Select Cable mode ||  AIR/CBL &lt;br /&gt;
|-&lt;br /&gt;
|KEY_VCR || Select VCR mode ||  VCR MODE / DTR&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VIDEO || Alternate between input modes || SOURCE / SELECT / DISPLAY / SWITCH INPUTS / VIDEO&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Power control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_POWER || Turn on/off computer ||  SYSTEM POWER / COMPUTER POWER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_POWER2 || Turn on/off application ||  TV ON/OFF / POWER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SLEEP || Activate sleep timer ||  SLEEP / SLEEP TIMER &lt;br /&gt;
|-&lt;br /&gt;
|KEY_SUSPEND || Put computer into suspend mode ||  STANDBY / SUSPEND &lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Window control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CLEAR || Stop stream and return to default input video/audio ||  CLEAR / RESET / BOSS KEY&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CYCLEWINDOWS || Minimize windows and move to the next one || ALT-TAB / MINIMIZE / DESKTOP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FAVORITES || Open the favorites stream window || TV WALL / Favorites&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MENU || Call application menu ||  2ND CONTROLS (USA: MENU) / DVD/MENU / SHOW/HIDE CTRL&lt;br /&gt;
|-&lt;br /&gt;
|KEY_NEW || Open/Close Picture in Picture ||  PIP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_OK || Send a confirmation code to application || OK / ENTER / RETURN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SCREEN || Select screen aspect ratio ||  4:3 16:9 SELECT &lt;br /&gt;
|-&lt;br /&gt;
|KEY_ZOOM || Put device into zoom/full screen mode ||  ZOOM / FULL SCREEN / ZOOM+ / HIDE PANNEL / SWITCH&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Navigation keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_ESC || Cancel current operation || CANCEL / BACK&lt;br /&gt;
|-&lt;br /&gt;
|KEY_HELP || Open a Help window ||  HELP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_HOMEPAGE || Navigate to Homepage || HOME&lt;br /&gt;
|-&lt;br /&gt;
|KEY_INFO || Open On Screen Display ||  DISPLAY INFORMATION / OSD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_WWW || Open the default browser ||  WEB &lt;br /&gt;
|-&lt;br /&gt;
|KEY_UP || Up key || UP || On simpler IR's, without separate channel keys, you need to map UP as KEY_CHANNELUP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DOWN || Down key || DOWN || On simpler IR's, without separate channel keys, you need to map DOWN as KEY_CHANNELDOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_LEFT || Left key || LEFT || On simpler IR's, without separate volume keys, you need to map LEFT as KEY_VOLUMEDOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RIGHT || Right key || RIGHT || On simpler IR's, without separate volume keys, you need to map RIGHT as KEY_VOLUMEUP&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Miscelaneous keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DOT || Return a dot ||  . &lt;br /&gt;
|-&lt;br /&gt;
|KEY_FN || Select a function ||  FUNCTION &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Technical details about IR===&lt;br /&gt;
http://linuxtv.org/wiki/index.php/Remote_controllers-V4L&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Remote_Controllers</id>
		<title>Remote Controllers</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Remote_Controllers"/>
				<updated>2010-05-12T18:45:00Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Adding support for new IR's */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently, most analog and digital devices have an Infrared input for a remote control. Each manufacturer has their own type of control. It is not uncommon for the same manufacturer to ship different types of remote controls, depending on the device. &lt;br /&gt;
&lt;br /&gt;
===Adding support for new IR's===&lt;br /&gt;
&lt;br /&gt;
In order to add support for a new keyboard, you need first to discover how the IR code is sent to the device. There are several possibilities:&lt;br /&gt;
  * IR sensor is directly connected with a GPIO pin of the PCI/USB bridge. This is a very common case nowadays.&lt;br /&gt;
     * This is probably the easiest way to add support, provided that the driver has already other similar devices. For an example, please see: [add IR support for saa7134].&lt;br /&gt;
  * Bridge has an IR decoder inside. Some chipsets have already some internal decoder for IR, like dib0700 and em2884;&lt;br /&gt;
  * There's a small chip that does serial to parallel conversion, outputting the IR code at several GPIO pins.&lt;br /&gt;
&lt;br /&gt;
The way to get the data is hardware specific. Once the driver is able to get an IR scancode, it is generally required to create a new table for it.&lt;br /&gt;
  NOTE: before adding a new table, please check if the existing ones have already the proper mapping.&lt;br /&gt;
&lt;br /&gt;
The first step to add a new map is to create an alias for it atinclude/media/rc-map.h:&lt;br /&gt;
&lt;br /&gt;
  /* Names of the several keytables defined in-kernel */&lt;br /&gt;
&lt;br /&gt;
  #define RC_MAP_ADSTECH_DVB_T_PCI         &amp;quot;rc-adstech-dvb-t-pci&amp;quot;&lt;br /&gt;
  ...&lt;br /&gt;
  #define RC_MAP_VIDEOMATE_TV_PVR          &amp;quot;rc-videomate-tv-pvr&amp;quot;&lt;br /&gt;
  #define RC_MAP_WINFAST                   &amp;quot;rc-winfast&amp;quot;&lt;br /&gt;
  #define RC_MAP_WINFAST_USBII_DELUXE      &amp;quot;rc-winfast-usbii-deluxe&amp;quot;&lt;br /&gt;
  /*&lt;br /&gt;
   * Please, do not just append newer Remote Controller names at the end.&lt;br /&gt;
   * The names should be ordered in alphabetical order&lt;br /&gt;
   */&lt;br /&gt;
&lt;br /&gt;
Just add a new line there with the IR name, on alphabetical order:&lt;br /&gt;
  #define RC_MAP_NAME_OF_MY_NEW_BOARD_MAP  &amp;quot;rc-name-of-my-new-board-map&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then copy one of the existing keymaps, for example, drivers/media/IR/keymaps/rc-empty.c,&lt;br /&gt;
replacing the names for the name of your new IR.&lt;br /&gt;
&lt;br /&gt;
Remove all keys at static struct ir_scancode, and add your new keycodes.&lt;br /&gt;
&lt;br /&gt;
For example, assuming that you have a driver with raw decode. By loading ir_core with debug=1, with:&lt;br /&gt;
  modprobe ir_core debug=1&lt;br /&gt;
  (be sure that ir_core weren't loaded before)&lt;br /&gt;
you'll start to generate lots of logs at the syslog. Use the dmesg command to get those codes:&lt;br /&gt;
  dmesg |grep scancode&lt;br /&gt;
&lt;br /&gt;
Let's assume that this get you the following results:&lt;br /&gt;
for power key:&lt;br /&gt;
  ir_nec_decode: NEC scancode 0x0300&lt;br /&gt;
  ir_getkeycode: unknown key for scancode 0x0300&lt;br /&gt;
for channel up key:&lt;br /&gt;
  ir_nec_decode: NEC scancode 0x030c&lt;br /&gt;
  ir_getkeycode: unknown key for scancode 0x030c&lt;br /&gt;
for channel down key:&lt;br /&gt;
  ir_nec_decode: NEC scancode 0x0310&lt;br /&gt;
  ir_getkeycode: unknown key for scancode 0x0310&lt;br /&gt;
&lt;br /&gt;
All you need to do is to make sure that those codes are properly mapped at the keycode table, and to specify&lt;br /&gt;
the ir_type (in this case, IR_TYPE_NEC). So, to support the above, the main content of the new rc map will be:&lt;br /&gt;
&lt;br /&gt;
  static struct ir_scancode name_of_my_new_keyboard[] = {&lt;br /&gt;
          { 0x300, KEY_POWER2 },&lt;br /&gt;
          { 0x30c, KEY_CHANNELUP },&lt;br /&gt;
          { 0x310, KEY_CHANNELDOWN },&lt;br /&gt;
  };&lt;br /&gt;
  static struct rc_keymap name_of_my_new_keyboard_map = {&lt;br /&gt;
          .map = {&lt;br /&gt;
                  .scan    = name_of_my_new_keyboard,&lt;br /&gt;
                  .size    = ARRAY_SIZE(name_of_my_new_keyboard),&lt;br /&gt;
                  .ir_type = IR_TYPE_NEC,&lt;br /&gt;
                  .name    = RC_MAP_EMPTY,&lt;br /&gt;
          }&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
===IR Keycode map used by media devices===&lt;br /&gt;
&lt;br /&gt;
While there has been effort over the years to keep track of the varying IR layouts (documenting them within ir-common.c), unfortunately, there was never any effort to uniform the actual IR keycodes used by the different devices.  This lack of uniformity resulted in cases where the same IR keyname was mapped completely different on different IR's.  The overall state of confusion that existed is perhaps best demonstrated by viewing what [[ir-common.c]] IR summary looked like as of Aug, 26 2009.&lt;br /&gt;
&lt;br /&gt;
On Aug, 27 2009, having a common mapping for supported IR's became the subject of a [[Development: A proposal for a common IR keycode definition map|proposal]] which would allow userspace applications to make use of common keycode definitions. The table bellow reflects the expected keycode mappings for IR keys.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!Key code&lt;br /&gt;
!Meaning&lt;br /&gt;
!Key examples on IR&lt;br /&gt;
!Notes&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Numeric keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_0 || Keyboard digit 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
|KEY_1 || Keyboard digit 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
|KEY_2 || Keyboard digit 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
|KEY_3 || Keyboard digit 3 || 3&lt;br /&gt;
|-&lt;br /&gt;
|KEY_4 || Keyboard digit 4 || 4&lt;br /&gt;
|-&lt;br /&gt;
|KEY_5 || Keyboard digit 5 || 5&lt;br /&gt;
|-&lt;br /&gt;
|KEY_6 || Keyboard digit 6 || 6&lt;br /&gt;
|-&lt;br /&gt;
|KEY_7 || Keyboard digit 7 || 7&lt;br /&gt;
|-&lt;br /&gt;
|KEY_8 || Keyboard digit 8 || 8&lt;br /&gt;
|-&lt;br /&gt;
|KEY_9 || Keyboard digit 9 || 9&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Movie play control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FORWARD || Instantly advance in time ||  &amp;gt;&amp;gt; / FORWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BACK || Instantly go back in time || &amp;lt;&amp;lt;&amp;lt; / BACK&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FASTFORWARD || Play movie faster ||  &amp;gt;&amp;gt;&amp;gt; / FORWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_REWIND || Play movie back || REWIND / BACKWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_NEXT || Select next chapter / sub-chapter / interval || NEXT / SKIP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PREVIOUS || Select previous chapter / sub-chapter / interval ||  BACK / |&amp;lt;&amp;lt; /  PREV / PREVIOUS&lt;br /&gt;
|-&lt;br /&gt;
|KEY_AGAIN || Repeat the video or a video interval || REPEAT / LOOP / RECALL&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PAUSE || Pause stream ||  PAUSE / FREEZE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PLAY || Play movie at the normal timeshift ||  NORMAL TIMESHIFT / LIVE / &amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PLAYPAUSE || Alternate between play and pause || PLAY / PAUSE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_STOP || Stop stream ||  STOP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_RECORD || Start/stop recording stream ||  CAPTURE / REC / RECORD/PAUSE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CAMERA || Take a picture of the image ||  CAMERA ICON / CAPTURE / SNAPSHOT&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SHUFFLE || Enable shuffle mode ||  SHUFFLE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TIME || Activate time shift mode ||  TIME SHIFT &lt;br /&gt;
|-&lt;br /&gt;
|KEY_TITLE || Allow changing the chapter || CHAPTER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SUBTITLE || Allow changing the subtitle || SUBTITLE&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Image control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BRIGHTNESSDOWN || Decrease Brightness ||  BRIGHTNESS DECREASE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_BRIGHTNESSUP || Increase Brightness ||  BRIGHTNESS INCREASE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_ANGLE || Switch video camera angle (on videos with more than one angle stored) || ANGLE / SWAP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_EPG || Open the Electronic Play Guide (EPG) || EPG / GUIDE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TEXT || Activate/change closed caption mode ||  CLOSED CAPTION/TELETEXT / DVD TEXT / TELETEXT / TTX&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Audio control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_AUDIO || Change audio source || AUDIO SOURCE / AUDIO / MUSIC&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MUTE || Mute/unmute audio ||  MUTE / DEMUTE / UNMUTE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VOLUMEDOWN || Decrease volume ||  VOLUME- / VOLUME DOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VOLUMEUP || Increase volume ||  VOLUME+ / VOLUME UP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MODE || Change sound mode || MONO/STEREO&lt;br /&gt;
|-&lt;br /&gt;
|KEY_LANGUAGE || Select Language ||  1ST / 2ND LANGUAGE / DVD LANG / MTS/SAP / MTS SEL&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Channel control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNEL || Go to the next favorite channel ||  ALT / CHANNEL / CH SURFING / SURF / FAV&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNELDOWN || Decrease channel sequencially ||  CHANNEL - / CHANNEL DOWN / DOWN &lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNELUP || Increase channel sequencially ||  CHANNEL + / CHANNEL UP / UP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DIGITS || Use more than one digit for channel ||  PLUS / 100/ 1xx / xxx /  -/--  / Single Double Triple Digit&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SEARCH || Start channel autoscan ||  SCAN / AUTOSCAN&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Colored keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BLUE || IR “Blue” key &lt;br /&gt;
|style= &amp;quot;color: blue&amp;quot; | BLUE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_GREEN || IR “Green” Key &lt;br /&gt;
|style= &amp;quot;color: green&amp;quot; | GREEN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RED || IR “Red” key &lt;br /&gt;
|style= &amp;quot;color: red&amp;quot; | RED &lt;br /&gt;
|-&lt;br /&gt;
|KEY_YELLOW || IR “Yellow” key &lt;br /&gt;
|style= &amp;quot;color: yellow&amp;quot; | YELLOW&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Media selection&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CD || Change input source to Compact Disc ||  CD &lt;br /&gt;
|-&lt;br /&gt;
|KEY_DVD || Change input to DVD ||  DVD / DVD MENU &lt;br /&gt;
|-&lt;br /&gt;
|KEY_EJECTCLOSECD || Open/close the CD/DVD player ||  -&amp;gt; ) / CLOSE / OPEN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MEDIA || Turn on/off Media application ||  PC/TV /  TURN ON/OFF APP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_PC || Selects from TV to PC || PC&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RADIO || Put into AM/FM radio mode ||  RADIO / TV/FM / TV/RADIO / FM / FM/RADIO&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TV || Select tv mode || TV / LIVE TV&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TV2 || Select Cable mode ||  AIR/CBL &lt;br /&gt;
|-&lt;br /&gt;
|KEY_VCR || Select VCR mode ||  VCR MODE / DTR&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VIDEO || Alternate between input modes || SOURCE / SELECT / DISPLAY / SWITCH INPUTS / VIDEO&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Power control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_POWER || Turn on/off computer ||  SYSTEM POWER / COMPUTER POWER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_POWER2 || Turn on/off application ||  TV ON/OFF / POWER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SLEEP || Activate sleep timer ||  SLEEP / SLEEP TIMER &lt;br /&gt;
|-&lt;br /&gt;
|KEY_SUSPEND || Put computer into suspend mode ||  STANDBY / SUSPEND &lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Window control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CLEAR || Stop stream and return to default input video/audio ||  CLEAR / RESET / BOSS KEY&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CYCLEWINDOWS || Minimize windows and move to the next one || ALT-TAB / MINIMIZE / DESKTOP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FAVORITES || Open the favorites stream window || TV WALL / Favorites&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MENU || Call application menu ||  2ND CONTROLS (USA: MENU) / DVD/MENU / SHOW/HIDE CTRL&lt;br /&gt;
|-&lt;br /&gt;
|KEY_NEW || Open/Close Picture in Picture ||  PIP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_OK || Send a confirmation code to application || OK / ENTER / RETURN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SCREEN || Select screen aspect ratio ||  4:3 16:9 SELECT &lt;br /&gt;
|-&lt;br /&gt;
|KEY_ZOOM || Put device into zoom/full screen mode ||  ZOOM / FULL SCREEN / ZOOM+ / HIDE PANNEL / SWITCH&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Navigation keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_ESC || Cancel current operation || CANCEL / BACK&lt;br /&gt;
|-&lt;br /&gt;
|KEY_HELP || Open a Help window ||  HELP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_HOMEPAGE || Navigate to Homepage || HOME&lt;br /&gt;
|-&lt;br /&gt;
|KEY_INFO || Open On Screen Display ||  DISPLAY INFORMATION / OSD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_WWW || Open the default browser ||  WEB &lt;br /&gt;
|-&lt;br /&gt;
|KEY_UP || Up key || UP || On simpler IR's, without separate channel keys, you need to map UP as KEY_CHANNELUP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DOWN || Down key || DOWN || On simpler IR's, without separate channel keys, you need to map DOWN as KEY_CHANNELDOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_LEFT || Left key || LEFT || On simpler IR's, without separate volume keys, you need to map LEFT as KEY_VOLUMEDOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RIGHT || Right key || RIGHT || On simpler IR's, without separate volume keys, you need to map RIGHT as KEY_VOLUMEUP&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Miscelaneous keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DOT || Return a dot ||  . &lt;br /&gt;
|-&lt;br /&gt;
|KEY_FN || Select a function ||  FUNCTION &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Technical details about IR===&lt;br /&gt;
http://linuxtv.org/wiki/index.php/Remote_controllers-V4L&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Remote_Controllers</id>
		<title>Remote Controllers</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Remote_Controllers"/>
				<updated>2010-05-12T18:41:24Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Adding support for new IR's */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently, most analog and digital devices have an Infrared input for a remote control. Each manufacturer has their own type of control. It is not uncommon for the same manufacturer to ship different types of remote controls, depending on the device. &lt;br /&gt;
&lt;br /&gt;
===Adding support for new IR's===&lt;br /&gt;
&lt;br /&gt;
In order to add support for a new keyboard, you need first to discover how the IR code is sent to the device. There are several possibilities:&lt;br /&gt;
  * IR sensor is directly connected with a GPIO pin of the PCI/USB bridge. This is a very common case nowadays.&lt;br /&gt;
     * This is probably the easiest way to add support, provided that the driver has already other similar devices. For an example, please see: [add IR support for saa7134].&lt;br /&gt;
  * Bridge has an IR decoder inside. Some chipsets have already some internal decoder for IR, like dib0700 and em2884;&lt;br /&gt;
  * There's a small chip that does serial to parallel conversion, outputting the IR code at several GPIO pins.&lt;br /&gt;
&lt;br /&gt;
The way to get the data is hardware specific. Once the driver is able to get an IR scancode, it is generally required to create a new table for it.&lt;br /&gt;
  NOTE: before adding a new table, please check if the existing ones have already the proper mapping.&lt;br /&gt;
&lt;br /&gt;
The first step to add a new map is to create an alias for it atinclude/media/rc-map.h:&lt;br /&gt;
&lt;br /&gt;
  /* Names of the several keytables defined in-kernel */&lt;br /&gt;
&lt;br /&gt;
  #define RC_MAP_ADSTECH_DVB_T_PCI         &amp;quot;rc-adstech-dvb-t-pci&amp;quot;&lt;br /&gt;
  ...&lt;br /&gt;
  #define RC_MAP_VIDEOMATE_TV_PVR          &amp;quot;rc-videomate-tv-pvr&amp;quot;&lt;br /&gt;
  #define RC_MAP_WINFAST                   &amp;quot;rc-winfast&amp;quot;&lt;br /&gt;
  #define RC_MAP_WINFAST_USBII_DELUXE      &amp;quot;rc-winfast-usbii-deluxe&amp;quot;&lt;br /&gt;
  /*&lt;br /&gt;
   * Please, do not just append newer Remote Controller names at the end.&lt;br /&gt;
   * The names should be ordered in alphabetical order&lt;br /&gt;
   */&lt;br /&gt;
&lt;br /&gt;
Just add a new line there with the IR name, on alphabetical order:&lt;br /&gt;
  #define RC_MAP_NAME_OF_MY_NEW_BOARD_MAP  &amp;quot;rc-name-of-my-new-board-map&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then copy one of the existing keymaps, for example, drivers/media/IR/keymaps/rc-empty.c,&lt;br /&gt;
replacing the names for the name of your new IR.&lt;br /&gt;
&lt;br /&gt;
Remove all keys at static struct ir_scancode, and add your new keycodes.&lt;br /&gt;
&lt;br /&gt;
For example, assuming that you have a driver with raw decode. By loading ir_core with debug=1, with:&lt;br /&gt;
  modprobe ir_core debug=1&lt;br /&gt;
  (be sure that ir_core weren't loaded before)&lt;br /&gt;
you'll start to generate lots of logs at the syslog. Use the dmesg command to get those codes:&lt;br /&gt;
  dmesg |grep scancode&lt;br /&gt;
&lt;br /&gt;
Let's assume that this get you the following results:&lt;br /&gt;
for power key:&lt;br /&gt;
  ir_nec_decode: NEC scancode 0x0300&lt;br /&gt;
  ir_getkeycode: unknown key for scancode 0x0300&lt;br /&gt;
for channel up key:&lt;br /&gt;
  ir_nec_decode: NEC scancode 0x030c&lt;br /&gt;
  ir_getkeycode: unknown key for scancode 0x030c&lt;br /&gt;
for channel down key:&lt;br /&gt;
  ir_nec_decode: NEC scancode 0x0310&lt;br /&gt;
  ir_getkeycode: unknown key for scancode 0x0310&lt;br /&gt;
&lt;br /&gt;
All you need to do is to make sure that those codes are properly mapped at the keycode table:&lt;br /&gt;
&lt;br /&gt;
  static struct ir_scancode rc_name_of_my_new_keyboard_map[] = {&lt;br /&gt;
          { 0x300, KEY_POWER2 },&lt;br /&gt;
          { 0x30c, KEY_CHANNEL_UP },&lt;br /&gt;
          { 0x310, KEY_CHANNEL_DOWN },&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
===IR Keycode map used by media devices===&lt;br /&gt;
&lt;br /&gt;
While there has been effort over the years to keep track of the varying IR layouts (documenting them within ir-common.c), unfortunately, there was never any effort to uniform the actual IR keycodes used by the different devices.  This lack of uniformity resulted in cases where the same IR keyname was mapped completely different on different IR's.  The overall state of confusion that existed is perhaps best demonstrated by viewing what [[ir-common.c]] IR summary looked like as of Aug, 26 2009.&lt;br /&gt;
&lt;br /&gt;
On Aug, 27 2009, having a common mapping for supported IR's became the subject of a [[Development: A proposal for a common IR keycode definition map|proposal]] which would allow userspace applications to make use of common keycode definitions. The table bellow reflects the expected keycode mappings for IR keys.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!Key code&lt;br /&gt;
!Meaning&lt;br /&gt;
!Key examples on IR&lt;br /&gt;
!Notes&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Numeric keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_0 || Keyboard digit 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
|KEY_1 || Keyboard digit 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
|KEY_2 || Keyboard digit 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
|KEY_3 || Keyboard digit 3 || 3&lt;br /&gt;
|-&lt;br /&gt;
|KEY_4 || Keyboard digit 4 || 4&lt;br /&gt;
|-&lt;br /&gt;
|KEY_5 || Keyboard digit 5 || 5&lt;br /&gt;
|-&lt;br /&gt;
|KEY_6 || Keyboard digit 6 || 6&lt;br /&gt;
|-&lt;br /&gt;
|KEY_7 || Keyboard digit 7 || 7&lt;br /&gt;
|-&lt;br /&gt;
|KEY_8 || Keyboard digit 8 || 8&lt;br /&gt;
|-&lt;br /&gt;
|KEY_9 || Keyboard digit 9 || 9&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Movie play control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FORWARD || Instantly advance in time ||  &amp;gt;&amp;gt; / FORWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BACK || Instantly go back in time || &amp;lt;&amp;lt;&amp;lt; / BACK&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FASTFORWARD || Play movie faster ||  &amp;gt;&amp;gt;&amp;gt; / FORWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_REWIND || Play movie back || REWIND / BACKWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_NEXT || Select next chapter / sub-chapter / interval || NEXT / SKIP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PREVIOUS || Select previous chapter / sub-chapter / interval ||  BACK / |&amp;lt;&amp;lt; /  PREV / PREVIOUS&lt;br /&gt;
|-&lt;br /&gt;
|KEY_AGAIN || Repeat the video or a video interval || REPEAT / LOOP / RECALL&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PAUSE || Pause stream ||  PAUSE / FREEZE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PLAY || Play movie at the normal timeshift ||  NORMAL TIMESHIFT / LIVE / &amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PLAYPAUSE || Alternate between play and pause || PLAY / PAUSE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_STOP || Stop stream ||  STOP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_RECORD || Start/stop recording stream ||  CAPTURE / REC / RECORD/PAUSE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CAMERA || Take a picture of the image ||  CAMERA ICON / CAPTURE / SNAPSHOT&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SHUFFLE || Enable shuffle mode ||  SHUFFLE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TIME || Activate time shift mode ||  TIME SHIFT &lt;br /&gt;
|-&lt;br /&gt;
|KEY_TITLE || Allow changing the chapter || CHAPTER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SUBTITLE || Allow changing the subtitle || SUBTITLE&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Image control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BRIGHTNESSDOWN || Decrease Brightness ||  BRIGHTNESS DECREASE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_BRIGHTNESSUP || Increase Brightness ||  BRIGHTNESS INCREASE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_ANGLE || Switch video camera angle (on videos with more than one angle stored) || ANGLE / SWAP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_EPG || Open the Electronic Play Guide (EPG) || EPG / GUIDE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TEXT || Activate/change closed caption mode ||  CLOSED CAPTION/TELETEXT / DVD TEXT / TELETEXT / TTX&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Audio control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_AUDIO || Change audio source || AUDIO SOURCE / AUDIO / MUSIC&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MUTE || Mute/unmute audio ||  MUTE / DEMUTE / UNMUTE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VOLUMEDOWN || Decrease volume ||  VOLUME- / VOLUME DOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VOLUMEUP || Increase volume ||  VOLUME+ / VOLUME UP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MODE || Change sound mode || MONO/STEREO&lt;br /&gt;
|-&lt;br /&gt;
|KEY_LANGUAGE || Select Language ||  1ST / 2ND LANGUAGE / DVD LANG / MTS/SAP / MTS SEL&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Channel control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNEL || Go to the next favorite channel ||  ALT / CHANNEL / CH SURFING / SURF / FAV&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNELDOWN || Decrease channel sequencially ||  CHANNEL - / CHANNEL DOWN / DOWN &lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNELUP || Increase channel sequencially ||  CHANNEL + / CHANNEL UP / UP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DIGITS || Use more than one digit for channel ||  PLUS / 100/ 1xx / xxx /  -/--  / Single Double Triple Digit&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SEARCH || Start channel autoscan ||  SCAN / AUTOSCAN&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Colored keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BLUE || IR “Blue” key &lt;br /&gt;
|style= &amp;quot;color: blue&amp;quot; | BLUE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_GREEN || IR “Green” Key &lt;br /&gt;
|style= &amp;quot;color: green&amp;quot; | GREEN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RED || IR “Red” key &lt;br /&gt;
|style= &amp;quot;color: red&amp;quot; | RED &lt;br /&gt;
|-&lt;br /&gt;
|KEY_YELLOW || IR “Yellow” key &lt;br /&gt;
|style= &amp;quot;color: yellow&amp;quot; | YELLOW&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Media selection&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CD || Change input source to Compact Disc ||  CD &lt;br /&gt;
|-&lt;br /&gt;
|KEY_DVD || Change input to DVD ||  DVD / DVD MENU &lt;br /&gt;
|-&lt;br /&gt;
|KEY_EJECTCLOSECD || Open/close the CD/DVD player ||  -&amp;gt; ) / CLOSE / OPEN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MEDIA || Turn on/off Media application ||  PC/TV /  TURN ON/OFF APP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_PC || Selects from TV to PC || PC&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RADIO || Put into AM/FM radio mode ||  RADIO / TV/FM / TV/RADIO / FM / FM/RADIO&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TV || Select tv mode || TV / LIVE TV&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TV2 || Select Cable mode ||  AIR/CBL &lt;br /&gt;
|-&lt;br /&gt;
|KEY_VCR || Select VCR mode ||  VCR MODE / DTR&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VIDEO || Alternate between input modes || SOURCE / SELECT / DISPLAY / SWITCH INPUTS / VIDEO&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Power control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_POWER || Turn on/off computer ||  SYSTEM POWER / COMPUTER POWER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_POWER2 || Turn on/off application ||  TV ON/OFF / POWER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SLEEP || Activate sleep timer ||  SLEEP / SLEEP TIMER &lt;br /&gt;
|-&lt;br /&gt;
|KEY_SUSPEND || Put computer into suspend mode ||  STANDBY / SUSPEND &lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Window control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CLEAR || Stop stream and return to default input video/audio ||  CLEAR / RESET / BOSS KEY&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CYCLEWINDOWS || Minimize windows and move to the next one || ALT-TAB / MINIMIZE / DESKTOP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FAVORITES || Open the favorites stream window || TV WALL / Favorites&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MENU || Call application menu ||  2ND CONTROLS (USA: MENU) / DVD/MENU / SHOW/HIDE CTRL&lt;br /&gt;
|-&lt;br /&gt;
|KEY_NEW || Open/Close Picture in Picture ||  PIP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_OK || Send a confirmation code to application || OK / ENTER / RETURN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SCREEN || Select screen aspect ratio ||  4:3 16:9 SELECT &lt;br /&gt;
|-&lt;br /&gt;
|KEY_ZOOM || Put device into zoom/full screen mode ||  ZOOM / FULL SCREEN / ZOOM+ / HIDE PANNEL / SWITCH&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Navigation keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_ESC || Cancel current operation || CANCEL / BACK&lt;br /&gt;
|-&lt;br /&gt;
|KEY_HELP || Open a Help window ||  HELP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_HOMEPAGE || Navigate to Homepage || HOME&lt;br /&gt;
|-&lt;br /&gt;
|KEY_INFO || Open On Screen Display ||  DISPLAY INFORMATION / OSD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_WWW || Open the default browser ||  WEB &lt;br /&gt;
|-&lt;br /&gt;
|KEY_UP || Up key || UP || On simpler IR's, without separate channel keys, you need to map UP as KEY_CHANNELUP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DOWN || Down key || DOWN || On simpler IR's, without separate channel keys, you need to map DOWN as KEY_CHANNELDOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_LEFT || Left key || LEFT || On simpler IR's, without separate volume keys, you need to map LEFT as KEY_VOLUMEDOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RIGHT || Right key || RIGHT || On simpler IR's, without separate volume keys, you need to map RIGHT as KEY_VOLUMEUP&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Miscelaneous keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DOT || Return a dot ||  . &lt;br /&gt;
|-&lt;br /&gt;
|KEY_FN || Select a function ||  FUNCTION &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Technical details about IR===&lt;br /&gt;
http://linuxtv.org/wiki/index.php/Remote_controllers-V4L&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Remote_Controllers</id>
		<title>Remote Controllers</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Remote_Controllers"/>
				<updated>2010-05-12T18:34:48Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Adding support for new IR's */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently, most analog and digital devices have an Infrared input for a remote control. Each manufacturer has their own type of control. It is not uncommon for the same manufacturer to ship different types of remote controls, depending on the device. &lt;br /&gt;
&lt;br /&gt;
===Adding support for new IR's===&lt;br /&gt;
&lt;br /&gt;
In order to add support for a new keyboard, you need first to discover how the IR code is sent to the device. There are several possibilities:&lt;br /&gt;
  * IR sensor is directly connected with a GPIO pin of the PCI/USB bridge. This is a very common case nowadays.&lt;br /&gt;
     * This is probably the easiest way to add support, provided that the driver has already other similar devices. For an example, please see: [add IR support for saa7134].&lt;br /&gt;
  * Bridge has an IR decoder inside. Some chipsets have already some internal decoder for IR, like dib0700 and em2884;&lt;br /&gt;
  * There's a small chip that does serial to parallel conversion, outputting the IR code at several GPIO pins.&lt;br /&gt;
&lt;br /&gt;
The way to get the data is hardware specific. Once the driver is able to get an IR scancode, it is generally required to create a new table for it.&lt;br /&gt;
  NOTE: before adding a new table, please check if the existing ones have already the proper mapping.&lt;br /&gt;
&lt;br /&gt;
The first step to add a new map is to create an alias for it atinclude/media/rc-map.h:&lt;br /&gt;
&lt;br /&gt;
  /* Names of the several keytables defined in-kernel */&lt;br /&gt;
&lt;br /&gt;
  #define RC_MAP_ADSTECH_DVB_T_PCI         &amp;quot;rc-adstech-dvb-t-pci&amp;quot;&lt;br /&gt;
  ...&lt;br /&gt;
  #define RC_MAP_VIDEOMATE_TV_PVR          &amp;quot;rc-videomate-tv-pvr&amp;quot;&lt;br /&gt;
  #define RC_MAP_WINFAST                   &amp;quot;rc-winfast&amp;quot;&lt;br /&gt;
  #define RC_MAP_WINFAST_USBII_DELUXE      &amp;quot;rc-winfast-usbii-deluxe&amp;quot;&lt;br /&gt;
  /*&lt;br /&gt;
   * Please, do not just append newer Remote Controller names at the end.&lt;br /&gt;
   * The names should be ordered in alphabetical order&lt;br /&gt;
   */&lt;br /&gt;
&lt;br /&gt;
Just add a new line there with the IR name, on alphabetical order:&lt;br /&gt;
  #define RC_MAP_NAME_OF_MY_NEW_BOARD_MAP  &amp;quot;rc-name-of-my-new-board-map&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then copy one of the existing keymaps, for example, drivers/media/IR/keymaps/rc-empty.c,&lt;br /&gt;
replacing the names for the name of your new IR.&lt;br /&gt;
&lt;br /&gt;
Remove all keys at static struct ir_scancode, and add your new keycodes.&lt;br /&gt;
&lt;br /&gt;
===IR Keycode map used by media devices===&lt;br /&gt;
&lt;br /&gt;
While there has been effort over the years to keep track of the varying IR layouts (documenting them within ir-common.c), unfortunately, there was never any effort to uniform the actual IR keycodes used by the different devices.  This lack of uniformity resulted in cases where the same IR keyname was mapped completely different on different IR's.  The overall state of confusion that existed is perhaps best demonstrated by viewing what [[ir-common.c]] IR summary looked like as of Aug, 26 2009.&lt;br /&gt;
&lt;br /&gt;
On Aug, 27 2009, having a common mapping for supported IR's became the subject of a [[Development: A proposal for a common IR keycode definition map|proposal]] which would allow userspace applications to make use of common keycode definitions. The table bellow reflects the expected keycode mappings for IR keys.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!Key code&lt;br /&gt;
!Meaning&lt;br /&gt;
!Key examples on IR&lt;br /&gt;
!Notes&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Numeric keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_0 || Keyboard digit 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
|KEY_1 || Keyboard digit 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
|KEY_2 || Keyboard digit 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
|KEY_3 || Keyboard digit 3 || 3&lt;br /&gt;
|-&lt;br /&gt;
|KEY_4 || Keyboard digit 4 || 4&lt;br /&gt;
|-&lt;br /&gt;
|KEY_5 || Keyboard digit 5 || 5&lt;br /&gt;
|-&lt;br /&gt;
|KEY_6 || Keyboard digit 6 || 6&lt;br /&gt;
|-&lt;br /&gt;
|KEY_7 || Keyboard digit 7 || 7&lt;br /&gt;
|-&lt;br /&gt;
|KEY_8 || Keyboard digit 8 || 8&lt;br /&gt;
|-&lt;br /&gt;
|KEY_9 || Keyboard digit 9 || 9&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Movie play control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FORWARD || Instantly advance in time ||  &amp;gt;&amp;gt; / FORWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BACK || Instantly go back in time || &amp;lt;&amp;lt;&amp;lt; / BACK&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FASTFORWARD || Play movie faster ||  &amp;gt;&amp;gt;&amp;gt; / FORWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_REWIND || Play movie back || REWIND / BACKWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_NEXT || Select next chapter / sub-chapter / interval || NEXT / SKIP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PREVIOUS || Select previous chapter / sub-chapter / interval ||  BACK / |&amp;lt;&amp;lt; /  PREV / PREVIOUS&lt;br /&gt;
|-&lt;br /&gt;
|KEY_AGAIN || Repeat the video or a video interval || REPEAT / LOOP / RECALL&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PAUSE || Pause stream ||  PAUSE / FREEZE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PLAY || Play movie at the normal timeshift ||  NORMAL TIMESHIFT / LIVE / &amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PLAYPAUSE || Alternate between play and pause || PLAY / PAUSE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_STOP || Stop stream ||  STOP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_RECORD || Start/stop recording stream ||  CAPTURE / REC / RECORD/PAUSE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CAMERA || Take a picture of the image ||  CAMERA ICON / CAPTURE / SNAPSHOT&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SHUFFLE || Enable shuffle mode ||  SHUFFLE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TIME || Activate time shift mode ||  TIME SHIFT &lt;br /&gt;
|-&lt;br /&gt;
|KEY_TITLE || Allow changing the chapter || CHAPTER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SUBTITLE || Allow changing the subtitle || SUBTITLE&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Image control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BRIGHTNESSDOWN || Decrease Brightness ||  BRIGHTNESS DECREASE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_BRIGHTNESSUP || Increase Brightness ||  BRIGHTNESS INCREASE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_ANGLE || Switch video camera angle (on videos with more than one angle stored) || ANGLE / SWAP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_EPG || Open the Electronic Play Guide (EPG) || EPG / GUIDE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TEXT || Activate/change closed caption mode ||  CLOSED CAPTION/TELETEXT / DVD TEXT / TELETEXT / TTX&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Audio control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_AUDIO || Change audio source || AUDIO SOURCE / AUDIO / MUSIC&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MUTE || Mute/unmute audio ||  MUTE / DEMUTE / UNMUTE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VOLUMEDOWN || Decrease volume ||  VOLUME- / VOLUME DOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VOLUMEUP || Increase volume ||  VOLUME+ / VOLUME UP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MODE || Change sound mode || MONO/STEREO&lt;br /&gt;
|-&lt;br /&gt;
|KEY_LANGUAGE || Select Language ||  1ST / 2ND LANGUAGE / DVD LANG / MTS/SAP / MTS SEL&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Channel control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNEL || Go to the next favorite channel ||  ALT / CHANNEL / CH SURFING / SURF / FAV&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNELDOWN || Decrease channel sequencially ||  CHANNEL - / CHANNEL DOWN / DOWN &lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNELUP || Increase channel sequencially ||  CHANNEL + / CHANNEL UP / UP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DIGITS || Use more than one digit for channel ||  PLUS / 100/ 1xx / xxx /  -/--  / Single Double Triple Digit&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SEARCH || Start channel autoscan ||  SCAN / AUTOSCAN&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Colored keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BLUE || IR “Blue” key &lt;br /&gt;
|style= &amp;quot;color: blue&amp;quot; | BLUE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_GREEN || IR “Green” Key &lt;br /&gt;
|style= &amp;quot;color: green&amp;quot; | GREEN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RED || IR “Red” key &lt;br /&gt;
|style= &amp;quot;color: red&amp;quot; | RED &lt;br /&gt;
|-&lt;br /&gt;
|KEY_YELLOW || IR “Yellow” key &lt;br /&gt;
|style= &amp;quot;color: yellow&amp;quot; | YELLOW&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Media selection&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CD || Change input source to Compact Disc ||  CD &lt;br /&gt;
|-&lt;br /&gt;
|KEY_DVD || Change input to DVD ||  DVD / DVD MENU &lt;br /&gt;
|-&lt;br /&gt;
|KEY_EJECTCLOSECD || Open/close the CD/DVD player ||  -&amp;gt; ) / CLOSE / OPEN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MEDIA || Turn on/off Media application ||  PC/TV /  TURN ON/OFF APP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_PC || Selects from TV to PC || PC&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RADIO || Put into AM/FM radio mode ||  RADIO / TV/FM / TV/RADIO / FM / FM/RADIO&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TV || Select tv mode || TV / LIVE TV&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TV2 || Select Cable mode ||  AIR/CBL &lt;br /&gt;
|-&lt;br /&gt;
|KEY_VCR || Select VCR mode ||  VCR MODE / DTR&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VIDEO || Alternate between input modes || SOURCE / SELECT / DISPLAY / SWITCH INPUTS / VIDEO&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Power control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_POWER || Turn on/off computer ||  SYSTEM POWER / COMPUTER POWER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_POWER2 || Turn on/off application ||  TV ON/OFF / POWER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SLEEP || Activate sleep timer ||  SLEEP / SLEEP TIMER &lt;br /&gt;
|-&lt;br /&gt;
|KEY_SUSPEND || Put computer into suspend mode ||  STANDBY / SUSPEND &lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Window control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CLEAR || Stop stream and return to default input video/audio ||  CLEAR / RESET / BOSS KEY&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CYCLEWINDOWS || Minimize windows and move to the next one || ALT-TAB / MINIMIZE / DESKTOP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FAVORITES || Open the favorites stream window || TV WALL / Favorites&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MENU || Call application menu ||  2ND CONTROLS (USA: MENU) / DVD/MENU / SHOW/HIDE CTRL&lt;br /&gt;
|-&lt;br /&gt;
|KEY_NEW || Open/Close Picture in Picture ||  PIP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_OK || Send a confirmation code to application || OK / ENTER / RETURN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SCREEN || Select screen aspect ratio ||  4:3 16:9 SELECT &lt;br /&gt;
|-&lt;br /&gt;
|KEY_ZOOM || Put device into zoom/full screen mode ||  ZOOM / FULL SCREEN / ZOOM+ / HIDE PANNEL / SWITCH&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Navigation keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_ESC || Cancel current operation || CANCEL / BACK&lt;br /&gt;
|-&lt;br /&gt;
|KEY_HELP || Open a Help window ||  HELP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_HOMEPAGE || Navigate to Homepage || HOME&lt;br /&gt;
|-&lt;br /&gt;
|KEY_INFO || Open On Screen Display ||  DISPLAY INFORMATION / OSD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_WWW || Open the default browser ||  WEB &lt;br /&gt;
|-&lt;br /&gt;
|KEY_UP || Up key || UP || On simpler IR's, without separate channel keys, you need to map UP as KEY_CHANNELUP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DOWN || Down key || DOWN || On simpler IR's, without separate channel keys, you need to map DOWN as KEY_CHANNELDOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_LEFT || Left key || LEFT || On simpler IR's, without separate volume keys, you need to map LEFT as KEY_VOLUMEDOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RIGHT || Right key || RIGHT || On simpler IR's, without separate volume keys, you need to map RIGHT as KEY_VOLUMEUP&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Miscelaneous keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DOT || Return a dot ||  . &lt;br /&gt;
|-&lt;br /&gt;
|KEY_FN || Select a function ||  FUNCTION &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Technical details about IR===&lt;br /&gt;
http://linuxtv.org/wiki/index.php/Remote_controllers-V4L&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Remote_Controllers</id>
		<title>Remote Controllers</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Remote_Controllers"/>
				<updated>2010-05-12T18:20:45Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently, most analog and digital devices have an Infrared input for a remote control. Each manufacturer has their own type of control. It is not uncommon for the same manufacturer to ship different types of remote controls, depending on the device. &lt;br /&gt;
&lt;br /&gt;
===Adding support for new IR's===&lt;br /&gt;
&lt;br /&gt;
To do.&lt;br /&gt;
&lt;br /&gt;
===IR Keycode map used by media devices===&lt;br /&gt;
&lt;br /&gt;
While there has been effort over the years to keep track of the varying IR layouts (documenting them within ir-common.c), unfortunately, there was never any effort to uniform the actual IR keycodes used by the different devices.  This lack of uniformity resulted in cases where the same IR keyname was mapped completely different on different IR's.  The overall state of confusion that existed is perhaps best demonstrated by viewing what [[ir-common.c]] IR summary looked like as of Aug, 26 2009.&lt;br /&gt;
&lt;br /&gt;
On Aug, 27 2009, having a common mapping for supported IR's became the subject of a [[Development: A proposal for a common IR keycode definition map|proposal]] which would allow userspace applications to make use of common keycode definitions. The table bellow reflects the expected keycode mappings for IR keys.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!Key code&lt;br /&gt;
!Meaning&lt;br /&gt;
!Key examples on IR&lt;br /&gt;
!Notes&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Numeric keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_0 || Keyboard digit 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
|KEY_1 || Keyboard digit 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
|KEY_2 || Keyboard digit 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
|KEY_3 || Keyboard digit 3 || 3&lt;br /&gt;
|-&lt;br /&gt;
|KEY_4 || Keyboard digit 4 || 4&lt;br /&gt;
|-&lt;br /&gt;
|KEY_5 || Keyboard digit 5 || 5&lt;br /&gt;
|-&lt;br /&gt;
|KEY_6 || Keyboard digit 6 || 6&lt;br /&gt;
|-&lt;br /&gt;
|KEY_7 || Keyboard digit 7 || 7&lt;br /&gt;
|-&lt;br /&gt;
|KEY_8 || Keyboard digit 8 || 8&lt;br /&gt;
|-&lt;br /&gt;
|KEY_9 || Keyboard digit 9 || 9&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Movie play control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FORWARD || Instantly advance in time ||  &amp;gt;&amp;gt; / FORWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BACK || Instantly go back in time || &amp;lt;&amp;lt;&amp;lt; / BACK&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FASTFORWARD || Play movie faster ||  &amp;gt;&amp;gt;&amp;gt; / FORWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_REWIND || Play movie back || REWIND / BACKWARD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_NEXT || Select next chapter / sub-chapter / interval || NEXT / SKIP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PREVIOUS || Select previous chapter / sub-chapter / interval ||  BACK / |&amp;lt;&amp;lt; /  PREV / PREVIOUS&lt;br /&gt;
|-&lt;br /&gt;
|KEY_AGAIN || Repeat the video or a video interval || REPEAT / LOOP / RECALL&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PAUSE || Pause stream ||  PAUSE / FREEZE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PLAY || Play movie at the normal timeshift ||  NORMAL TIMESHIFT / LIVE / &amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|KEY_PLAYPAUSE || Alternate between play and pause || PLAY / PAUSE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_STOP || Stop stream ||  STOP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_RECORD || Start/stop recording stream ||  CAPTURE / REC / RECORD/PAUSE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CAMERA || Take a picture of the image ||  CAMERA ICON / CAPTURE / SNAPSHOT&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SHUFFLE || Enable shuffle mode ||  SHUFFLE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TIME || Activate time shift mode ||  TIME SHIFT &lt;br /&gt;
|-&lt;br /&gt;
|KEY_TITLE || Allow changing the chapter || CHAPTER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SUBTITLE || Allow changing the subtitle || SUBTITLE&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Image control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BRIGHTNESSDOWN || Decrease Brightness ||  BRIGHTNESS DECREASE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_BRIGHTNESSUP || Increase Brightness ||  BRIGHTNESS INCREASE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_ANGLE || Switch video camera angle (on videos with more than one angle stored) || ANGLE / SWAP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_EPG || Open the Electronic Play Guide (EPG) || EPG / GUIDE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TEXT || Activate/change closed caption mode ||  CLOSED CAPTION/TELETEXT / DVD TEXT / TELETEXT / TTX&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Audio control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_AUDIO || Change audio source || AUDIO SOURCE / AUDIO / MUSIC&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MUTE || Mute/unmute audio ||  MUTE / DEMUTE / UNMUTE&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VOLUMEDOWN || Decrease volume ||  VOLUME- / VOLUME DOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VOLUMEUP || Increase volume ||  VOLUME+ / VOLUME UP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MODE || Change sound mode || MONO/STEREO&lt;br /&gt;
|-&lt;br /&gt;
|KEY_LANGUAGE || Select Language ||  1ST / 2ND LANGUAGE / DVD LANG / MTS/SAP / MTS SEL&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Channel control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNEL || Go to the next favorite channel ||  ALT / CHANNEL / CH SURFING / SURF / FAV&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNELDOWN || Decrease channel sequencially ||  CHANNEL - / CHANNEL DOWN / DOWN &lt;br /&gt;
|-&lt;br /&gt;
|KEY_CHANNELUP || Increase channel sequencially ||  CHANNEL + / CHANNEL UP / UP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DIGITS || Use more than one digit for channel ||  PLUS / 100/ 1xx / xxx /  -/--  / Single Double Triple Digit&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SEARCH || Start channel autoscan ||  SCAN / AUTOSCAN&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Colored keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_BLUE || IR “Blue” key &lt;br /&gt;
|style= &amp;quot;color: blue&amp;quot; | BLUE &lt;br /&gt;
|-&lt;br /&gt;
|KEY_GREEN || IR “Green” Key &lt;br /&gt;
|style= &amp;quot;color: green&amp;quot; | GREEN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RED || IR “Red” key &lt;br /&gt;
|style= &amp;quot;color: red&amp;quot; | RED &lt;br /&gt;
|-&lt;br /&gt;
|KEY_YELLOW || IR “Yellow” key &lt;br /&gt;
|style= &amp;quot;color: yellow&amp;quot; | YELLOW&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Media selection&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CD || Change input source to Compact Disc ||  CD &lt;br /&gt;
|-&lt;br /&gt;
|KEY_DVD || Change input to DVD ||  DVD / DVD MENU &lt;br /&gt;
|-&lt;br /&gt;
|KEY_EJECTCLOSECD || Open/close the CD/DVD player ||  -&amp;gt; ) / CLOSE / OPEN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MEDIA || Turn on/off Media application ||  PC/TV /  TURN ON/OFF APP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_PC || Selects from TV to PC || PC&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RADIO || Put into AM/FM radio mode ||  RADIO / TV/FM / TV/RADIO / FM / FM/RADIO&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TV || Select tv mode || TV / LIVE TV&lt;br /&gt;
|-&lt;br /&gt;
|KEY_TV2 || Select Cable mode ||  AIR/CBL &lt;br /&gt;
|-&lt;br /&gt;
|KEY_VCR || Select VCR mode ||  VCR MODE / DTR&lt;br /&gt;
|-&lt;br /&gt;
|KEY_VIDEO || Alternate between input modes || SOURCE / SELECT / DISPLAY / SWITCH INPUTS / VIDEO&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Power control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_POWER || Turn on/off computer ||  SYSTEM POWER / COMPUTER POWER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_POWER2 || Turn on/off application ||  TV ON/OFF / POWER&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SLEEP || Activate sleep timer ||  SLEEP / SLEEP TIMER &lt;br /&gt;
|-&lt;br /&gt;
|KEY_SUSPEND || Put computer into suspend mode ||  STANDBY / SUSPEND &lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Window control&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CLEAR || Stop stream and return to default input video/audio ||  CLEAR / RESET / BOSS KEY&lt;br /&gt;
|-&lt;br /&gt;
|KEY_CYCLEWINDOWS || Minimize windows and move to the next one || ALT-TAB / MINIMIZE / DESKTOP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_FAVORITES || Open the favorites stream window || TV WALL / Favorites&lt;br /&gt;
|-&lt;br /&gt;
|KEY_MENU || Call application menu ||  2ND CONTROLS (USA: MENU) / DVD/MENU / SHOW/HIDE CTRL&lt;br /&gt;
|-&lt;br /&gt;
|KEY_NEW || Open/Close Picture in Picture ||  PIP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_OK || Send a confirmation code to application || OK / ENTER / RETURN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_SCREEN || Select screen aspect ratio ||  4:3 16:9 SELECT &lt;br /&gt;
|-&lt;br /&gt;
|KEY_ZOOM || Put device into zoom/full screen mode ||  ZOOM / FULL SCREEN / ZOOM+ / HIDE PANNEL / SWITCH&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Navigation keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_ESC || Cancel current operation || CANCEL / BACK&lt;br /&gt;
|-&lt;br /&gt;
|KEY_HELP || Open a Help window ||  HELP &lt;br /&gt;
|-&lt;br /&gt;
|KEY_HOMEPAGE || Navigate to Homepage || HOME&lt;br /&gt;
|-&lt;br /&gt;
|KEY_INFO || Open On Screen Display ||  DISPLAY INFORMATION / OSD&lt;br /&gt;
|-&lt;br /&gt;
|KEY_WWW || Open the default browser ||  WEB &lt;br /&gt;
|-&lt;br /&gt;
|KEY_UP || Up key || UP || On simpler IR's, without separate channel keys, you need to map UP as KEY_CHANNELUP&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DOWN || Down key || DOWN || On simpler IR's, without separate channel keys, you need to map DOWN as KEY_CHANNELDOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_LEFT || Left key || LEFT || On simpler IR's, without separate volume keys, you need to map LEFT as KEY_VOLUMEDOWN&lt;br /&gt;
|-&lt;br /&gt;
|KEY_RIGHT || Right key || RIGHT || On simpler IR's, without separate volume keys, you need to map RIGHT as KEY_VOLUMEUP&lt;br /&gt;
|-&lt;br /&gt;
|- style= &amp;quot;font-weight: bolder; color: blue&amp;quot; &lt;br /&gt;
| Miscelaneous keys&lt;br /&gt;
|-&lt;br /&gt;
|KEY_DOT || Return a dot ||  . &lt;br /&gt;
|-&lt;br /&gt;
|KEY_FN || Select a function ||  FUNCTION &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Technical details about IR===&lt;br /&gt;
http://linuxtv.org/wiki/index.php/Remote_controllers-V4L&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree</id>
		<title>Using a git driver development tree</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree"/>
				<updated>2010-04-23T01:00:11Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Removing the already loaded modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Compiling a Git repository ===&lt;br /&gt;
&lt;br /&gt;
The git driver repositories contain the full Linux kernel tree. So, before working with a driver, a full kernel compilation should be done. The easiest way is to run:&lt;br /&gt;
  $ make oldconfig&lt;br /&gt;
&lt;br /&gt;
This will use your kernel old configuration, asking you only about the new features that have added (or moved), when compared with your original kernel version. &lt;br /&gt;
&lt;br /&gt;
The first build will take some time. In order to do it, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
After having the kernel built (and tested), subsequent compilations can be done by running:&lt;br /&gt;
  make M=drivers/media/&lt;br /&gt;
or, if the driver is currently at staging, by running:&lt;br /&gt;
  make M=drivers/staging/&lt;br /&gt;
&lt;br /&gt;
With the above commands, only the media (or staging) drivers will be recompiled, if they got changed, saving you some time on testing the new driver features.&lt;br /&gt;
&lt;br /&gt;
  NOTE: if you added new files or changed the files dependencies, you may need to do a full make. In this case, just run:&lt;br /&gt;
    $ make&lt;br /&gt;
&lt;br /&gt;
=== Installing the new kernel ===&lt;br /&gt;
&lt;br /&gt;
If this is the first time you're compiling the drivers, or if kernel version changed from your previous build, you should run a full drivers installation with:&lt;br /&gt;
  # make modules_install install&lt;br /&gt;
&lt;br /&gt;
Be sure to be root when installing the drivers.&lt;br /&gt;
&lt;br /&gt;
=== Installing the new drivers on your kernel ===&lt;br /&gt;
&lt;br /&gt;
After the first installation, you may just copy the new drivers with this small script:&lt;br /&gt;
&lt;br /&gt;
  for i in `find drivers/media -name *.ko`; do&lt;br /&gt;
          if [ $i -nt /lib/modules/`uname -r`/kernel/$i ]; then&lt;br /&gt;
                  sudo install -m 644 -c -D $i /lib/modules/`uname -r`/kernel/$i || exit -1&lt;br /&gt;
          fi&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
  NOTE:&lt;br /&gt;
      If your kernel version changed, you'll need to re-build the kernel again, with&lt;br /&gt;
        $ make olconfig&lt;br /&gt;
        $ make&lt;br /&gt;
      In this case, you'll also need to re-install the drivers ans the kernel with:&lt;br /&gt;
        # make modules_install install&lt;br /&gt;
&lt;br /&gt;
=== Removing the already loaded modules ===&lt;br /&gt;
&lt;br /&gt;
This is probably the trickiest part. You can, of course, just reboot the machine, but this may take some time, so Mauro Carvalho Chehab wrote a script that unloads all kernel modules from the memory. This script were integrated with the mercurial trees.&lt;br /&gt;
&lt;br /&gt;
There's an updated [http://linuxtv.org/downloads/git_tools/rmmod.pl rmmod.pl] version that works with git and with all kernels that put the media drivers at the right location.&lt;br /&gt;
&lt;br /&gt;
In order to remove all V4L/DVB drivers from the memory, all that it is needed is to run. as root:&lt;br /&gt;
  # ./rmmod.pl unload&lt;br /&gt;
&lt;br /&gt;
   PS.: The other options of the script should be working as well, but they weren't really tested, since the only one that &lt;br /&gt;
        is really useful outside Mecurial tree is the capability of removing the drivers from the memory.&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree</id>
		<title>Using a git driver development tree</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree"/>
				<updated>2010-04-23T00:53:34Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Removing the already loaded modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Compiling a Git repository ===&lt;br /&gt;
&lt;br /&gt;
The git driver repositories contain the full Linux kernel tree. So, before working with a driver, a full kernel compilation should be done. The easiest way is to run:&lt;br /&gt;
  $ make oldconfig&lt;br /&gt;
&lt;br /&gt;
This will use your kernel old configuration, asking you only about the new features that have added (or moved), when compared with your original kernel version. &lt;br /&gt;
&lt;br /&gt;
The first build will take some time. In order to do it, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
After having the kernel built (and tested), subsequent compilations can be done by running:&lt;br /&gt;
  make M=drivers/media/&lt;br /&gt;
or, if the driver is currently at staging, by running:&lt;br /&gt;
  make M=drivers/staging/&lt;br /&gt;
&lt;br /&gt;
With the above commands, only the media (or staging) drivers will be recompiled, if they got changed, saving you some time on testing the new driver features.&lt;br /&gt;
&lt;br /&gt;
  NOTE: if you added new files or changed the files dependencies, you may need to do a full make. In this case, just run:&lt;br /&gt;
    $ make&lt;br /&gt;
&lt;br /&gt;
=== Installing the new kernel ===&lt;br /&gt;
&lt;br /&gt;
If this is the first time you're compiling the drivers, or if kernel version changed from your previous build, you should run a full drivers installation with:&lt;br /&gt;
  # make modules_install install&lt;br /&gt;
&lt;br /&gt;
Be sure to be root when installing the drivers.&lt;br /&gt;
&lt;br /&gt;
=== Installing the new drivers on your kernel ===&lt;br /&gt;
&lt;br /&gt;
After the first installation, you may just copy the new drivers with this small script:&lt;br /&gt;
&lt;br /&gt;
  for i in `find drivers/media -name *.ko`; do&lt;br /&gt;
          if [ $i -nt /lib/modules/`uname -r`/kernel/$i ]; then&lt;br /&gt;
                  sudo install -m 644 -c -D $i /lib/modules/`uname -r`/kernel/$i || exit -1&lt;br /&gt;
          fi&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
  NOTE:&lt;br /&gt;
      If your kernel version changed, you'll need to re-build the kernel again, with&lt;br /&gt;
        $ make olconfig&lt;br /&gt;
        $ make&lt;br /&gt;
      In this case, you'll also need to re-install the drivers ans the kernel with:&lt;br /&gt;
        # make modules_install install&lt;br /&gt;
&lt;br /&gt;
=== Removing the already loaded modules ===&lt;br /&gt;
&lt;br /&gt;
This is probably the trickiest part. You can, of course, just reboot the machine, but this may take some time, so Mauro Carvalho Chehab wrote a script that unloads all kernel modules from the memory. This script were integrated with the mercurial trees.&lt;br /&gt;
&lt;br /&gt;
There's an updated [http://linuxtv.org/downloads/git_tools/rmmod.pl rmmod.pl] version that works with git and with all kernels that put the media drivers at the right location.&lt;br /&gt;
&lt;br /&gt;
In order to remove all V4L/DVB drivers from the memory, all that it is needed is to run:&lt;br /&gt;
  $ ./rmmod.pl unload&lt;br /&gt;
&lt;br /&gt;
   PS.: The other options of the script should be working as well, but they weren't really tested, since the only one that &lt;br /&gt;
        is really useful outside Mecurial tree is the capability of removing the drivers from the memory.&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree</id>
		<title>Using a git driver development tree</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree"/>
				<updated>2010-04-23T00:48:58Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Installing the new drivers on your kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Compiling a Git repository ===&lt;br /&gt;
&lt;br /&gt;
The git driver repositories contain the full Linux kernel tree. So, before working with a driver, a full kernel compilation should be done. The easiest way is to run:&lt;br /&gt;
  $ make oldconfig&lt;br /&gt;
&lt;br /&gt;
This will use your kernel old configuration, asking you only about the new features that have added (or moved), when compared with your original kernel version. &lt;br /&gt;
&lt;br /&gt;
The first build will take some time. In order to do it, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
After having the kernel built (and tested), subsequent compilations can be done by running:&lt;br /&gt;
  make M=drivers/media/&lt;br /&gt;
or, if the driver is currently at staging, by running:&lt;br /&gt;
  make M=drivers/staging/&lt;br /&gt;
&lt;br /&gt;
With the above commands, only the media (or staging) drivers will be recompiled, if they got changed, saving you some time on testing the new driver features.&lt;br /&gt;
&lt;br /&gt;
  NOTE: if you added new files or changed the files dependencies, you may need to do a full make. In this case, just run:&lt;br /&gt;
    $ make&lt;br /&gt;
&lt;br /&gt;
=== Installing the new kernel ===&lt;br /&gt;
&lt;br /&gt;
If this is the first time you're compiling the drivers, or if kernel version changed from your previous build, you should run a full drivers installation with:&lt;br /&gt;
  # make modules_install install&lt;br /&gt;
&lt;br /&gt;
Be sure to be root when installing the drivers.&lt;br /&gt;
&lt;br /&gt;
=== Installing the new drivers on your kernel ===&lt;br /&gt;
&lt;br /&gt;
After the first installation, you may just copy the new drivers with this small script:&lt;br /&gt;
&lt;br /&gt;
  for i in `find drivers/media -name *.ko`; do&lt;br /&gt;
          if [ $i -nt /lib/modules/`uname -r`/kernel/$i ]; then&lt;br /&gt;
                  sudo install -m 644 -c -D $i /lib/modules/`uname -r`/kernel/$i || exit -1&lt;br /&gt;
          fi&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
  NOTE:&lt;br /&gt;
      If your kernel version changed, you'll need to re-build the kernel again, with&lt;br /&gt;
        $ make olconfig&lt;br /&gt;
        $ make&lt;br /&gt;
      In this case, you'll also need to re-install the drivers ans the kernel with:&lt;br /&gt;
        # make modules_install install&lt;br /&gt;
&lt;br /&gt;
=== Removing the already loaded modules ===&lt;br /&gt;
&lt;br /&gt;
This is probably the trickiest part. You can, of course, just reboot the machine, but this may take some time, so Mauro Chehab wrote a script that unloads all kernel modules from the memory. There's a [http://linuxtv.org/downloads/git_tools/rmmod.pl rmmod.pl] version that works with git and with all kernels that put the media drivers at the right location.&lt;br /&gt;
&lt;br /&gt;
In order to remove all V4L/DVB drivers from the memory, all that it is needed is to run:&lt;br /&gt;
  $ ./rmmod.pl unload&lt;br /&gt;
&lt;br /&gt;
The other options of the script should be working as well, but I didn't test, since the only one I find really useful is the capability of removing the drivers from the memory.&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree</id>
		<title>Using a git driver development tree</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree"/>
				<updated>2010-04-23T00:48:17Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Installing the new drivers on your kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Compiling a Git repository ===&lt;br /&gt;
&lt;br /&gt;
The git driver repositories contain the full Linux kernel tree. So, before working with a driver, a full kernel compilation should be done. The easiest way is to run:&lt;br /&gt;
  $ make oldconfig&lt;br /&gt;
&lt;br /&gt;
This will use your kernel old configuration, asking you only about the new features that have added (or moved), when compared with your original kernel version. &lt;br /&gt;
&lt;br /&gt;
The first build will take some time. In order to do it, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
After having the kernel built (and tested), subsequent compilations can be done by running:&lt;br /&gt;
  make M=drivers/media/&lt;br /&gt;
or, if the driver is currently at staging, by running:&lt;br /&gt;
  make M=drivers/staging/&lt;br /&gt;
&lt;br /&gt;
With the above commands, only the media (or staging) drivers will be recompiled, if they got changed, saving you some time on testing the new driver features.&lt;br /&gt;
&lt;br /&gt;
  NOTE: if you added new files or changed the files dependencies, you may need to do a full make. In this case, just run:&lt;br /&gt;
    $ make&lt;br /&gt;
&lt;br /&gt;
=== Installing the new kernel ===&lt;br /&gt;
&lt;br /&gt;
If this is the first time you're compiling the drivers, or if kernel version changed from your previous build, you should run a full drivers installation with:&lt;br /&gt;
  # make modules_install install&lt;br /&gt;
&lt;br /&gt;
Be sure to be root when installing the drivers.&lt;br /&gt;
&lt;br /&gt;
=== Installing the new drivers on your kernel ===&lt;br /&gt;
&lt;br /&gt;
After the first installation, you may just copy the new drivers with this small script:&lt;br /&gt;
&lt;br /&gt;
  for i in `find drivers/media -name *.ko`; do&lt;br /&gt;
          if [ $i -nt /lib/modules/`uname -r`/kernel/$i ]; then&lt;br /&gt;
                  sudo install -m 644 -c -D $i /lib/modules/`uname -r`/kernel/$i || exit -1&lt;br /&gt;
          fi&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
  NOTE: if your kernel version changed, you'll need to re-build the kernel again, with&lt;br /&gt;
    $ make olconfig&lt;br /&gt;
    $ make&lt;br /&gt;
  In this case, you'll also need to re-install the drivers an the kernel with:&lt;br /&gt;
    # make modules_install install&lt;br /&gt;
&lt;br /&gt;
=== Removing the already loaded modules ===&lt;br /&gt;
&lt;br /&gt;
This is probably the trickiest part. You can, of course, just reboot the machine, but this may take some time, so Mauro Chehab wrote a script that unloads all kernel modules from the memory. There's a [http://linuxtv.org/downloads/git_tools/rmmod.pl rmmod.pl] version that works with git and with all kernels that put the media drivers at the right location.&lt;br /&gt;
&lt;br /&gt;
In order to remove all V4L/DVB drivers from the memory, all that it is needed is to run:&lt;br /&gt;
  $ ./rmmod.pl unload&lt;br /&gt;
&lt;br /&gt;
The other options of the script should be working as well, but I didn't test, since the only one I find really useful is the capability of removing the drivers from the memory.&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree</id>
		<title>Using a git driver development tree</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree"/>
				<updated>2010-04-23T00:38:46Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Removing the already loaded modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Compiling a Git repository ===&lt;br /&gt;
&lt;br /&gt;
The git driver repositories contain the full Linux kernel tree. So, before working with a driver, a full kernel compilation should be done. The easiest way is to run:&lt;br /&gt;
  $ make oldconfig&lt;br /&gt;
&lt;br /&gt;
This will use your kernel old configuration, asking you only about the new features that have added (or moved), when compared with your original kernel version. &lt;br /&gt;
&lt;br /&gt;
The first build will take some time. In order to do it, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
After having the kernel built (and tested), subsequent compilations can be done by running:&lt;br /&gt;
  make M=drivers/media/&lt;br /&gt;
or, if the driver is currently at staging, by running:&lt;br /&gt;
  make M=drivers/staging/&lt;br /&gt;
&lt;br /&gt;
With the above commands, only the media (or staging) drivers will be recompiled, if they got changed, saving you some time on testing the new driver features.&lt;br /&gt;
&lt;br /&gt;
  NOTE: if you added new files or changed the files dependencies, you may need to do a full make. In this case, just run:&lt;br /&gt;
    $ make&lt;br /&gt;
&lt;br /&gt;
=== Installing the new kernel ===&lt;br /&gt;
&lt;br /&gt;
If this is the first time you're compiling the drivers, or if kernel version changed from your previous build, you should run a full drivers installation with:&lt;br /&gt;
  # make modules_install install&lt;br /&gt;
&lt;br /&gt;
Be sure to be root when installing the drivers.&lt;br /&gt;
&lt;br /&gt;
=== Installing the new drivers on your kernel ===&lt;br /&gt;
&lt;br /&gt;
After the first installation, you may just copy the new drivers with this small script:&lt;br /&gt;
&lt;br /&gt;
  for i in `find drivers/media -name *.ko`; do&lt;br /&gt;
          if [ $i -nt /lib/modules/`uname -r`/kernel/$i ]; then&lt;br /&gt;
                  sudo install -m 644 -c -D $i /lib/modules/`uname -r`/kernel/$i || exit -1&lt;br /&gt;
          fi&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
  NOTE: if your kernel version changed, you'll need to re-build the kernel again, with&lt;br /&gt;
    $ make olconfig&lt;br /&gt;
    $ make&lt;br /&gt;
&lt;br /&gt;
=== Removing the already loaded modules ===&lt;br /&gt;
&lt;br /&gt;
This is probably the trickiest part. You can, of course, just reboot the machine, but this may take some time, so Mauro Chehab wrote a script that unloads all kernel modules from the memory. There's a [http://linuxtv.org/downloads/git_tools/rmmod.pl rmmod.pl] version that works with git and with all kernels that put the media drivers at the right location.&lt;br /&gt;
&lt;br /&gt;
In order to remove all V4L/DVB drivers from the memory, all that it is needed is to run:&lt;br /&gt;
  $ ./rmmod.pl unload&lt;br /&gt;
&lt;br /&gt;
The other options of the script should be working as well, but I didn't test, since the only one I find really useful is the capability of removing the drivers from the memory.&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree</id>
		<title>Using a git driver development tree</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree"/>
				<updated>2010-04-23T00:06:47Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Compiling a Git repository ===&lt;br /&gt;
&lt;br /&gt;
The git driver repositories contain the full Linux kernel tree. So, before working with a driver, a full kernel compilation should be done. The easiest way is to run:&lt;br /&gt;
  $ make oldconfig&lt;br /&gt;
&lt;br /&gt;
This will use your kernel old configuration, asking you only about the new features that have added (or moved), when compared with your original kernel version. &lt;br /&gt;
&lt;br /&gt;
The first build will take some time. In order to do it, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
After having the kernel built (and tested), subsequent compilations can be done by running:&lt;br /&gt;
  make M=drivers/media/&lt;br /&gt;
or, if the driver is currently at staging, by running:&lt;br /&gt;
  make M=drivers/staging/&lt;br /&gt;
&lt;br /&gt;
With the above commands, only the media (or staging) drivers will be recompiled, if they got changed, saving you some time on testing the new driver features.&lt;br /&gt;
&lt;br /&gt;
  NOTE: if you added new files or changed the files dependencies, you may need to do a full make. In this case, just run:&lt;br /&gt;
    $ make&lt;br /&gt;
&lt;br /&gt;
=== Installing the new kernel ===&lt;br /&gt;
&lt;br /&gt;
If this is the first time you're compiling the drivers, or if kernel version changed from your previous build, you should run a full drivers installation with:&lt;br /&gt;
  # make modules_install install&lt;br /&gt;
&lt;br /&gt;
Be sure to be root when installing the drivers.&lt;br /&gt;
&lt;br /&gt;
=== Installing the new drivers on your kernel ===&lt;br /&gt;
&lt;br /&gt;
After the first installation, you may just copy the new drivers with this small script:&lt;br /&gt;
&lt;br /&gt;
  for i in `find drivers/media -name *.ko`; do&lt;br /&gt;
          if [ $i -nt /lib/modules/`uname -r`/kernel/$i ]; then&lt;br /&gt;
                  sudo install -m 644 -c -D $i /lib/modules/`uname -r`/kernel/$i || exit -1&lt;br /&gt;
          fi&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
  NOTE: if your kernel version changed, you'll need to re-build the kernel again, with&lt;br /&gt;
    $ make olconfig&lt;br /&gt;
    $ make&lt;br /&gt;
&lt;br /&gt;
=== Removing the already loaded modules ===&lt;br /&gt;
&lt;br /&gt;
This is probably the trickiest part. You can, of course, just reboot the machine, but this may take some time, so Mauro Chehab wrote a script that unloads all kernel modules from the memory. There's a [http://linuxtv.org/downloads/git_tools/rmmod.pl rmmod.pl] version that works with git and with all kernels that put the media drivers at the right location.&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree</id>
		<title>Using a git driver development tree</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Using_a_git_driver_development_tree"/>
				<updated>2010-04-22T23:02:44Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: Created page with '=== Compiling a Git repository ===  The git driver repositories contain the full Linux kernel tree. So, before working with a driver, a full kernel compilation should be done. Th...'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Compiling a Git repository ===&lt;br /&gt;
&lt;br /&gt;
The git driver repositories contain the full Linux kernel tree. So, before working with a driver, a full kernel compilation should be done. The easiest way is to run:&lt;br /&gt;
  $ make oldconfig&lt;br /&gt;
&lt;br /&gt;
This will use your kernel old configuration, asking you only about the new features that have added (or moved), when compared with your original kernel version. &lt;br /&gt;
&lt;br /&gt;
The first build will take some time. In order to do it, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
After having the kernel built (and tested), subsequent compilations can be done by running:&lt;br /&gt;
  make M=drivers/media/&lt;br /&gt;
or, if the driver is currently at staging, by running:&lt;br /&gt;
  make M=drivers/staging/&lt;br /&gt;
&lt;br /&gt;
With the above commands, only the media (or staging) drivers will be recompiled, if they got changed, saving you some time on testing the new driver features.&lt;br /&gt;
&lt;br /&gt;
  NOTE: if you added new files or changed the files dependencies, you may need to do a full make. In this case, just run:&lt;br /&gt;
    $ make&lt;br /&gt;
&lt;br /&gt;
=== Installing the new kernel ===&lt;br /&gt;
&lt;br /&gt;
If this is the first time you're compiling the drivers, or if kernel version changed from your previous build, you should run a full drivers installation with:&lt;br /&gt;
  # make modules_install install&lt;br /&gt;
&lt;br /&gt;
Be sure to be root when installing the drivers.&lt;br /&gt;
&lt;br /&gt;
=== Installing the new drivers on your kernel ===&lt;br /&gt;
&lt;br /&gt;
After the first installation, you may just copy the new drivers with this small script:&lt;br /&gt;
&lt;br /&gt;
  for i in `find drivers/media -name *.ko`; do&lt;br /&gt;
          if [ $i -nt /lib/modules/`uname -r`/kernel/$i ]; then&lt;br /&gt;
                  sudo install -m 644 -c -D $i /lib/modules/`uname -r`/kernel/$i || exit -1&lt;br /&gt;
          fi&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
  NOTE: if your kernel version changed, you'll need to re-build the kernel again, with&lt;br /&gt;
    $ make olconfig&lt;br /&gt;
    $ make&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Main_Page"/>
				<updated>2010-04-22T22:49:43Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color:#6289AB; padding:0.3em; color:#ffffff; font-weight:bold; font-size:150%; text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
Welcome to the linuxtv.org V4L-DVB Wiki !&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{|valign=top background=none&lt;br /&gt;
|valign=top|&lt;br /&gt;
&amp;lt;div style=&amp;quot;vertical-align:top; margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#ffffff&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This wiki is intended to become an authoritative source of information regarding the use of analog video and digital TV sources under Linux -- i.e. the subject matters covered under the V4L-DVB framework.  The basic plan is to aggregate information about: available hardware; how v4l or dvb work; software used with the hardware and so forth. &lt;br /&gt;
develo&lt;br /&gt;
Like all other wikis, the V4L-DVB wiki relies upon the contributions of its users.  Hence, it will only be as useful as we make it! So we encourage you to share your knowledge and help with the task of turning this site into a grand repository of knowledge.  Your input (whether it be by providing a set of instructions for how to get a certain device working; a minor improvement to an existing article; or an explanation for some complex concept) will be highly appreciated.&lt;br /&gt;
&lt;br /&gt;
-- [[LinuxTVWiki:People|The LinuxTV V4L-DVB wiki team]] / [[People behind V4L-DVB]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;vertical-align:top; margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#ffffff&amp;quot;&amp;gt;&lt;br /&gt;
{|valign=top cellpadding=0 cellspacing=5 width=100%&lt;br /&gt;
| [[Image:Exclaimation.png|75px]] &lt;br /&gt;
| '''IMPORTANT NOTICE:'''  Hi everyone, the merger of the V4L and DVB wikis is now underway!  Articles within the [http://www.linuxtv.org/v4lwiki/index.php/Main_Page V4L wiki] will progressively be transferred into this wiki.  Please see [[Wiki merger|here for the important details]].&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#F7F9FB;&amp;quot;&amp;gt;&lt;br /&gt;
{|valign=top cellpadding=0 cellspacing=0 width=100%&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=32%|&lt;br /&gt;
== '''User Section:'''==&lt;br /&gt;
* [[Special:Allpages|The Wiki's Indexes]]&lt;br /&gt;
'''Getting Started:'''&lt;br /&gt;
* [[What is V4L or DVB?]]&lt;br /&gt;
* [[Supported Hardware]]&lt;br /&gt;
* [[How to Obtain, Build and Install V4L-DVB Device Drivers]]&lt;br /&gt;
** Driver List&lt;br /&gt;
'''Having Trouble?:'''&lt;br /&gt;
* [[FAQ &amp;amp; Troubleshooting]]&lt;br /&gt;
* [[Testing your DVB device]] (PCI, USB, ...)&lt;br /&gt;
* [[V4L Test Suite]]&lt;br /&gt;
* [[Testing reception quality]]&lt;br /&gt;
* [[Bug Report|Filing a Bug Report]]&lt;br /&gt;
'''Software Applications and Usage:''' &lt;br /&gt;
* ''Applications to watch and record TV''&lt;br /&gt;
** [[software#Standalone_Software_to_Watch_Digital_TV|Software to Watch Digital TV]]&lt;br /&gt;
** [[Software#Standalone_Software_to_Watch_Analogue_TV|Software to Watch Analogue TV]] ... also see [[V4L TV Viewing]]  &lt;br /&gt;
** [[V4L capturing]] ... also see [[Transcode]]&lt;br /&gt;
* [[software#Media_Center_Software|Full Media Centers]]&lt;br /&gt;
* [[software#DVB_Utility_Suites_or_Standalone_Tools|Applications to show Videotext/Teletext/Closed Captioning]]&lt;br /&gt;
** [[Text capture]]&lt;br /&gt;
* [[software#DVB_Utility_Suites_or_Standalone_Tools|Tools for testing, tuning, streaming]]&lt;br /&gt;
* [[software#DVB_Utility_Suites_or_Standalone_Tools|Tools for unattended/headless recording]]&lt;br /&gt;
* [[Radio Listening Applications|Radio Listening]]&lt;br /&gt;
'''Tutorials, Howtos, Usage Info &amp;amp; Guides:'''&lt;br /&gt;
* Howto record [[multiple programs]] at once&lt;br /&gt;
* [[Post-processing]] of recorded material&lt;br /&gt;
* [[Further V4L and DVB Links]]&lt;br /&gt;
'''Examples of User Hardware and Software Configurations:'''&lt;br /&gt;
* [[Example setups]]&lt;br /&gt;
* [[Mailing List survey of devices in use]]&lt;br /&gt;
* [[Conditional Access Module Usage Examples]] (sorted by country)&lt;br /&gt;
* [[User Modifications to Supported Devices]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''The Wiki - How Can I Help?'''==&lt;br /&gt;
* [[Help:Contents|Everything you need to know about editing wiki pages but were afraid to ask]]&lt;br /&gt;
** [http://www.mediawiki.org/wiki/Help:Moving_a_page Help: Renaming/Moving a Page]&lt;br /&gt;
* [[Wiki - Help Wanted List|A list of things that need to be tackled]] &lt;br /&gt;
* [[Wiki - New Device Copy &amp;amp; Paste Template|New Device Copy &amp;amp; Paste Template]]&lt;br /&gt;
&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=4%|&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=32%|&lt;br /&gt;
=='''Technical Background:'''==&lt;br /&gt;
'''Systems:'''&lt;br /&gt;
* [[Analog TV]]&lt;br /&gt;
* [[Radio Data System (RDS)]]&lt;br /&gt;
* [[Digital TV|Digital TV (DTV)]]&lt;br /&gt;
** [[ATSC|ATSC Standards]]&lt;br /&gt;
** [[DVB Standards]]&lt;br /&gt;
** [[DMB-T/H|DMB-T/H Standard]]&lt;br /&gt;
** [[ISDB|ISDB Standards]]&lt;br /&gt;
* [[Modulation Scheme]]s used for Analog &amp;amp; DTV&lt;br /&gt;
* [[MPEG-2 Standard]]&lt;br /&gt;
** [[DSM-CC Object Carousel Protocol]]&lt;br /&gt;
* [[DiSEqC|DiSEqC Protocols]]&lt;br /&gt;
'''Hardware Component Related:'''&lt;br /&gt;
* [[List of Chipset Vendors|Sortable List of Chipset Vendors]]&lt;br /&gt;
* [[Anatomy of V4L-DVB devices]]&lt;br /&gt;
** [[Tuner]]s&lt;br /&gt;
** [[Demodulator]]s&lt;br /&gt;
** [[A/V Decoders]]&lt;br /&gt;
*** [[Radio devices|Radio Decoder Chipsets]]&lt;br /&gt;
** [[GPIO pins]]&lt;br /&gt;
** [[I²C Protocol]]&lt;br /&gt;
** [[Hardware or Software Decoder?]] (MPEG)&lt;br /&gt;
** [[Hardware vs software encoders]] (MPEG)&lt;br /&gt;
** [[Remote Controller chipsets]]&lt;br /&gt;
** [[Interface chipsets]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Developer Section:'''==&lt;br /&gt;
'''Repos:'''&lt;br /&gt;
* [http://git.linuxtv.org/v4l-dvb.git Git V4L-DVB development repository]&lt;br /&gt;
* [http://linuxtv.org/hg/v4l-dvb Mercurial V4L-DVB backport repository]&lt;br /&gt;
* [http://git.linuxtv.org/ A list of LinuxTV hosted Git development repositories]&lt;br /&gt;
* [http://linuxtv.org/hg/ A list of LinuxTV hosted Mercurial development repositories]&lt;br /&gt;
* [http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/mchehab/v4l-dvb.git;a=log Current git log]&lt;br /&gt;
* [[Maintaining Git trees]]&lt;br /&gt;
* [[Using a git driver development tree]]&lt;br /&gt;
* [[Maintaining Mercurial (Hg) trees]]&lt;br /&gt;
'''Kernel Driver Development:'''&lt;br /&gt;
*  [http://jungla.dit.upm.es/%7Ejmseyas/linux/kernel/hackers-docs.html Linux kernel development documentation index]&lt;br /&gt;
* ''Application Programming Interface (API):''&lt;br /&gt;
** [[Development: Linux Media Infrastructure API|Linux Media Infrastructure API]]&lt;br /&gt;
* ''Drivers:''&lt;br /&gt;
** [[Anatomy of a V4L driver]]&lt;br /&gt;
** [[Anatomy of a DVB driver]]&lt;br /&gt;
** [[Development: How to add support for a device|How to add support for a device]]&lt;br /&gt;
** [[Development: How to develop drivers for USB based devices|How to develop drivers for USB based devices]]&lt;br /&gt;
*** [[DVB via USB|General Information Regarding DVB via USB]]&lt;br /&gt;
*** [[Development: Reverse Engineering USB Webcams|Reverse Engineering USB Webcams]]&lt;br /&gt;
** [[Development: Hints for Refactoring Existing Drivers|Hints for Refactoring Existing Drivers]]&lt;br /&gt;
* ''Submitting your work:''&lt;br /&gt;
** [[Development: Coding Style|Coding Style]]&lt;br /&gt;
** [[Development: Code Review|Invitation for Code Review]]&lt;br /&gt;
** [[Development: How_to_submit_patches |How to submit patches]]&lt;br /&gt;
*** [[Development: Submitting Patches|Rules for submitting patches]]&lt;br /&gt;
*** [[Development: Linux Kernel patch submittal checklist|Linux Kernel patch submittal checklist]]&lt;br /&gt;
*** [[Development: Submitting Drivers|Rules for submitting drivers]]&lt;br /&gt;
* ''Development miscellanea:''&lt;br /&gt;
** [[Bus snooping/sniffing]]&lt;br /&gt;
** [[Development: How to extract a firmware|How to extract a firmware]]&lt;br /&gt;
** [[Development: The DVB Decoder Challenge|The DVB Decoder Challenge]]&lt;br /&gt;
** [[TODO - main tasks]]&lt;br /&gt;
** [[V4L framework progress]]&lt;br /&gt;
** [[Libv4l Progress]]&lt;br /&gt;
'''Userspace Development:'''&lt;br /&gt;
* [[V4L2 Userspace Library]]&lt;br /&gt;
&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=4%|&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=32%|&lt;br /&gt;
=='''Hardware Device Information:'''==&lt;br /&gt;
* [[List of Device Vendors|Sortable List of Device Vendors]]&lt;br /&gt;
'''Analogue Devices (V4L):'''&lt;br /&gt;
* [[Graphics cards with TV Tuner and/or Capture facilities]]&lt;br /&gt;
* [[Video via PCI]]&lt;br /&gt;
* [[Video via PCI Express (PCIe)]]&lt;br /&gt;
* [[Video via USB]]&lt;br /&gt;
* ''Other analogue devices:''&lt;br /&gt;
** [[V4L IEEE1394 devices|IEEE1394 devices]] (aka FireWire or i.LINK)&lt;br /&gt;
** [[Loopback]]&lt;br /&gt;
** [[Radio devices|Radio]]&lt;br /&gt;
** [[Scanners]]&lt;br /&gt;
** [[Webcams]]&lt;br /&gt;
'''Digital Devices (DVB):'''&lt;br /&gt;
* [[ATSC Devices]]&lt;br /&gt;
* [[DMB-T/H Devices]]&lt;br /&gt;
* [[DVB-C Devices]]&lt;br /&gt;
* [[DVB-S Devices]]&lt;br /&gt;
* [[DVB-S2 Devices]]&lt;br /&gt;
* [[8-PSK Turbo Coded Devices]]&lt;br /&gt;
* [[DVB-T Devices]]&lt;br /&gt;
* [[ISDB-T Devices]]&lt;br /&gt;
* [[Pre-configured DVB Systems and Set Top Hardware]]''&lt;br /&gt;
'''Peripheral Components:'''&lt;br /&gt;
* [[Antenna]]s (Rooftop, Indoor, Satellite Dishes) &lt;br /&gt;
* [[DD receiver|Dolby Digital receiver]]&lt;br /&gt;
* [[DiSEqC related hardware]]&lt;br /&gt;
** Switches, attenuators, and amplifiers&lt;br /&gt;
* [[DVB Conditional Access Modules]]&lt;br /&gt;
* [[Remote Controllers]]&lt;br /&gt;
** [[Remote controllers-V4L|Remote controllers (V4L article)]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LinuxTV]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Main_Page"/>
				<updated>2010-04-22T22:48:07Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color:#6289AB; padding:0.3em; color:#ffffff; font-weight:bold; font-size:150%; text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
Welcome to the linuxtv.org V4L-DVB Wiki !&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{|valign=top background=none&lt;br /&gt;
|valign=top|&lt;br /&gt;
&amp;lt;div style=&amp;quot;vertical-align:top; margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#ffffff&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This wiki is intended to become an authoritative source of information regarding the use of analog video and digital TV sources under Linux -- i.e. the subject matters covered under the V4L-DVB framework.  The basic plan is to aggregate information about: available hardware; how v4l or dvb work; software used with the hardware and so forth. &lt;br /&gt;
&lt;br /&gt;
Like all other wikis, the V4L-DVB wiki relies upon the contributions of its users.  Hence, it will only be as useful as we make it! So we encourage you to share your knowledge and help with the task of turning this site into a grand repository of knowledge.  Your input (whether it be by providing a set of instructions for how to get a certain device working; a minor improvement to an existing article; or an explanation for some complex concept) will be highly appreciated.&lt;br /&gt;
&lt;br /&gt;
-- [[LinuxTVWiki:People|The LinuxTV V4L-DVB wiki team]] / [[People behind V4L-DVB]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;vertical-align:top; margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#ffffff&amp;quot;&amp;gt;&lt;br /&gt;
{|valign=top cellpadding=0 cellspacing=5 width=100%&lt;br /&gt;
| [[Image:Exclaimation.png|75px]] &lt;br /&gt;
| '''IMPORTANT NOTICE:'''  Hi everyone, the merger of the V4L and DVB wikis is now underway!  Articles within the [http://www.linuxtv.org/v4lwiki/index.php/Main_Page V4L wiki] will progressively be transferred into this wiki.  Please see [[Wiki merger|here for the important details]].&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#F7F9FB;&amp;quot;&amp;gt;&lt;br /&gt;
{|valign=top cellpadding=0 cellspacing=0 width=100%&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=32%|&lt;br /&gt;
== '''User Section:'''==&lt;br /&gt;
* [[Special:Allpages|The Wiki's Indexes]]&lt;br /&gt;
'''Getting Started:'''&lt;br /&gt;
* [[What is V4L or DVB?]]&lt;br /&gt;
* [[Supported Hardware]]&lt;br /&gt;
* [[How to Obtain, Build and Install V4L-DVB Device Drivers]]&lt;br /&gt;
** Driver List&lt;br /&gt;
'''Having Trouble?:'''&lt;br /&gt;
* [[FAQ &amp;amp; Troubleshooting]]&lt;br /&gt;
* [[Testing your DVB device]] (PCI, USB, ...)&lt;br /&gt;
* [[V4L Test Suite]]&lt;br /&gt;
* [[Testing reception quality]]&lt;br /&gt;
* [[Bug Report|Filing a Bug Report]]&lt;br /&gt;
'''Software Applications and Usage:''' &lt;br /&gt;
* ''Applications to watch and record TV''&lt;br /&gt;
** [[software#Standalone_Software_to_Watch_Digital_TV|Software to Watch Digital TV]]&lt;br /&gt;
** [[Software#Standalone_Software_to_Watch_Analogue_TV|Software to Watch Analogue TV]] ... also see [[V4L TV Viewing]]  &lt;br /&gt;
** [[V4L capturing]] ... also see [[Transcode]]&lt;br /&gt;
* [[software#Media_Center_Software|Full Media Centers]]&lt;br /&gt;
* [[software#DVB_Utility_Suites_or_Standalone_Tools|Applications to show Videotext/Teletext/Closed Captioning]]&lt;br /&gt;
** [[Text capture]]&lt;br /&gt;
* [[software#DVB_Utility_Suites_or_Standalone_Tools|Tools for testing, tuning, streaming]]&lt;br /&gt;
* [[software#DVB_Utility_Suites_or_Standalone_Tools|Tools for unattended/headless recording]]&lt;br /&gt;
* [[Radio Listening Applications|Radio Listening]]&lt;br /&gt;
'''Tutorials, Howtos, Usage Info &amp;amp; Guides:'''&lt;br /&gt;
* Howto record [[multiple programs]] at once&lt;br /&gt;
* [[Post-processing]] of recorded material&lt;br /&gt;
* [[Further V4L and DVB Links]]&lt;br /&gt;
'''Examples of User Hardware and Software Configurations:'''&lt;br /&gt;
* [[Example setups]]&lt;br /&gt;
* [[Mailing List survey of devices in use]]&lt;br /&gt;
* [[Conditional Access Module Usage Examples]] (sorted by country)&lt;br /&gt;
* [[User Modifications to Supported Devices]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''The Wiki - How Can I Help?'''==&lt;br /&gt;
* [[Help:Contents|Everything you need to know about editing wiki pages but were afraid to ask]]&lt;br /&gt;
** [http://www.mediawiki.org/wiki/Help:Moving_a_page Help: Renaming/Moving a Page]&lt;br /&gt;
* [[Wiki - Help Wanted List|A list of things that need to be tackled]] &lt;br /&gt;
* [[Wiki - New Device Copy &amp;amp; Paste Template|New Device Copy &amp;amp; Paste Template]]&lt;br /&gt;
&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=4%|&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=32%|&lt;br /&gt;
=='''Technical Background:'''==&lt;br /&gt;
'''Systems:'''&lt;br /&gt;
* [[Analog TV]]&lt;br /&gt;
* [[Radio Data System (RDS)]]&lt;br /&gt;
* [[Digital TV|Digital TV (DTV)]]&lt;br /&gt;
** [[ATSC|ATSC Standards]]&lt;br /&gt;
** [[DVB Standards]]&lt;br /&gt;
** [[DMB-T/H|DMB-T/H Standard]]&lt;br /&gt;
** [[ISDB|ISDB Standards]]&lt;br /&gt;
* [[Modulation Scheme]]s used for Analog &amp;amp; DTV&lt;br /&gt;
* [[MPEG-2 Standard]]&lt;br /&gt;
** [[DSM-CC Object Carousel Protocol]]&lt;br /&gt;
* [[DiSEqC|DiSEqC Protocols]]&lt;br /&gt;
'''Hardware Component Related:'''&lt;br /&gt;
* [[List of Chipset Vendors|Sortable List of Chipset Vendors]]&lt;br /&gt;
* [[Anatomy of V4L-DVB devices]]&lt;br /&gt;
** [[Tuner]]s&lt;br /&gt;
** [[Demodulator]]s&lt;br /&gt;
** [[A/V Decoders]]&lt;br /&gt;
*** [[Radio devices|Radio Decoder Chipsets]]&lt;br /&gt;
** [[GPIO pins]]&lt;br /&gt;
** [[I²C Protocol]]&lt;br /&gt;
** [[Hardware or Software Decoder?]] (MPEG)&lt;br /&gt;
** [[Hardware vs software encoders]] (MPEG)&lt;br /&gt;
** [[Remote Controller chipsets]]&lt;br /&gt;
** [[Interface chipsets]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Developer Section:'''==&lt;br /&gt;
'''Repos:'''&lt;br /&gt;
* [http://git.linuxtv.org/v4l-dvb.git Git V4L-DVB development repository]&lt;br /&gt;
* [http://linuxtv.org/hg/v4l-dvb Mercurial V4L-DVB backport repository]&lt;br /&gt;
* [http://git.linuxtv.org/ A list of LinuxTV hosted Git development repositories]&lt;br /&gt;
* [http://linuxtv.org/hg/ A list of LinuxTV hosted Mercurial development repositories]&lt;br /&gt;
* [http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/mchehab/v4l-dvb.git;a=log Current git log]&lt;br /&gt;
* [[Maintaining Git trees]]&lt;br /&gt;
* [[Maintaining Mercurial (Hg) trees]]&lt;br /&gt;
'''Kernel Driver Development:'''&lt;br /&gt;
*  [http://jungla.dit.upm.es/%7Ejmseyas/linux/kernel/hackers-docs.html Linux kernel development documentation index]&lt;br /&gt;
* ''Application Programming Interface (API):''&lt;br /&gt;
** [[Development: Linux Media Infrastructure API|Linux Media Infrastructure API]]&lt;br /&gt;
* ''Drivers:''&lt;br /&gt;
** [[Anatomy of a V4L driver]]&lt;br /&gt;
** [[Anatomy of a DVB driver]]&lt;br /&gt;
** [[Development: How to add support for a device|How to add support for a device]]&lt;br /&gt;
** [[Development: How to develop drivers for USB based devices|How to develop drivers for USB based devices]]&lt;br /&gt;
*** [[DVB via USB|General Information Regarding DVB via USB]]&lt;br /&gt;
*** [[Development: Reverse Engineering USB Webcams|Reverse Engineering USB Webcams]]&lt;br /&gt;
** [[Development: Hints for Refactoring Existing Drivers|Hints for Refactoring Existing Drivers]]&lt;br /&gt;
* ''Submitting your work:''&lt;br /&gt;
** [[Development: Coding Style|Coding Style]]&lt;br /&gt;
** [[Development: Code Review|Invitation for Code Review]]&lt;br /&gt;
** [[Development: How_to_submit_patches |How to submit patches]]&lt;br /&gt;
*** [[Development: Submitting Patches|Rules for submitting patches]]&lt;br /&gt;
*** [[Development: Linux Kernel patch submittal checklist|Linux Kernel patch submittal checklist]]&lt;br /&gt;
*** [[Development: Submitting Drivers|Rules for submitting drivers]]&lt;br /&gt;
* ''Development miscellanea:''&lt;br /&gt;
** [[Bus snooping/sniffing]]&lt;br /&gt;
** [[Development: How to extract a firmware|How to extract a firmware]]&lt;br /&gt;
** [[Development: The DVB Decoder Challenge|The DVB Decoder Challenge]]&lt;br /&gt;
** [[TODO - main tasks]]&lt;br /&gt;
** [[V4L framework progress]]&lt;br /&gt;
** [[Libv4l Progress]]&lt;br /&gt;
'''Userspace Development:'''&lt;br /&gt;
* [[V4L2 Userspace Library]]&lt;br /&gt;
&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=4%|&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=32%|&lt;br /&gt;
=='''Hardware Device Information:'''==&lt;br /&gt;
* [[List of Device Vendors|Sortable List of Device Vendors]]&lt;br /&gt;
'''Analogue Devices (V4L):'''&lt;br /&gt;
* [[Graphics cards with TV Tuner and/or Capture facilities]]&lt;br /&gt;
* [[Video via PCI]]&lt;br /&gt;
* [[Video via PCI Express (PCIe)]]&lt;br /&gt;
* [[Video via USB]]&lt;br /&gt;
* ''Other analogue devices:''&lt;br /&gt;
** [[V4L IEEE1394 devices|IEEE1394 devices]] (aka FireWire or i.LINK)&lt;br /&gt;
** [[Loopback]]&lt;br /&gt;
** [[Radio devices|Radio]]&lt;br /&gt;
** [[Scanners]]&lt;br /&gt;
** [[Webcams]]&lt;br /&gt;
'''Digital Devices (DVB):'''&lt;br /&gt;
* [[ATSC Devices]]&lt;br /&gt;
* [[DMB-T/H Devices]]&lt;br /&gt;
* [[DVB-C Devices]]&lt;br /&gt;
* [[DVB-S Devices]]&lt;br /&gt;
* [[DVB-S2 Devices]]&lt;br /&gt;
* [[8-PSK Turbo Coded Devices]]&lt;br /&gt;
* [[DVB-T Devices]]&lt;br /&gt;
* [[ISDB-T Devices]]&lt;br /&gt;
* [[Pre-configured DVB Systems and Set Top Hardware]]''&lt;br /&gt;
'''Peripheral Components:'''&lt;br /&gt;
* [[Antenna]]s (Rooftop, Indoor, Satellite Dishes) &lt;br /&gt;
* [[DD receiver|Dolby Digital receiver]]&lt;br /&gt;
* [[DiSEqC related hardware]]&lt;br /&gt;
** Switches, attenuators, and amplifiers&lt;br /&gt;
* [[DVB Conditional Access Modules]]&lt;br /&gt;
* [[Remote Controllers]]&lt;br /&gt;
** [[Remote controllers-V4L|Remote controllers (V4L article)]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LinuxTV]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Main_Page"/>
				<updated>2010-04-22T22:44:00Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color:#6289AB; padding:0.3em; color:#ffffff; font-weight:bold; font-size:150%; text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
Welcome to the linuxtv.org V4L-DVB Wiki !&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{|valign=top background=none&lt;br /&gt;
|valign=top|&lt;br /&gt;
&amp;lt;div style=&amp;quot;vertical-align:top; margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#ffffff&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This wiki is intended to become an authoritative source of information regarding the use of analog video and digital TV sources under Linux -- i.e. the subject matters covered under the V4L-DVB framework.  The basic plan is to aggregate information about: available hardware; how v4l or dvb work; software used with the hardware and so forth. &lt;br /&gt;
&lt;br /&gt;
Like all other wikis, the V4L-DVB wiki relies upon the contributions of its users.  Hence, it will only be as useful as we make it! So we encourage you to share your knowledge and help with the task of turning this site into a grand repository of knowledge.  Your input (whether it be by providing a set of instructions for how to get a certain device working; a minor improvement to an existing article; or an explanation for some complex concept) will be highly appreciated.&lt;br /&gt;
&lt;br /&gt;
-- [[LinuxTVWiki:People|The LinuxTV V4L-DVB wiki team]] / [[People behind V4L-DVB]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;vertical-align:top; margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#ffffff&amp;quot;&amp;gt;&lt;br /&gt;
{|valign=top cellpadding=0 cellspacing=5 width=100%&lt;br /&gt;
| [[Image:Exclaimation.png|75px]] &lt;br /&gt;
| '''IMPORTANT NOTICE:'''  Hi everyone, the merger of the V4L and DVB wikis is now underway!  Articles within the [http://www.linuxtv.org/v4lwiki/index.php/Main_Page V4L wiki] will progressively be transferred into this wiki.  Please see [[Wiki merger|here for the important details]].&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin:0; border:1px solid #6289AB; padding:0.5em; background-color:#F7F9FB;&amp;quot;&amp;gt;&lt;br /&gt;
{|valign=top cellpadding=0 cellspacing=0 width=100%&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=32%|&lt;br /&gt;
== '''User Section:'''==&lt;br /&gt;
* [[Special:Allpages|The Wiki's Indexes]]&lt;br /&gt;
'''Getting Started:'''&lt;br /&gt;
* [[What is V4L or DVB?]]&lt;br /&gt;
* [[Supported Hardware]]&lt;br /&gt;
* [[How to Obtain, Build and Install V4L-DVB Device Drivers]]&lt;br /&gt;
** Driver List&lt;br /&gt;
'''Having Trouble?:'''&lt;br /&gt;
* [[FAQ &amp;amp; Troubleshooting]]&lt;br /&gt;
* [[Testing your DVB device]] (PCI, USB, ...)&lt;br /&gt;
* [[V4L Test Suite]]&lt;br /&gt;
* [[Testing reception quality]]&lt;br /&gt;
* [[Bug Report|Filing a Bug Report]]&lt;br /&gt;
'''Software Applications and Usage:''' &lt;br /&gt;
* ''Applications to watch and record TV''&lt;br /&gt;
** [[software#Standalone_Software_to_Watch_Digital_TV|Software to Watch Digital TV]]&lt;br /&gt;
** [[Software#Standalone_Software_to_Watch_Analogue_TV|Software to Watch Analogue TV]] ... also see [[V4L TV Viewing]]  &lt;br /&gt;
** [[V4L capturing]] ... also see [[Transcode]]&lt;br /&gt;
* [[software#Media_Center_Software|Full Media Centers]]&lt;br /&gt;
* [[software#DVB_Utility_Suites_or_Standalone_Tools|Applications to show Videotext/Teletext/Closed Captioning]]&lt;br /&gt;
** [[Text capture]]&lt;br /&gt;
* [[software#DVB_Utility_Suites_or_Standalone_Tools|Tools for testing, tuning, streaming]]&lt;br /&gt;
* [[software#DVB_Utility_Suites_or_Standalone_Tools|Tools for unattended/headless recording]]&lt;br /&gt;
* [[Radio Listening Applications|Radio Listening]]&lt;br /&gt;
'''Tutorials, Howtos, Usage Info &amp;amp; Guides:'''&lt;br /&gt;
* Howto record [[multiple programs]] at once&lt;br /&gt;
* [[Post-processing]] of recorded material&lt;br /&gt;
* [[Further V4L and DVB Links]]&lt;br /&gt;
'''Examples of User Hardware and Software Configurations:'''&lt;br /&gt;
* [[Example setups]]&lt;br /&gt;
* [[Mailing List survey of devices in use]]&lt;br /&gt;
* [[Conditional Access Module Usage Examples]] (sorted by country)&lt;br /&gt;
* [[User Modifications to Supported Devices]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''The Wiki - How Can I Help?'''==&lt;br /&gt;
* [[Help:Contents|Everything you need to know about editing wiki pages but were afraid to ask]]&lt;br /&gt;
** [http://www.mediawiki.org/wiki/Help:Moving_a_page Help: Renaming/Moving a Page]&lt;br /&gt;
* [[Wiki - Help Wanted List|A list of things that need to be tackled]] &lt;br /&gt;
* [[Wiki - New Device Copy &amp;amp; Paste Template|New Device Copy &amp;amp; Paste Template]]&lt;br /&gt;
&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=4%|&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=32%|&lt;br /&gt;
=='''Technical Background:'''==&lt;br /&gt;
'''Systems:'''&lt;br /&gt;
* [[Analog TV]]&lt;br /&gt;
* [[Radio Data System (RDS)]]&lt;br /&gt;
* [[Digital TV|Digital TV (DTV)]]&lt;br /&gt;
** [[ATSC|ATSC Standards]]&lt;br /&gt;
** [[DVB Standards]]&lt;br /&gt;
** [[DMB-T/H|DMB-T/H Standard]]&lt;br /&gt;
** [[ISDB|ISDB Standards]]&lt;br /&gt;
* [[Modulation Scheme]]s used for Analog &amp;amp; DTV&lt;br /&gt;
* [[MPEG-2 Standard]]&lt;br /&gt;
** [[DSM-CC Object Carousel Protocol]]&lt;br /&gt;
* [[DiSEqC|DiSEqC Protocols]]&lt;br /&gt;
'''Hardware Component Related:'''&lt;br /&gt;
* [[List of Chipset Vendors|Sortable List of Chipset Vendors]]&lt;br /&gt;
* [[Anatomy of V4L-DVB devices]]&lt;br /&gt;
** [[Tuner]]s&lt;br /&gt;
** [[Demodulator]]s&lt;br /&gt;
** [[A/V Decoders]]&lt;br /&gt;
*** [[Radio devices|Radio Decoder Chipsets]]&lt;br /&gt;
** [[GPIO pins]]&lt;br /&gt;
** [[I²C Protocol]]&lt;br /&gt;
** [[Hardware or Software Decoder?]] (MPEG)&lt;br /&gt;
** [[Hardware vs software encoders]] (MPEG)&lt;br /&gt;
** [[Remote Controller chipsets]]&lt;br /&gt;
** [[Interface chipsets]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Developer Section:'''==&lt;br /&gt;
'''Repos:'''&lt;br /&gt;
* [http://linuxtv.org/hg/v4l-dvb Mercurial V4L-DVB development repository]&lt;br /&gt;
* [http://linuxtv.org/hg/v4l-dvb Git V4L-DVB development repository]&lt;br /&gt;
* [http://linuxtv.org/hg/ A list of LinuxTV hosted V4L-DVB development repositories]&lt;br /&gt;
* [http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/mchehab/v4l-dvb.git;a=log Current git log]&lt;br /&gt;
* [[Maintaining Git trees]]&lt;br /&gt;
* [[Maintaining Mercurial (Hg) trees]]&lt;br /&gt;
'''Kernel Driver Development:'''&lt;br /&gt;
*  [http://jungla.dit.upm.es/%7Ejmseyas/linux/kernel/hackers-docs.html Linux kernel development documentation index]&lt;br /&gt;
* ''Application Programming Interface (API):''&lt;br /&gt;
** [[Development: Linux Media Infrastructure API|Linux Media Infrastructure API]]&lt;br /&gt;
* ''Drivers:''&lt;br /&gt;
** [[Anatomy of a V4L driver]]&lt;br /&gt;
** [[Anatomy of a DVB driver]]&lt;br /&gt;
** [[Development: How to add support for a device|How to add support for a device]]&lt;br /&gt;
** [[Development: How to develop drivers for USB based devices|How to develop drivers for USB based devices]]&lt;br /&gt;
*** [[DVB via USB|General Information Regarding DVB via USB]]&lt;br /&gt;
*** [[Development: Reverse Engineering USB Webcams|Reverse Engineering USB Webcams]]&lt;br /&gt;
** [[Development: Hints for Refactoring Existing Drivers|Hints for Refactoring Existing Drivers]]&lt;br /&gt;
* ''Submitting your work:''&lt;br /&gt;
** [[Development: Coding Style|Coding Style]]&lt;br /&gt;
** [[Development: Code Review|Invitation for Code Review]]&lt;br /&gt;
** [[Development: How_to_submit_patches |How to submit patches]]&lt;br /&gt;
*** [[Development: Submitting Patches|Rules for submitting patches]]&lt;br /&gt;
*** [[Development: Linux Kernel patch submittal checklist|Linux Kernel patch submittal checklist]]&lt;br /&gt;
*** [[Development: Submitting Drivers|Rules for submitting drivers]]&lt;br /&gt;
* ''Development miscellanea:''&lt;br /&gt;
** [[Bus snooping/sniffing]]&lt;br /&gt;
** [[Development: How to extract a firmware|How to extract a firmware]]&lt;br /&gt;
** [[Development: The DVB Decoder Challenge|The DVB Decoder Challenge]]&lt;br /&gt;
** [[TODO - main tasks]]&lt;br /&gt;
** [[V4L framework progress]]&lt;br /&gt;
** [[Libv4l Progress]]&lt;br /&gt;
'''Userspace Development:'''&lt;br /&gt;
* [[V4L2 Userspace Library]]&lt;br /&gt;
&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=4%|&lt;br /&gt;
|valign=top bgcolor=#F7F9FB width=32%|&lt;br /&gt;
=='''Hardware Device Information:'''==&lt;br /&gt;
* [[List of Device Vendors|Sortable List of Device Vendors]]&lt;br /&gt;
'''Analogue Devices (V4L):'''&lt;br /&gt;
* [[Graphics cards with TV Tuner and/or Capture facilities]]&lt;br /&gt;
* [[Video via PCI]]&lt;br /&gt;
* [[Video via PCI Express (PCIe)]]&lt;br /&gt;
* [[Video via USB]]&lt;br /&gt;
* ''Other analogue devices:''&lt;br /&gt;
** [[V4L IEEE1394 devices|IEEE1394 devices]] (aka FireWire or i.LINK)&lt;br /&gt;
** [[Loopback]]&lt;br /&gt;
** [[Radio devices|Radio]]&lt;br /&gt;
** [[Scanners]]&lt;br /&gt;
** [[Webcams]]&lt;br /&gt;
'''Digital Devices (DVB):'''&lt;br /&gt;
* [[ATSC Devices]]&lt;br /&gt;
* [[DMB-T/H Devices]]&lt;br /&gt;
* [[DVB-C Devices]]&lt;br /&gt;
* [[DVB-S Devices]]&lt;br /&gt;
* [[DVB-S2 Devices]]&lt;br /&gt;
* [[8-PSK Turbo Coded Devices]]&lt;br /&gt;
* [[DVB-T Devices]]&lt;br /&gt;
* [[ISDB-T Devices]]&lt;br /&gt;
* [[Pre-configured DVB Systems and Set Top Hardware]]''&lt;br /&gt;
'''Peripheral Components:'''&lt;br /&gt;
* [[Antenna]]s (Rooftop, Indoor, Satellite Dishes) &lt;br /&gt;
* [[DD receiver|Dolby Digital receiver]]&lt;br /&gt;
* [[DiSEqC related hardware]]&lt;br /&gt;
** Switches, attenuators, and amplifiers&lt;br /&gt;
* [[DVB Conditional Access Modules]]&lt;br /&gt;
* [[Remote Controllers]]&lt;br /&gt;
** [[Remote controllers-V4L|Remote controllers (V4L article)]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LinuxTV]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Bus_snooping/sniffing</id>
		<title>Bus snooping/sniffing</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Bus_snooping/sniffing"/>
				<updated>2010-04-12T11:37:29Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Snooping Procedures: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Purpose and relevance to development work -- description coming soon&lt;br /&gt;
&lt;br /&gt;
==PCI / PCIe == &lt;br /&gt;
===Snooping Utilities:===&lt;br /&gt;
* BTSpy [http://btwincap.sourceforge.net/custom.html] - Windows based snoop for BT8x8 based devices&lt;br /&gt;
* Dscaler's RegSpy [http://www.dscaler.com/] - Windows based; contains the ability to snoop the registers of [[Interface chipsets|PCI / PCIe interface chipsets]] ... also see [http://marc.info/?l=linux-dvb&amp;amp;m=122823618002379&amp;amp;w=2 this note]&lt;br /&gt;
&lt;br /&gt;
==USB ==&lt;br /&gt;
===Snooping Utilities:===&lt;br /&gt;
* [[usbsnoop]] - a Windows based utility for sniffing/monitoring communications traffic for a USB device.  Note: In case usbsnoop/SniffUSB doesn't work for you, here are a few time limited apps that should work under Vista:&lt;br /&gt;
** [http://www.hhdsoftware.com/Family/usb-monitor.html USB Monitor] - 14-day trial period&lt;br /&gt;
** [http://www.usblyzer.com/ USBlyzer] - fully functional evaluation version for 33 days&lt;br /&gt;
* SnoopyPro - Windows based snoop for USB device communications traffic&lt;br /&gt;
* usbsnoop/SniffUSB - Windows based snoop for USB device communications traffic&lt;br /&gt;
* usbmon - Linux kernel module which can snoop USB device communications traffic&lt;br /&gt;
** Wireshark - logs usbmon output, via libpcap&lt;br /&gt;
** USBMon - logs usbmon output&lt;br /&gt;
&lt;br /&gt;
===Log parsers, format etc===&lt;br /&gt;
&lt;br /&gt;
* [[usbmon2usbsnoop]]&lt;br /&gt;
* [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-usbsnoop.php;h=master;hb=HEAD parse-usbsnoop.php]&lt;br /&gt;
* [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-sniffusb2.pl;h=master;hb=HEAD parse-sniffusb2.pl]&lt;br /&gt;
* [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/em28xx/parse_em28xx.pl;h=master;hb=HEAD em28xx log parser]&lt;br /&gt;
&lt;br /&gt;
===Snooping Procedures:===&lt;br /&gt;
* Use a Snopping utility to get the log. &lt;br /&gt;
* Group URB transactions into a shorter log by using a parser, like [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-usbsnoop.php;h=master;hb=HEAD parse-usbsnoop.php]&lt;br /&gt;
* Identify the URB transactions at the control endpoint. URB transactions look like those:&lt;br /&gt;
&lt;br /&gt;
40 02 00 00 ba 00 03 00 &amp;gt;&amp;gt;&amp;gt; 20 11 00&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+'''URB fields'''&lt;br /&gt;
|-&lt;br /&gt;
| Byte || Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 1 || {| bit 7 = 1 - IN / 0 - OUT&lt;br /&gt;
bit 6 = 1 - Vendor Class&lt;br /&gt;
|-&lt;br /&gt;
| 2 || URB Request&lt;br /&gt;
|-&lt;br /&gt;
| 3-4 || URB Value in big endian &lt;br /&gt;
|-&lt;br /&gt;
| 5-6 || URB Index in big endian &lt;br /&gt;
|-&lt;br /&gt;
| 7-8 || URB message size in big endian &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, let's analyse the folowing URB's:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+'''control URB examples '''&lt;br /&gt;
|-&lt;br /&gt;
| URB sequence log (URB setup + URB IN or OUT) || Byte 1 || Byte 2 || Bytes 3-4 || Bytes 5-6 || Bytes 7-8 || Message&lt;br /&gt;
|-&lt;br /&gt;
| 40 00 00 00 08 00 01 00 &amp;gt;&amp;gt;&amp;gt; 3d || USB OUT,  Vendor Class || Req = 0x00 || Value = 0x0000 || Index = 0x0008 || Size = 0x0001 || { 0x3d }&lt;br /&gt;
|-&lt;br /&gt;
| 40 02 00 00 ba 00 03 00 &amp;gt;&amp;gt;&amp;gt; 20 11 00 || USB OUT, Vendor Class || Req = 0x02 || Value = 0x0000 || Index = 0x00ba || Size = 0x0003 ||{ 0x20, 0x11, 0x00 }&lt;br /&gt;
|-&lt;br /&gt;
| c0 00 00 00 15 00 01 00 &amp;lt;&amp;lt;&amp;lt; 00 || USB IN, Vendor Class || Req = 0x00 || Value = 0x0000 || Index = 0x0015 || Size = 0x0001 || { 0x00 }&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After getting the log, you should analyse and understand the meaning of each of URB fields on your device.&lt;br /&gt;
&lt;br /&gt;
For example, in the case of [[Em28xx_devices | em28xx]], Req is used to indicate internal registers or I2C, Value is always 0 and Index indicates what device register is being used.&lt;br /&gt;
&lt;br /&gt;
On em28xx, the [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/em28xx/parse_em28xx.pl;h=master;hb=HEAD em28xx log parser] could be used in order to proccess the URBs and the driver dmesg dumps (in the compact format as shown above) and print them into a more human way, generating C like statements that can be added at em28xx source code (with a few adaptations, in the case of i2c messages):&lt;br /&gt;
&lt;br /&gt;
  em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x3d);&lt;br /&gt;
  i2c_master_send(0xba&amp;gt;&amp;gt;1, { 20 11 00  }, 0x03);&lt;br /&gt;
  em28xx_read_reg(dev, EM28XX_R15_RGAIN);         /* read 0x00 */&lt;br /&gt;
&lt;br /&gt;
===Command Playback Utilities:===&lt;br /&gt;
* usb-robot - plays back USB Snoopy capture logs&lt;br /&gt;
* usbreplay - plays back usbsnoop capture logs&lt;br /&gt;
&lt;br /&gt;
==i2c==&lt;br /&gt;
* i2c Tools: see [http://www.lm-sensors.org/wiki/I2CTools here] and [http://www.lm-sensors.org/wiki/i2cToolsDocumentation here]&lt;br /&gt;
* http://en.wikipedia.org/wiki/I2C#Development_Tools&lt;br /&gt;
* also see [http://www.spinics.net/lists/linux-dvb/msg16845.html this thread]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [[Wikipedia:Bus sniffing|Wikipedia's Bus sniffing article]]; note that the [[Wikipedia:Cache coherency|Cache coherency]] article is a probably a little less vague or more enlightening&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Bus_snooping/sniffing</id>
		<title>Bus snooping/sniffing</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Bus_snooping/sniffing"/>
				<updated>2010-04-12T11:36:00Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Purpose and relevance to development work -- description coming soon&lt;br /&gt;
&lt;br /&gt;
==PCI / PCIe == &lt;br /&gt;
===Snooping Utilities:===&lt;br /&gt;
* BTSpy [http://btwincap.sourceforge.net/custom.html] - Windows based snoop for BT8x8 based devices&lt;br /&gt;
* Dscaler's RegSpy [http://www.dscaler.com/] - Windows based; contains the ability to snoop the registers of [[Interface chipsets|PCI / PCIe interface chipsets]] ... also see [http://marc.info/?l=linux-dvb&amp;amp;m=122823618002379&amp;amp;w=2 this note]&lt;br /&gt;
&lt;br /&gt;
==USB ==&lt;br /&gt;
===Snooping Utilities:===&lt;br /&gt;
* [[usbsnoop]] - a Windows based utility for sniffing/monitoring communications traffic for a USB device.  Note: In case usbsnoop/SniffUSB doesn't work for you, here are a few time limited apps that should work under Vista:&lt;br /&gt;
** [http://www.hhdsoftware.com/Family/usb-monitor.html USB Monitor] - 14-day trial period&lt;br /&gt;
** [http://www.usblyzer.com/ USBlyzer] - fully functional evaluation version for 33 days&lt;br /&gt;
* SnoopyPro - Windows based snoop for USB device communications traffic&lt;br /&gt;
* usbsnoop/SniffUSB - Windows based snoop for USB device communications traffic&lt;br /&gt;
* usbmon - Linux kernel module which can snoop USB device communications traffic&lt;br /&gt;
** Wireshark - logs usbmon output, via libpcap&lt;br /&gt;
** USBMon - logs usbmon output&lt;br /&gt;
&lt;br /&gt;
===Log parsers, format etc===&lt;br /&gt;
&lt;br /&gt;
* [[usbmon2usbsnoop]]&lt;br /&gt;
* [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-usbsnoop.php;h=master;hb=HEAD parse-usbsnoop.php]&lt;br /&gt;
* [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-sniffusb2.pl;h=master;hb=HEAD parse-sniffusb2.pl]&lt;br /&gt;
* [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/em28xx/parse_em28xx.pl;h=master;hb=HEAD em28xx log parser]&lt;br /&gt;
&lt;br /&gt;
===Snooping Procedures:===&lt;br /&gt;
* Use a Snopping utility to get the log. &lt;br /&gt;
* Group URB transactions into a shorter log by using a parser, like [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-usbsnoop.php;h=master;hb=HEAD parse-usbsnoop.php]&lt;br /&gt;
* Identify the URB transactions at the control endpoint. URB transactions look like those:&lt;br /&gt;
&lt;br /&gt;
40 02 00 00 ba 00 03 00 &amp;gt;&amp;gt;&amp;gt; 20 11 00&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+'''URB fields'''&lt;br /&gt;
|-&lt;br /&gt;
| Byte || Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 1 || {| bit 7 = 1 - IN / 0 - OUT&lt;br /&gt;
bit 6 = 1 - Vendor Class&lt;br /&gt;
|-&lt;br /&gt;
| 2 || URB Request&lt;br /&gt;
|-&lt;br /&gt;
| 3-4 || URB Value in big endian &lt;br /&gt;
|-&lt;br /&gt;
| 5-6 || URB Index in big endian &lt;br /&gt;
|-&lt;br /&gt;
| 7-8 || URB message size in big endian &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, let's analyse the folowing URB's:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+'''control URB examples '''&lt;br /&gt;
|-&lt;br /&gt;
| URB sequence log (URB setup + URB IN or OUT) || Byte 1 || Byte 2 || Bytes 3-4 || Bytes 5-6 || Bytes 7-8 || Message&lt;br /&gt;
|-&lt;br /&gt;
| 40 00 00 00 08 00 01 00 &amp;gt;&amp;gt;&amp;gt; 3d || USB OUT,  Vendor Class || Req = 0x00 || Value = 0x0000 || Index = 0x0008 || Size = 0x0001 || { 0x3d }&lt;br /&gt;
|-&lt;br /&gt;
| 40 02 00 00 ba 00 03 00 &amp;gt;&amp;gt;&amp;gt; 20 11 00 || USB OUT, Vendor Class || Req = 0x02 || Value = 0x0000 || Index = 0x00ba || Size = 0x0003 ||{ 0x20, 0x11, 0x00 }&lt;br /&gt;
|-&lt;br /&gt;
| c0 00 00 00 15 00 01 00 &amp;lt;&amp;lt;&amp;lt; 00 || USB IN, Vendor Class || Req = 0x00 || Value = 0x0000 || Index = 0x0015 || Size = 0x0001 || { 0x00 }&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After getting the log, you should analyse and understand the meaning of each of URB fields on your device.&lt;br /&gt;
&lt;br /&gt;
For example, in the case of [[Em28xx Devices | em28xx]], Req is used to indicate internal registers or I2C, Value is always 0 and Index indicates what device register is being used.&lt;br /&gt;
&lt;br /&gt;
On em28xx, the [http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/em28xx/parse_em28xx.pl;h=master;hb=HEAD em28xx log parser] could be used in order to proccess the URBs and the driver dmesg dumps (in the compact format as shown above) and print them into a more human way, generating C like statements that can be added at em28xx source code (with a few adaptations, in the case of i2c messages):&lt;br /&gt;
&lt;br /&gt;
  em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x3d);&lt;br /&gt;
  i2c_master_send(0xba&amp;gt;&amp;gt;1, { 20 11 00  }, 0x03);&lt;br /&gt;
  em28xx_read_reg(dev, EM28XX_R15_RGAIN);         /* read 0x00 */&lt;br /&gt;
&lt;br /&gt;
===Command Playback Utilities:===&lt;br /&gt;
* usb-robot - plays back USB Snoopy capture logs&lt;br /&gt;
* usbreplay - plays back usbsnoop capture logs&lt;br /&gt;
&lt;br /&gt;
==i2c==&lt;br /&gt;
* i2c Tools: see [http://www.lm-sensors.org/wiki/I2CTools here] and [http://www.lm-sensors.org/wiki/i2cToolsDocumentation here]&lt;br /&gt;
* http://en.wikipedia.org/wiki/I2C#Development_Tools&lt;br /&gt;
* also see [http://www.spinics.net/lists/linux-dvb/msg16845.html this thread]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [[Wikipedia:Bus sniffing|Wikipedia's Bus sniffing article]]; note that the [[Wikipedia:Cache coherency|Cache coherency]] article is a probably a little less vague or more enlightening&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Bus_snooping/sniffing</id>
		<title>Bus snooping/sniffing</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Bus_snooping/sniffing"/>
				<updated>2010-04-12T11:31:12Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Log parsers, format etc */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Purpose and relevance to development work -- description coming soon&lt;br /&gt;
&lt;br /&gt;
==PCI / PCIe == &lt;br /&gt;
===Snooping Utilities:===&lt;br /&gt;
* BTSpy [http://btwincap.sourceforge.net/custom.html] - Windows based snoop for BT8x8 based devices&lt;br /&gt;
* Dscaler's RegSpy [http://www.dscaler.com/] - Windows based; contains the ability to snoop the registers of [[Interface chipsets|PCI / PCIe interface chipsets]] ... also see [http://marc.info/?l=linux-dvb&amp;amp;m=122823618002379&amp;amp;w=2 this note]&lt;br /&gt;
&lt;br /&gt;
==USB ==&lt;br /&gt;
===Snooping Utilities:===&lt;br /&gt;
* [[usbsnoop]] - a Windows based utility for sniffing/monitoring communications traffic for a USB device.  Note: In case usbsnoop/SniffUSB doesn't work for you, here are a few time limited apps that should work under Vista:&lt;br /&gt;
** [http://www.hhdsoftware.com/Family/usb-monitor.html USB Monitor] - 14-day trial period&lt;br /&gt;
** [http://www.usblyzer.com/ USBlyzer] - fully functional evaluation version for 33 days&lt;br /&gt;
* SnoopyPro - Windows based snoop for USB device communications traffic&lt;br /&gt;
* usbsnoop/SniffUSB - Windows based snoop for USB device communications traffic&lt;br /&gt;
* usbmon - Linux kernel module which can snoop USB device communications traffic&lt;br /&gt;
** Wireshark - logs usbmon output, via libpcap&lt;br /&gt;
** USBMon - logs usbmon output&lt;br /&gt;
&lt;br /&gt;
===Log parsers, format etc===&lt;br /&gt;
&lt;br /&gt;
* [[usbmon2usbsnoop]]&lt;br /&gt;
* [[http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-usbsnoop.php;h=master;hb=HEAD parse-usbsnoop.php]]&lt;br /&gt;
* [[http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/parse-sniffusb2.pl;h=master;hb=HEAD parse-sniffusb2.pl]]&lt;br /&gt;
* [[http://git.linuxtv.org/v4l-utils.git?a=blob_plain;f=contrib/em28xx/parse_em28xx.pl;h=master;hb=HEAD em28xx log parser]]&lt;br /&gt;
&lt;br /&gt;
===Snooping Procedures:===&lt;br /&gt;
* Use a Snopping utility to get the log. &lt;br /&gt;
* Group URB transactions into a shorter log by using a parser&lt;br /&gt;
* Identify the URB transactions at the control endpoint. URB transactions look like those:&lt;br /&gt;
&lt;br /&gt;
40 02 00 00 ba 00 03 00 &amp;gt;&amp;gt;&amp;gt; 20 11 00&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+'''URB fields'''&lt;br /&gt;
|-&lt;br /&gt;
| Byte || Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 1 || {| bit 7 = 1 - IN / 0 - OUT&lt;br /&gt;
bit 6 = 1 - Vendor Class&lt;br /&gt;
|-&lt;br /&gt;
| 2 || URB Request&lt;br /&gt;
|-&lt;br /&gt;
| 3-4 || URB Value in big endian &lt;br /&gt;
|-&lt;br /&gt;
| 5-6 || URB Index in big endian &lt;br /&gt;
|-&lt;br /&gt;
| 7-8 || URB message size in big endian &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, let's analyse the folowing URB's:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+'''control URB examples '''&lt;br /&gt;
|-&lt;br /&gt;
| URB sequence log (URB setup + URB IN or OUT) || Byte 1 || Byte 2 || Bytes 3-4 || Bytes 5-6 || Bytes 7-8 || Message&lt;br /&gt;
|-&lt;br /&gt;
| 40 00 00 00 08 00 01 00 &amp;gt;&amp;gt;&amp;gt; 3d || USB OUT,  Vendor Class || Req = 0x00 || Value = 0x0000 || Index = 0x0008 || Size = 0x0001 || { 0x3d }&lt;br /&gt;
|-&lt;br /&gt;
| 40 02 00 00 ba 00 03 00 &amp;gt;&amp;gt;&amp;gt; 20 11 00 || USB OUT, Vendor Class || Req = 0x02 || Value = 0x0000 || Index = 0x00ba || Size = 0x0003 ||{ 0x20, 0x11, 0x00 }&lt;br /&gt;
|-&lt;br /&gt;
| c0 00 00 00 15 00 01 00 &amp;lt;&amp;lt;&amp;lt; 00 || USB IN, Vendor Class || Req = 0x00 || Value = 0x0000 || Index = 0x0015 || Size = 0x0001 || { 0x00 }&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After getting the log, you should analyse and understand the meaning of each of URB fields on your device.&lt;br /&gt;
&lt;br /&gt;
For example, in the case of [[Em28xx Devices | em28xx]], Req is used to indicate internal registers or I2C, Value is always 0 and Index indicates what device register is being used.&lt;br /&gt;
&lt;br /&gt;
On em28xx, the [[http://linuxtv.org/hg/v4l-dvb/raw-file/tip/v4l2-apps/util/parse_em28xx.pl em28xx log parser]] could be used in order to proccess the URBs and the driver dmesg dumps (in the compact format as shown above) and print them into a more human way, generating C like statements that can be added at em28xx source code (with a few adaptations, in the case of i2c messages):&lt;br /&gt;
&lt;br /&gt;
  em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x3d);&lt;br /&gt;
  i2c_master_send(0xba&amp;gt;&amp;gt;1, { 20 11 00  }, 0x03);&lt;br /&gt;
  em28xx_read_reg(dev, EM28XX_R15_RGAIN);         /* read 0x00 */&lt;br /&gt;
&lt;br /&gt;
===Command Playback Utilities:===&lt;br /&gt;
* usb-robot - plays back USB Snoopy capture logs&lt;br /&gt;
* usbreplay - plays back usbsnoop capture logs&lt;br /&gt;
&lt;br /&gt;
==i2c==&lt;br /&gt;
* i2c Tools: see [http://www.lm-sensors.org/wiki/I2CTools here] and [http://www.lm-sensors.org/wiki/i2cToolsDocumentation here]&lt;br /&gt;
* http://en.wikipedia.org/wiki/I2C#Development_Tools&lt;br /&gt;
* also see [http://www.spinics.net/lists/linux-dvb/msg16845.html this thread]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [[Wikipedia:Bus sniffing|Wikipedia's Bus sniffing article]]; note that the [[Wikipedia:Cache coherency|Cache coherency]] article is a probably a little less vague or more enlightening&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/LinuxTV_dvb-apps</id>
		<title>LinuxTV dvb-apps</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/LinuxTV_dvb-apps"/>
				<updated>2010-02-23T13:01:47Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The LinuxTV dvb-apps package contains some Linux DVB API applications and a set of utilities that both the developer and end user alike will find quite useful.  Specifically, the utilities are geared towards the initial setup, testing, and operation of a DVB device, whether it be of the [[budget|software decoding (a.k.a. 'budget')]] or [[Full-featured Card|hardware decoding (a.k.a. 'premium' or 'full-featured')]] class.&lt;br /&gt;
&lt;br /&gt;
==Obtaining the dvb-apps package==&lt;br /&gt;
The dvb-apps package source code is available from the [[LinuxTV]] website and can be retrieved via [http://www.linuxtv.org/repo/#mercurial Mercurial (Hg)]. &lt;br /&gt;
&lt;br /&gt;
The download and build procedure is very simple:&lt;br /&gt;
&lt;br /&gt;
 hg clone http://linuxtv.org/hg/dvb-apps&lt;br /&gt;
 cd dvb-apps&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
There are some very old tarballs, compressed in [http://www.linuxtv.org/download/dvb/linuxtv-dvb-apps-1.1.1.tar.bz2 tar.bz2] and [http://www.linuxtv.org/download/dvb/linuxtv-dvb-apps-1.1.1.tar.gz tar.gz] formats.&lt;br /&gt;
&lt;br /&gt;
Alternatively, if the package is maintained in a repository available for your &amp;quot;distro&amp;quot;, then you can obtain a pre-built version with your package manager. Note, however, that not all Linux distributions ('distros') refer to the package by the proper &amp;quot;dvb-apps&amp;quot; name.  The Debian package name for it, for example, is &amp;quot;dvb-utils&amp;quot;.  In other cases, you may also sometimes see it called &amp;quot;dvbtools&amp;quot;.  This is an '''insane''' situation, which creates much confusion; additional to the fact that [[DVB tools]] is itself the name of another project (not associated with LinuxTV) that features its own set of DVB related utilities.  In any regard, the following provides a few examples with common distros &lt;br /&gt;
&lt;br /&gt;
:* To install it on a debian etch system: &lt;br /&gt;
::: &amp;lt;code&amp;gt;# apt-get install dvb-utils&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* To install it on a debian lenny system: &lt;br /&gt;
::: &amp;lt;code&amp;gt;# apt-get install dvb-apps&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* With gentoo: &lt;br /&gt;
:::  &amp;lt;code&amp;gt;# emerge linuxtv-dvb-apps&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* Using Fedora, assume root privileges then install the dvb utilities with:&lt;br /&gt;
:::  &amp;lt;code&amp;gt; # yum install dvb-apps&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* Using Suse, assume root privileges then install the dvb utilities with:&lt;br /&gt;
:::  &amp;lt;code&amp;gt; # zypper install dvb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* Using OpenEmbedded, assume root privileges then install the dvb utilities with:&lt;br /&gt;
:::  &amp;lt;code&amp;gt; # bitbake dvb-apps&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* With Arch Linux: &lt;br /&gt;
:::  &amp;lt;code&amp;gt;# pacman -S linuxtv-dvb-apps&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==List of utilities within 'dvb-apps'==&lt;br /&gt;
The README file in the top level of the package gives a brief description of the package's contents, but in general, some of the items of interest that you will find are:&lt;br /&gt;
&lt;br /&gt;
===Libraries===&lt;br /&gt;
* libdvbapi   - Interface library to digital TV devices.&lt;br /&gt;
* libdvbcfg   - Library to parse/create digital TV channel configuration files.&lt;br /&gt;
* libdvbsec   - Library for Satellite Equipment Control operations.&lt;br /&gt;
* libucsi     - Fast MPEG2 Transport Stream SI table parsing library.&lt;br /&gt;
* libdvben50221- Complete implementation of a CENELEC (European Committee for Electrotechnical Standardization) EN 50221 CAM stack.&lt;br /&gt;
* libdvbmisc  - Miscellaneous utilities used by the other libraries.&lt;br /&gt;
* libesg      - ??? Electronic Service Guide parser?&lt;br /&gt;
&lt;br /&gt;
===/util directory===&lt;br /&gt;
&lt;br /&gt;
*Main User Applications:&lt;br /&gt;
**[[Scan|scan]]: the original [[Frequency scan|frequency scanning]] tool used to generate channel lists &lt;br /&gt;
**[[dvbscan]]: another [[Frequency scan|frequency scanning]] tool used to generate channel lists .... some distro package managers have rebranded this as &amp;quot;scandvb&amp;quot; ... also note that &amp;quot;atscscan&amp;quot;, if included, is simply a copy of dvbscan&lt;br /&gt;
**[[Zap|azap, czap, szap, tzap]]: tuning utilities for DVB.&lt;br /&gt;
**util/gnutv      - Tune, watch and stream your TV. I.e. a DVB UI.&lt;br /&gt;
&lt;br /&gt;
*General Utilities:&lt;br /&gt;
**util/dvbdate    - Read date time information from the currently tuned multiplex.&lt;br /&gt;
**util/dvbnet     - Control digital data network interfaces. DVB network interface manager (IP over DVB).&lt;br /&gt;
**util/dvbtraffic - Monitor traffic on a digital device. PID analysis of currently tuned multiplex.&lt;br /&gt;
**util/femon      - Frontend (fe) monitor. Monitor the tuning status on a digital TV device.&lt;br /&gt;
**util/zap        - *Just* tunes a digital device - really intended for developers. Note that this is a seperate app then those ''*zap'' utilities listed above.&lt;br /&gt;
&lt;br /&gt;
*Hardware Specific Utilities:&lt;br /&gt;
**util/av7110_loadkeys    - A utiltity to load IR remote keymaps into an av7110 based card using the /proc/av7110_ir interface&lt;br /&gt;
**util/dib3000-watch      - Monitor DIB3000 demodulators&lt;br /&gt;
**util/dst-utils/dst-test  - Utilities for DST based cards.&lt;br /&gt;
**util/ttusb_dec_reset    - Reset a TechnoTrends TTUSB DEC device.&lt;br /&gt;
&lt;br /&gt;
===/test directory===&lt;br /&gt;
*diseqc: Sends various diseqc sequences on a SAT frontend.&lt;br /&gt;
*set22k: Legacy tone switching for SAT frontends.&lt;br /&gt;
*setvoltage: Legacy voltage switching for SAT frontends.&lt;br /&gt;
*setpid: Set video and audio PIDs in the demux (only for hardware MPEG decoder)&lt;br /&gt;
*video: tiny video watching application&lt;br /&gt;
*test_sections: Hex dump of section data from stream.&lt;br /&gt;
*test_sec_ne: Like test_sections, but also test Not-Equal filter mode.&lt;br /&gt;
*test_pes: Hex dump of PES data from stream.&lt;br /&gt;
*test_tt: Demonstrate teletext decoding from PES data.&lt;br /&gt;
*test_av: Test audio and video MPEG decoder API.&lt;br /&gt;
*test_vevent: Test VIDEO_GET_EVENT and poll() for video events&lt;br /&gt;
*test_stc: Test DMX_GET_STC.&lt;br /&gt;
*test_stillimage: Display single iframes as stillimages&lt;br /&gt;
*test_dvr: Record a partial transport stream of selected PIDs to a file or a full stream if supported by the hardware&lt;br /&gt;
&lt;br /&gt;
==TODO==&lt;br /&gt;
&lt;br /&gt;
* Start numbering the versions. Yes, with a repo every commit is a kind of version, but in the real world of distros and end users you need to define version numbers as easy reference points.&lt;br /&gt;
* Tag versioned releases and make src tarballs for the distros.&lt;br /&gt;
* Add ChangeLog and TODO files (and keep them up to date of course).&lt;br /&gt;
* Review the names of the apps and change where necessary. Perhaps ''scan'' is too ambiguous a name in a general-purpose system where all sorts of things can be scanned (with scanners, fax machines, barcode readers, etc.). &lt;br /&gt;
* Implement API version 5 scanning and zapping for DVB-S2 channels. See [[S2API]], [[scan-s2]] and [[szap-s2]]. There's a work undergoing to implement support to DVB API v5 for ISDB-T that also adds DVB API v5 to other transports at [http://linuxtv.org/hg/~mchehab/dvb-apps-isdbt2/].&lt;br /&gt;
* Improve the channels.conf file format so that one file can represent all the channels.  Need to&lt;br /&gt;
**(a) identify the source (S13.0E, S19.2E, Terrestrial, etc)&lt;br /&gt;
**(b) identify the delivery system (DVB-S, DVB-S2, DVB-T etc)&lt;br /&gt;
**(c) be able to represent all the parameters required for all the delivery systems in a unified way. For example DVB-S2 has some new paramters (e.g. rolloff). The &amp;quot;VDR&amp;quot; format was expanded for this, but in a messy way.&lt;br /&gt;
* Make sure there is one true format -- no &amp;quot;zap&amp;quot; versus &amp;quot;VDR&amp;quot; format confusion.&lt;br /&gt;
* Merge all the *zap programs. You unified the channels.conf file so this is next.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
*  See &amp;quot;[[Testing your DVB device]]&amp;quot; for usage examples of some of these tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Maintaining_Git_trees</id>
		<title>Maintaining Git trees</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Maintaining_Git_trees"/>
				<updated>2010-01-30T11:29:27Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* How to solve those issues? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== KERNEL DEVELOPMENT PROCEDURES AT THE KERNEL UPSTREAM ==&lt;br /&gt;
&lt;br /&gt;
It is important that people understand how upstream development works.&lt;br /&gt;
&lt;br /&gt;
Kernel development has 2 phases:&lt;br /&gt;
&lt;br /&gt;
*1) a merge window typically with 2 weeks (although Linus is gave some indications that he may reduce it on 2.6.34), starting with the release of a new kernel version;&lt;br /&gt;
&lt;br /&gt;
*2) the -rc period, where the Kernel is tested and receive fixes.&lt;br /&gt;
&lt;br /&gt;
The length of the -rc period depends on the number and relevance of the fixes. Considering the recent history, it ranges from -rc6 to -rc8, where each -rc takes one week.&lt;br /&gt;
&lt;br /&gt;
Those are the latest -rc kernels since 2.6.12:&lt;br /&gt;
{|  border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!kernel !!latest -rc version&lt;br /&gt;
|-&lt;br /&gt;
|2.6.12 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.13 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.14 ||align=&amp;quot;center&amp;quot; | rc5&lt;br /&gt;
|-&lt;br /&gt;
|2.6.15 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.16 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.17 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.18 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.19 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.20 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.21 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.22 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.23 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.24 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.25 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.26 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.27 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.28 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.29 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.30 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.31 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.32 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, the announcement of a new -rc kernel gives some hints when that -rc kernel may be the last one.&lt;br /&gt;
&lt;br /&gt;
====Subsystem procedures for merging patches upstream====&lt;br /&gt;
&lt;br /&gt;
The required procedure on subsystem trees is that:&lt;br /&gt;
&lt;br /&gt;
a) During -rc period (e.g. latest main kernel available is 2.6.x, the latest -rc kernel is 2.6.[x+1]-rc&amp;lt;y&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* fix patches for the -rc kernel (2.6.[x+1]) should be sent upstream, being a good idea to send them for some time at linux-next tree, allowing other people to test it, and check for potential conflicts with the other arch's;&lt;br /&gt;
* patches for 2.6.[x+2] should be sent to linux-next.&lt;br /&gt;
&lt;br /&gt;
b) the release of 2.6.[x+1] kernel:&lt;br /&gt;
&lt;br /&gt;
* closes the -rc period and starts the merge window.&lt;br /&gt;
&lt;br /&gt;
c) During the merge window:&lt;br /&gt;
&lt;br /&gt;
* the patch that were added on linux-next during the -rc period for 2.6.[x+2] should be sent upstream;&lt;br /&gt;
* new non-fix patches should be hold until the next -rc period starts, so, they'll be added on 2.6.[x+3];&lt;br /&gt;
* fix patches for 2.6.[x+2] should go to linux-next, wait for a few days and then send upstream.&lt;br /&gt;
&lt;br /&gt;
d) the release of 2.6.[x+2]-rc1 kernel:&lt;br /&gt;
&lt;br /&gt;
* the merge window has closed. No new features are allowed.&lt;br /&gt;
* the patches with new features that arrived during the merge window will be moved to linux-next&lt;br /&gt;
&lt;br /&gt;
====A practical example====&lt;br /&gt;
&lt;br /&gt;
Considering that, at the time this document were written, the last main release is 2.6.32, and the latest -rc release is 2.6.33-rc5, this means that:&lt;br /&gt;
&lt;br /&gt;
* Stable patches, after adding upstream, are being received for 2.6.32 kernel series;&lt;br /&gt;
* Bug fixes are being received for kernel 2.6.33;&lt;br /&gt;
* New feature patches are being received for kernel 2.6.34.&lt;br /&gt;
&lt;br /&gt;
After the release of kernel 2.6.33, starts the period for receiving patches for 2.6.35.&lt;br /&gt;
&lt;br /&gt;
In other words, the features being developed are always meant to be included on the next 2 kernels.&lt;br /&gt;
&lt;br /&gt;
In the specific case of new drivers that don't touch on existing features, it could be possible to send it during the -rc period, but it is safer to assume that those drivers should follow the above procedure, as a later submission may be nacked.&lt;br /&gt;
&lt;br /&gt;
====Patches for stable====&lt;br /&gt;
&lt;br /&gt;
Sometimes, a fix patch corrects a problem that happens also on stable kernels (e. g. on kernel 2.6.x or even 2.6.y, where y &amp;lt; x). In this case, the patch should be sent to stable@kernel.org, in order to be added on stable kernels.&lt;br /&gt;
&lt;br /&gt;
In the case of git-submitted patches with fixes, that also need to be send to stable, all the developer needs to do is to add, a the patch description:&lt;br /&gt;
  CC: stable.kernel.org&lt;br /&gt;
&lt;br /&gt;
At the moment the patch reaches upstream, a copy of the patch will be automatically be sent to the stable maintainer and will be considered for inclusion on the next stable kernel (2.6.x.y).&lt;br /&gt;
&lt;br /&gt;
== KERNEL DEVELOPMENT PROCEDURES FOR V4L/DVB ==&lt;br /&gt;
&lt;br /&gt;
The upsteam procedures should be followed by every kernel subsystem. The subsystems have their own specific procedures detailing how the development patches are handled before arriving upstream. In the case of v4l/dvb, those are the used procedures.&lt;br /&gt;
&lt;br /&gt;
==== Fixes and linux-next patches====&lt;br /&gt;
&lt;br /&gt;
One of the big problems of our model used in the past by the subsystem, based on one Mercurial tree, is that there were just one tree/branch for everything. This makes hard to send some fix patches for 2.6.[x+1], as they may have conflicts with the patches for 2.6.[x+2]. So, when the conflict is simple to solve, the patch is sent as fixes. Otherwise, the patch generally needed to hold to the next cycle. &lt;br /&gt;
The fix patches used to get a special tag, added by the developer (&amp;quot;Priority: high&amp;quot;, in the body of the description), to give a hint to the subsystem maintainer that the patch should be sent upstream.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, sometimes people mark the driver with the wrong tag. For example, a patch got merged on Jan, 22 2010 that marked with &amp;quot;high&amp;quot;. However, that patch didn't apply at the fixes tree, because it fix a regression introduced by a driver that weren't merged upstream yet.&lt;br /&gt;
&lt;br /&gt;
==== How to solve those issues? ====&lt;br /&gt;
&lt;br /&gt;
Well, basically, the subsystem should work with more than one tree (or branch), on upstream submission:&lt;br /&gt;
* a tree(branch) with the fix patches;&lt;br /&gt;
* a tree(branch) with the new feature patches.&lt;br /&gt;
&lt;br /&gt;
So, the subsystem uses two development -git trees:&lt;br /&gt;
* http://linuxtv.org/git//v4l-dvb.git	- for patches that will be sent to the [x+2] kernel (and merged at upstream linux-next tree)&lt;br /&gt;
* http://linuxtv.org/git//fixes.git	- for bug patches that will be sent to the [x+1] kernel (also, patches that need to go to both [x+1] and [x])&lt;br /&gt;
	&lt;br /&gt;
While the patches via -hg, due to the merge conflicts its mentioned, the better is that, even those developers that prefer to develop patches use the old way, to send the fix patches via -git. This way, if is there a conflict, he is the one that can better solve it. Also, it avoids the risk of a patch being wrongly tagged.&lt;br /&gt;
&lt;br /&gt;
Also, after having a patch added on one of the above trees, it can't simply remove it, as others will be cloning that tree. So, the only option would be to send a revert patch, causing the patch history to be dirty and could be resulting on some troubles when submitting upstream. I've seen some nacks on receiving patches upstream from dirty git trees. So, we should really avoid this.&lt;br /&gt;
&lt;br /&gt;
==how to submit a -git pull request==&lt;br /&gt;
&lt;br /&gt;
As the same git tree may have more than one branch, and we'll have 2 -git trees for upstream, it is required that people specify what should be done. The internal maintainer's workflow is based on different mail queues for each type of requesting received. &lt;br /&gt;
&lt;br /&gt;
There are some scripts to automate the process, so it is important that everyone that sends -git pull do it at the same way.&lt;br /&gt;
&lt;br /&gt;
So, a pull request to be send with the following email tags:&lt;br /&gt;
&lt;br /&gt;
  From: &amp;lt;your real email&amp;gt;&lt;br /&gt;
  Subject: [GIT FIXES FOR 2.6.33] Fixes for driver cx88&lt;br /&gt;
  To: linux-media@vger.kernel.org&lt;br /&gt;
&lt;br /&gt;
  From: &amp;lt;your real email&amp;gt;&lt;br /&gt;
  Subject: [GIT PATCHES FOR 2.6.34] Updates for the driver saa7134&lt;br /&gt;
  To: linux-media@vger.kernel.org&lt;br /&gt;
&lt;br /&gt;
The from line may later be used by the git mailbomb script to send you a copy when the patch were committed, so it should be your real email.&lt;br /&gt;
&lt;br /&gt;
The indication between [] on the subject will be handled by the mailer scripts to put the request at the right queue. So, if tagged wrong, it may not be committed.&lt;br /&gt;
&lt;br /&gt;
Don't send a copy of the pull to the maintainer addresses. The pull will be filtering based on the subject and on the mailing list. If you send a c/c to the maintainer, it will be simply discarded.&lt;br /&gt;
&lt;br /&gt;
NEVER send a copy of any pull request to a subscribers-only mailing list. Everyone is free to answer to the email, reviewing your patches. Don't penalty people that wants to contribute with you with SPAM bouncing emails, produced by subscribers only lists.&lt;br /&gt;
&lt;br /&gt;
When a patch touches on other subsystem codes, please copy the other subsystem maintainers. This is important for patches that touches on arch files, and also for -alsa non-trivial patches.&lt;br /&gt;
&lt;br /&gt;
The email should be generated with the usage of git request-pull:&lt;br /&gt;
       git request-pull $ORIGIN $URL&lt;br /&gt;
&lt;br /&gt;
where $ORIGIN is the commit hash of the tree before your patches, and $URL is the URL for your repository.&lt;br /&gt;
&lt;br /&gt;
For example, for the patches merged directly from -hg at the -git trees on Jan, 22 2010, the above commands produced:&lt;br /&gt;
&lt;br /&gt;
  The following changes since commit 2f52713ab3cb9af2eb0f9354dba1421d1497f3e7:&lt;br /&gt;
    Abylay Ospan (1):&lt;br /&gt;
          V4L/DVB: 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card. 22kHz logic controlled by demod&lt;br /&gt;
  &lt;br /&gt;
  are available in the git repository at:&lt;br /&gt;
  &lt;br /&gt;
    git://linuxtv.org/v4l-dvb.git master&lt;br /&gt;
  &lt;br /&gt;
  Andy Walls (4):&lt;br /&gt;
        V4L/DVB: cx25840, v4l2-subdev, ivtv, pvrusb2: Fix ivtv/cx25840 tinny audio&lt;br /&gt;
        V4L/DVB: ivtv: Adjust msleep() delays used to prevent tinny audio and PCI bus hang&lt;br /&gt;
        V4L/DVB: cx18-alsa: Initial non-working cx18-alsa files&lt;br /&gt;
        V4L/DVB: cx18-alsa: Add non-working cx18-alsa-pcm.[ch] files to avoid data loss&lt;br /&gt;
  &lt;br /&gt;
  Devin Heitmueller (20):&lt;br /&gt;
        V4L/DVB: xc3028: fix regression in firmware loading time&lt;br /&gt;
        V4L/DVB: cx18: rename cx18-alsa.c&lt;br /&gt;
        V4L/DVB: cx18: make it so cx18-alsa-main.c compiles&lt;br /&gt;
        V4L/DVB: cx18: export a couple of symbols so they can be shared with cx18-alsa&lt;br /&gt;
        V4L/DVB: cx18: overhaul ALSA PCM device handling so it works&lt;br /&gt;
        V4L/DVB: cx18: add cx18-alsa module to Makefile&lt;br /&gt;
        V4L/DVB: cx18: export more symbols required by cx18-alsa&lt;br /&gt;
        V4L/DVB: cx18-alsa: remove unneeded debug line&lt;br /&gt;
        V4L/DVB: cx18: rework cx18-alsa module loading to support automatic loading&lt;br /&gt;
        V4L/DVB: cx18: cleanup cx18-alsa debug logging&lt;br /&gt;
        V4L/DVB: cx18-alsa: name alsa device after the actual card&lt;br /&gt;
        V4L/DVB: cx18-alsa: remove a couple of warnings&lt;br /&gt;
        V4L/DVB: cx18-alsa: fix memory leak in error condition&lt;br /&gt;
        V4L/DVB: cx18-alsa: fix codingstyle issue&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle fixes&lt;br /&gt;
        V4L/DVB: cx18: codingstyle fixes&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle cleanup&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle cleanup&lt;br /&gt;
        V4L/DVB: cx18: address possible passing of NULL to snd_card_free&lt;br /&gt;
        V4L/DVB: cx18-alsa: Fix the rates definition and move some buffer freeing code.&lt;br /&gt;
  &lt;br /&gt;
  Ian Armstrong (1):&lt;br /&gt;
        V4L/DVB: ivtv: Fix race condition for queued udma transfers&lt;br /&gt;
  &lt;br /&gt;
  Igor M. Liplianin (4):&lt;br /&gt;
        V4L/DVB: Add Support for DVBWorld DVB-S2 PCI 2004D card&lt;br /&gt;
        V4L/DVB: dm1105: connect splitted else-if statements&lt;br /&gt;
        V4L/DVB: dm1105: use dm1105_dev &amp;amp; dev instead of dm1105dvb&lt;br /&gt;
        V4L/DVB: dm1105: use macro for read/write registers&lt;br /&gt;
  &lt;br /&gt;
  JD Louw (1):&lt;br /&gt;
        V4L/DVB: Compro S350 GPIO change&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/common/tuners/tuner-xc2028.c  |   11 +-&lt;br /&gt;
   drivers/media/dvb/dm1105/Kconfig            |    1 +&lt;br /&gt;
   drivers/media/dvb/dm1105/dm1105.c           |  501 ++++++++++++++-------------&lt;br /&gt;
   drivers/media/video/cx18/Kconfig            |   11 +&lt;br /&gt;
   drivers/media/video/cx18/Makefile           |    2 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-main.c   |  293 ++++++++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-mixer.c  |  191 ++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-mixer.h  |   23 ++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-pcm.c    |  353 +++++++++++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-pcm.h    |   27 ++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa.h        |   59 ++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-driver.c      |   40 ++-&lt;br /&gt;
   drivers/media/video/cx18/cx18-driver.h      |   10 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-fileops.c     |    6 +-&lt;br /&gt;
   drivers/media/video/cx18/cx18-fileops.h     |    3 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-mailbox.c     |   46 +++-&lt;br /&gt;
   drivers/media/video/cx18/cx18-streams.c     |    2 +&lt;br /&gt;
   drivers/media/video/cx25840/cx25840-core.c  |   48 ++-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-irq.c         |    5 +-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-streams.c     |    6 +-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-udma.c        |    1 +&lt;br /&gt;
   drivers/media/video/pvrusb2/pvrusb2-hdw.c   |    1 +&lt;br /&gt;
   drivers/media/video/saa7134/saa7134-cards.c |    4 +-&lt;br /&gt;
   include/media/v4l2-subdev.h                 |    1 +&lt;br /&gt;
   24 files changed, 1380 insertions(+), 265 deletions(-)&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-main.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-mixer.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-mixer.h&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-pcm.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-pcm.h&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa.h&lt;br /&gt;
&lt;br /&gt;
This helps to identify what's expected to be found at the -git tree and to double check if the merge happened fine.&lt;br /&gt;
&lt;br /&gt;
====Tags that a patch receive after its submission====&lt;br /&gt;
&lt;br /&gt;
This is probably the most complex issue to solve.&lt;br /&gt;
&lt;br /&gt;
Signed-off-by/Acked-by/Tested-by/Nacked-by tags may be received after a patch or a -git submission. This can happen even while the patch is being tested at linux-next, from people reporting problems on the existing patches, or reporting that a patch worked fine.&lt;br /&gt;
&lt;br /&gt;
Also, the driver maintainer and the subsystem maintainer that is committing those patches should sign each one, to indicate that he reviewed and has accepted the patch. &lt;br /&gt;
&lt;br /&gt;
Currently, if a new tag is added to a committed patch, its hash will change. There were some discussions at Linux Kernel Mailing List about allowing adding new tags on -git without changing the hash, but I think this weren't implemented (yet?).&lt;br /&gt;
&lt;br /&gt;
The same problem occurs with -hg, but, as -hg doesn't support multiple branches (well, it has a &amp;quot;branch&amp;quot; command, but the concept of branch there is different), it was opted that the -hg trees won't have all the needed SOBs. Instead, those would be added only at the submission tree.&lt;br /&gt;
&lt;br /&gt;
With -git, a better procedure can be used:&lt;br /&gt;
&lt;br /&gt;
The developer may have two separate branches on his tree. For example, let's assume that the developer has the following branches on his tree:&lt;br /&gt;
* media-master		(associated with &amp;quot;linuxtv&amp;quot; remote)&lt;br /&gt;
* fixes&lt;br /&gt;
* devel&lt;br /&gt;
&lt;br /&gt;
His development happens on devel branch. When the patches are ready to submission will be copied into a new for_submission branch:&lt;br /&gt;
	git branch for_submission devel&lt;br /&gt;
&lt;br /&gt;
And a pull request from the branch &amp;quot;for_submission&amp;quot; will be sent.&lt;br /&gt;
&lt;br /&gt;
Eventually, he'll write new patches on his devel branch.&lt;br /&gt;
&lt;br /&gt;
After merged, the developer updates the linuxtv remote and drops the for_submission branch. This way, &amp;quot;media-master&amp;quot; will contain his patches that got a new hash, due to the maintainer's SOB. However, he has some new patches on his devel, that applies over the old hashes.&lt;br /&gt;
&lt;br /&gt;
Fortunately, git has a special command to automatically remove the old objects: git rebase.&lt;br /&gt;
&lt;br /&gt;
All the developer needs to do is to run the commands bellow:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!git command&lt;br /&gt;
!notes&lt;br /&gt;
|-&lt;br /&gt;
| git remote update || to update his remotes, including &amp;quot;linuxtv&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| git checkout devel || move to devel branch&lt;br /&gt;
|-&lt;br /&gt;
| git pull . media-master || to make a recursive merge from v4l/dvb upstream&lt;br /&gt;
|-&lt;br /&gt;
| git rebase media-master || to remove the legacy hashes&lt;br /&gt;
|}&lt;br /&gt;
After this, his development branch will contain only upstream patches + the new ones he added after sending the patches for upstream submission.&lt;br /&gt;
&lt;br /&gt;
==Patches submitted via email==&lt;br /&gt;
&lt;br /&gt;
All valid patches submitted via email to [[mailto:linux-media@vger.kernel.org Linux Media ML]] are automatically stored at [[http://patchwork.kernel.org/project/linux-media/list/ Kernel Patchwork]]. A patch, to be valid, should be in diff unified format. If you're using a -git tree, the simplest way to generate unified diff patches is to run:&lt;br /&gt;
  git diff&lt;br /&gt;
&lt;br /&gt;
If you're writing several patches, the better is to create a tag or a branch for the changes you're working. After that, you can use&lt;br /&gt;
   git format-patch &amp;lt;origin_branch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to create the patches for email submission.&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
Suppose that the -git tree were created with:&lt;br /&gt;
&lt;br /&gt;
  git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git v4l-dvb&lt;br /&gt;
  cd v4l-dvb&lt;br /&gt;
  git remote add linuxtv git://linuxtv.org/v4l-dvb.git&lt;br /&gt;
  git remote update&lt;br /&gt;
  git checkout -b media-master linuxtv/master&lt;br /&gt;
    &lt;br /&gt;
Before start working, you need to create your work branch:&lt;br /&gt;
&lt;br /&gt;
  git branch work media-master&lt;br /&gt;
&lt;br /&gt;
And move the working copy to the &amp;quot;work&amp;quot; branch:&lt;br /&gt;
&lt;br /&gt;
  git checkout work&lt;br /&gt;
&lt;br /&gt;
Some changes were done at the driver and saved by commit:&lt;br /&gt;
&lt;br /&gt;
  git commit -as&lt;br /&gt;
&lt;br /&gt;
When the patches are ready for submission via email, all that is needed is to run:&lt;br /&gt;
&lt;br /&gt;
  git format-patch work&lt;br /&gt;
&lt;br /&gt;
The command will create a series of emails bodies, one file per email.&lt;br /&gt;
&lt;br /&gt;
Just send the email with the patch inlined for it to ge caught by patchwork.&lt;br /&gt;
&lt;br /&gt;
   BE CAREFUL: several emailers including Thunderdird breaks long lines, causing patch corruption.&lt;br /&gt;
   In the specific case of Thunderbird, an extension is needed to send the patches:  [https://hg.mozilla.org/users/clarkbw_gnome.org/asalted-patches/| Asalted Patches].&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Maintaining_Git_trees</id>
		<title>Maintaining Git trees</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Maintaining_Git_trees"/>
				<updated>2010-01-29T22:33:33Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== KERNEL DEVELOPMENT PROCEDURES AT THE KERNEL UPSTREAM ==&lt;br /&gt;
&lt;br /&gt;
It is important that people understand how upstream development works.&lt;br /&gt;
&lt;br /&gt;
Kernel development has 2 phases:&lt;br /&gt;
&lt;br /&gt;
*1) a merge window typically with 2 weeks (although Linus is gave some indications that he may reduce it on 2.6.34), starting with the release of a new kernel version;&lt;br /&gt;
&lt;br /&gt;
*2) the -rc period, where the Kernel is tested and receive fixes.&lt;br /&gt;
&lt;br /&gt;
The length of the -rc period depends on the number and relevance of the fixes. Considering the recent history, it ranges from -rc6 to -rc8, where each -rc takes one week.&lt;br /&gt;
&lt;br /&gt;
Those are the latest -rc kernels since 2.6.12:&lt;br /&gt;
{|  border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!kernel !!latest -rc version&lt;br /&gt;
|-&lt;br /&gt;
|2.6.12 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.13 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.14 ||align=&amp;quot;center&amp;quot; | rc5&lt;br /&gt;
|-&lt;br /&gt;
|2.6.15 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.16 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.17 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.18 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.19 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.20 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.21 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.22 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.23 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.24 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.25 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.26 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.27 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.28 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.29 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.30 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.31 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.32 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, the announcement of a new -rc kernel gives some hints when that -rc kernel may be the last one.&lt;br /&gt;
&lt;br /&gt;
====Subsystem procedures for merging patches upstream====&lt;br /&gt;
&lt;br /&gt;
The required procedure on subsystem trees is that:&lt;br /&gt;
&lt;br /&gt;
a) During -rc period (e.g. latest main kernel available is 2.6.x, the latest -rc kernel is 2.6.[x+1]-rc&amp;lt;y&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* fix patches for the -rc kernel (2.6.[x+1]) should be sent upstream, being a good idea to send them for some time at linux-next tree, allowing other people to test it, and check for potential conflicts with the other arch's;&lt;br /&gt;
* patches for 2.6.[x+2] should be sent to linux-next.&lt;br /&gt;
&lt;br /&gt;
b) the release of 2.6.[x+1] kernel:&lt;br /&gt;
&lt;br /&gt;
* closes the -rc period and starts the merge window.&lt;br /&gt;
&lt;br /&gt;
c) During the merge window:&lt;br /&gt;
&lt;br /&gt;
* the patch that were added on linux-next during the -rc period for 2.6.[x+2] should be sent upstream;&lt;br /&gt;
* new non-fix patches should be hold until the next -rc period starts, so, they'll be added on 2.6.[x+3];&lt;br /&gt;
* fix patches for 2.6.[x+2] should go to linux-next, wait for a few days and then send upstream.&lt;br /&gt;
&lt;br /&gt;
d) the release of 2.6.[x+2]-rc1 kernel:&lt;br /&gt;
&lt;br /&gt;
* the merge window has closed. No new features are allowed.&lt;br /&gt;
* the patches with new features that arrived during the merge window will be moved to linux-next&lt;br /&gt;
&lt;br /&gt;
====A practical example====&lt;br /&gt;
&lt;br /&gt;
Considering that, at the time this document were written, the last main release is 2.6.32, and the latest -rc release is 2.6.33-rc5, this means that:&lt;br /&gt;
&lt;br /&gt;
* Stable patches, after adding upstream, are being received for 2.6.32 kernel series;&lt;br /&gt;
* Bug fixes are being received for kernel 2.6.33;&lt;br /&gt;
* New feature patches are being received for kernel 2.6.34.&lt;br /&gt;
&lt;br /&gt;
After the release of kernel 2.6.33, starts the period for receiving patches for 2.6.35.&lt;br /&gt;
&lt;br /&gt;
In other words, the features being developed are always meant to be included on the next 2 kernels.&lt;br /&gt;
&lt;br /&gt;
In the specific case of new drivers that don't touch on existing features, it could be possible to send it during the -rc period, but it is safer to assume that those drivers should follow the above procedure, as a later submission may be nacked.&lt;br /&gt;
&lt;br /&gt;
====Patches for stable====&lt;br /&gt;
&lt;br /&gt;
Sometimes, a fix patch corrects a problem that happens also on stable kernels (e. g. on kernel 2.6.x or even 2.6.y, where y &amp;lt; x). In this case, the patch should be sent to stable@kernel.org, in order to be added on stable kernels.&lt;br /&gt;
&lt;br /&gt;
In the case of git-submitted patches with fixes, that also need to be send to stable, all the developer needs to do is to add, a the patch description:&lt;br /&gt;
  CC: stable.kernel.org&lt;br /&gt;
&lt;br /&gt;
At the moment the patch reaches upstream, a copy of the patch will be automatically be sent to the stable maintainer and will be considered for inclusion on the next stable kernel (2.6.x.y).&lt;br /&gt;
&lt;br /&gt;
== KERNEL DEVELOPMENT PROCEDURES FOR V4L/DVB ==&lt;br /&gt;
&lt;br /&gt;
The upsteam procedures should be followed by every kernel subsystem. The subsystems have their own specific procedures detailing how the development patches are handled before arriving upstream. In the case of v4l/dvb, those are the used procedures.&lt;br /&gt;
&lt;br /&gt;
==== Fixes and linux-next patches====&lt;br /&gt;
&lt;br /&gt;
One of the big problems of our model used in the past by the subsystem, based on one Mercurial tree, is that there were just one tree/branch for everything. This makes hard to send some fix patches for 2.6.[x+1], as they may have conflicts with the patches for 2.6.[x+2]. So, when the conflict is simple to solve, the patch is sent as fixes. Otherwise, the patch generally needed to hold to the next cycle. &lt;br /&gt;
The fix patches used to get a special tag, added by the developer (&amp;quot;Priority: high&amp;quot;, in the body of the description), to give a hint to the subsystem maintainer that the patch should be sent upstream.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, sometimes people mark the driver with the wrong tag. For example, a patch got merged on Jan, 22 2010 that marked with &amp;quot;high&amp;quot;. However, that patch didn't apply at the fixes tree, because it fix a regression introduced by a driver that weren't merged upstream yet.&lt;br /&gt;
&lt;br /&gt;
====== How to solve those issues? ======&lt;br /&gt;
&lt;br /&gt;
Well, basically, the subsystem should work with more than one tree (or branch), on upstream submission:&lt;br /&gt;
* a tree(branch) with the fix patches;&lt;br /&gt;
* a tree(branch) with the new feature patches.&lt;br /&gt;
&lt;br /&gt;
So, the subsystem uses two development -git trees:&lt;br /&gt;
* http://linuxtv.org/git//v4l-dvb.git	- for patches that will be sent to the [x+2] kernel (and merged at upstream linux-next tree)&lt;br /&gt;
* http://linuxtv.org/git//fixes.git	- for bug patches that will be sent to the [x+1] kernel (also, patches that need to go to both [x+1] and [x])&lt;br /&gt;
	&lt;br /&gt;
While the patches via -hg, due to the merge conflicts its mentioned, the better is that, even those developers that prefer to develop patches use the old way, to send the fix patches via -git. This way, if is there a conflict, he is the one that can better solve it. Also, it avoids the risk of a patch being wrongly tagged.&lt;br /&gt;
&lt;br /&gt;
Also, after having a patch added on one of the above trees, it can't simply remove it, as others will be cloning that tree. So, the only option would be to send a revert patch, causing the patch history to be dirty and could be resulting on some troubles when submitting upstream. I've seen some nacks on receiving patches upstream from dirty git trees. So, we should really avoid this.&lt;br /&gt;
&lt;br /&gt;
==how to submit a -git pull request==&lt;br /&gt;
&lt;br /&gt;
As the same git tree may have more than one branch, and we'll have 2 -git trees for upstream, it is required that people specify what should be done. The internal maintainer's workflow is based on different mail queues for each type of requesting received. &lt;br /&gt;
&lt;br /&gt;
There are some scripts to automate the process, so it is important that everyone that sends -git pull do it at the same way.&lt;br /&gt;
&lt;br /&gt;
So, a pull request to be send with the following email tags:&lt;br /&gt;
&lt;br /&gt;
  From: &amp;lt;your real email&amp;gt;&lt;br /&gt;
  Subject: [GIT FIXES FOR 2.6.33] Fixes for driver cx88&lt;br /&gt;
  To: linux-media@vger.kernel.org&lt;br /&gt;
&lt;br /&gt;
  From: &amp;lt;your real email&amp;gt;&lt;br /&gt;
  Subject: [GIT PATCHES FOR 2.6.34] Updates for the driver saa7134&lt;br /&gt;
  To: linux-media@vger.kernel.org&lt;br /&gt;
&lt;br /&gt;
The from line may later be used by the git mailbomb script to send you a copy when the patch were committed, so it should be your real email.&lt;br /&gt;
&lt;br /&gt;
The indication between [] on the subject will be handled by the mailer scripts to put the request at the right queue. So, if tagged wrong, it may not be committed.&lt;br /&gt;
&lt;br /&gt;
Don't send a copy of the pull to the maintainer addresses. The pull will be filtering based on the subject and on the mailing list. If you send a c/c to the maintainer, it will be simply discarded.&lt;br /&gt;
&lt;br /&gt;
NEVER send a copy of any pull request to a subscribers-only mailing list. Everyone is free to answer to the email, reviewing your patches. Don't penalty people that wants to contribute with you with SPAM bouncing emails, produced by subscribers only lists.&lt;br /&gt;
&lt;br /&gt;
When a patch touches on other subsystem codes, please copy the other subsystem maintainers. This is important for patches that touches on arch files, and also for -alsa non-trivial patches.&lt;br /&gt;
&lt;br /&gt;
The email should be generated with the usage of git request-pull:&lt;br /&gt;
       git request-pull $ORIGIN $URL&lt;br /&gt;
&lt;br /&gt;
where $ORIGIN is the commit hash of the tree before your patches, and $URL is the URL for your repository.&lt;br /&gt;
&lt;br /&gt;
For example, for the patches merged directly from -hg at the -git trees on Jan, 22 2010, the above commands produced:&lt;br /&gt;
&lt;br /&gt;
  The following changes since commit 2f52713ab3cb9af2eb0f9354dba1421d1497f3e7:&lt;br /&gt;
    Abylay Ospan (1):&lt;br /&gt;
          V4L/DVB: 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card. 22kHz logic controlled by demod&lt;br /&gt;
  &lt;br /&gt;
  are available in the git repository at:&lt;br /&gt;
  &lt;br /&gt;
    git://linuxtv.org/v4l-dvb.git master&lt;br /&gt;
  &lt;br /&gt;
  Andy Walls (4):&lt;br /&gt;
        V4L/DVB: cx25840, v4l2-subdev, ivtv, pvrusb2: Fix ivtv/cx25840 tinny audio&lt;br /&gt;
        V4L/DVB: ivtv: Adjust msleep() delays used to prevent tinny audio and PCI bus hang&lt;br /&gt;
        V4L/DVB: cx18-alsa: Initial non-working cx18-alsa files&lt;br /&gt;
        V4L/DVB: cx18-alsa: Add non-working cx18-alsa-pcm.[ch] files to avoid data loss&lt;br /&gt;
  &lt;br /&gt;
  Devin Heitmueller (20):&lt;br /&gt;
        V4L/DVB: xc3028: fix regression in firmware loading time&lt;br /&gt;
        V4L/DVB: cx18: rename cx18-alsa.c&lt;br /&gt;
        V4L/DVB: cx18: make it so cx18-alsa-main.c compiles&lt;br /&gt;
        V4L/DVB: cx18: export a couple of symbols so they can be shared with cx18-alsa&lt;br /&gt;
        V4L/DVB: cx18: overhaul ALSA PCM device handling so it works&lt;br /&gt;
        V4L/DVB: cx18: add cx18-alsa module to Makefile&lt;br /&gt;
        V4L/DVB: cx18: export more symbols required by cx18-alsa&lt;br /&gt;
        V4L/DVB: cx18-alsa: remove unneeded debug line&lt;br /&gt;
        V4L/DVB: cx18: rework cx18-alsa module loading to support automatic loading&lt;br /&gt;
        V4L/DVB: cx18: cleanup cx18-alsa debug logging&lt;br /&gt;
        V4L/DVB: cx18-alsa: name alsa device after the actual card&lt;br /&gt;
        V4L/DVB: cx18-alsa: remove a couple of warnings&lt;br /&gt;
        V4L/DVB: cx18-alsa: fix memory leak in error condition&lt;br /&gt;
        V4L/DVB: cx18-alsa: fix codingstyle issue&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle fixes&lt;br /&gt;
        V4L/DVB: cx18: codingstyle fixes&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle cleanup&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle cleanup&lt;br /&gt;
        V4L/DVB: cx18: address possible passing of NULL to snd_card_free&lt;br /&gt;
        V4L/DVB: cx18-alsa: Fix the rates definition and move some buffer freeing code.&lt;br /&gt;
  &lt;br /&gt;
  Ian Armstrong (1):&lt;br /&gt;
        V4L/DVB: ivtv: Fix race condition for queued udma transfers&lt;br /&gt;
  &lt;br /&gt;
  Igor M. Liplianin (4):&lt;br /&gt;
        V4L/DVB: Add Support for DVBWorld DVB-S2 PCI 2004D card&lt;br /&gt;
        V4L/DVB: dm1105: connect splitted else-if statements&lt;br /&gt;
        V4L/DVB: dm1105: use dm1105_dev &amp;amp; dev instead of dm1105dvb&lt;br /&gt;
        V4L/DVB: dm1105: use macro for read/write registers&lt;br /&gt;
  &lt;br /&gt;
  JD Louw (1):&lt;br /&gt;
        V4L/DVB: Compro S350 GPIO change&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/common/tuners/tuner-xc2028.c  |   11 +-&lt;br /&gt;
   drivers/media/dvb/dm1105/Kconfig            |    1 +&lt;br /&gt;
   drivers/media/dvb/dm1105/dm1105.c           |  501 ++++++++++++++-------------&lt;br /&gt;
   drivers/media/video/cx18/Kconfig            |   11 +&lt;br /&gt;
   drivers/media/video/cx18/Makefile           |    2 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-main.c   |  293 ++++++++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-mixer.c  |  191 ++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-mixer.h  |   23 ++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-pcm.c    |  353 +++++++++++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-pcm.h    |   27 ++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa.h        |   59 ++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-driver.c      |   40 ++-&lt;br /&gt;
   drivers/media/video/cx18/cx18-driver.h      |   10 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-fileops.c     |    6 +-&lt;br /&gt;
   drivers/media/video/cx18/cx18-fileops.h     |    3 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-mailbox.c     |   46 +++-&lt;br /&gt;
   drivers/media/video/cx18/cx18-streams.c     |    2 +&lt;br /&gt;
   drivers/media/video/cx25840/cx25840-core.c  |   48 ++-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-irq.c         |    5 +-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-streams.c     |    6 +-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-udma.c        |    1 +&lt;br /&gt;
   drivers/media/video/pvrusb2/pvrusb2-hdw.c   |    1 +&lt;br /&gt;
   drivers/media/video/saa7134/saa7134-cards.c |    4 +-&lt;br /&gt;
   include/media/v4l2-subdev.h                 |    1 +&lt;br /&gt;
   24 files changed, 1380 insertions(+), 265 deletions(-)&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-main.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-mixer.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-mixer.h&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-pcm.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-pcm.h&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa.h&lt;br /&gt;
&lt;br /&gt;
This helps to identify what's expected to be found at the -git tree and to double check if the merge happened fine.&lt;br /&gt;
&lt;br /&gt;
====Tags that a patch receive after its submission====&lt;br /&gt;
&lt;br /&gt;
This is probably the most complex issue to solve.&lt;br /&gt;
&lt;br /&gt;
Signed-off-by/Acked-by/Tested-by/Nacked-by tags may be received after a patch or a -git submission. This can happen even while the patch is being tested at linux-next, from people reporting problems on the existing patches, or reporting that a patch worked fine.&lt;br /&gt;
&lt;br /&gt;
Also, the driver maintainer and the subsystem maintainer that is committing those patches should sign each one, to indicate that he reviewed and has accepted the patch. &lt;br /&gt;
&lt;br /&gt;
Currently, if a new tag is added to a committed patch, its hash will change. There were some discussions at Linux Kernel Mailing List about allowing adding new tags on -git without changing the hash, but I think this weren't implemented (yet?).&lt;br /&gt;
&lt;br /&gt;
The same problem occurs with -hg, but, as -hg doesn't support multiple branches (well, it has a &amp;quot;branch&amp;quot; command, but the concept of branch there is different), it was opted that the -hg trees won't have all the needed SOBs. Instead, those would be added only at the submission tree.&lt;br /&gt;
&lt;br /&gt;
With -git, a better procedure can be used:&lt;br /&gt;
&lt;br /&gt;
The developer may have two separate branches on his tree. For example, let's assume that the developer has the following branches on his tree:&lt;br /&gt;
* media-master		(associated with &amp;quot;linuxtv&amp;quot; remote)&lt;br /&gt;
* fixes&lt;br /&gt;
* devel&lt;br /&gt;
&lt;br /&gt;
His development happens on devel branch. When the patches are ready to submission will be copied into a new for_submission branch:&lt;br /&gt;
	git branch for_submission devel&lt;br /&gt;
&lt;br /&gt;
And a pull request from the branch &amp;quot;for_submission&amp;quot; will be sent.&lt;br /&gt;
&lt;br /&gt;
Eventually, he'll write new patches on his devel branch.&lt;br /&gt;
&lt;br /&gt;
After merged, the developer updates the linuxtv remote and drops the for_submission branch. This way, &amp;quot;media-master&amp;quot; will contain his patches that got a new hash, due to the maintainer's SOB. However, he has some new patches on his devel, that applies over the old hashes.&lt;br /&gt;
&lt;br /&gt;
Fortunately, git has a special command to automatically remove the old objects: git rebase.&lt;br /&gt;
&lt;br /&gt;
All the developer needs to do is to run the commands bellow:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!git command&lt;br /&gt;
!notes&lt;br /&gt;
|-&lt;br /&gt;
| git remote update || to update his remotes, including &amp;quot;linuxtv&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| git checkout devel || move to devel branch&lt;br /&gt;
|-&lt;br /&gt;
| git pull . media-master || to make a recursive merge from v4l/dvb upstream&lt;br /&gt;
|-&lt;br /&gt;
| git rebase media-master || to remove the legacy hashes&lt;br /&gt;
|}&lt;br /&gt;
After this, his development branch will contain only upstream patches + the new ones he added after sending the patches for upstream submission.&lt;br /&gt;
&lt;br /&gt;
==Patches submitted via email==&lt;br /&gt;
&lt;br /&gt;
All valid patches submitted via email to [[mailto:linux-media@vger.kernel.org Linux Media ML]] are automatically stored at [[http://patchwork.kernel.org/project/linux-media/list/ Kernel Patchwork]]. A patch, to be valid, should be in diff unified format. If you're using a -git tree, the simplest way to generate unified diff patches is to run:&lt;br /&gt;
  git diff&lt;br /&gt;
&lt;br /&gt;
If you're writing several patches, the better is to create a tag or a branch for the changes you're working. After that, you can use&lt;br /&gt;
   git format-patch &amp;lt;origin_branch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to create the patches for email submission.&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
Suppose that the -git tree were created with:&lt;br /&gt;
&lt;br /&gt;
  git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git v4l-dvb&lt;br /&gt;
  cd v4l-dvb&lt;br /&gt;
  git remote add linuxtv git://linuxtv.org/v4l-dvb.git&lt;br /&gt;
  git remote update&lt;br /&gt;
  git checkout -b media-master linuxtv/master&lt;br /&gt;
    &lt;br /&gt;
Before start working, you need to create your work branch:&lt;br /&gt;
&lt;br /&gt;
  git branch work media-master&lt;br /&gt;
&lt;br /&gt;
And move the working copy to the &amp;quot;work&amp;quot; branch:&lt;br /&gt;
&lt;br /&gt;
  git checkout work&lt;br /&gt;
&lt;br /&gt;
Some changes were done at the driver and saved by commit:&lt;br /&gt;
&lt;br /&gt;
  git commit -as&lt;br /&gt;
&lt;br /&gt;
When the patches are ready for submission via email, all that is needed is to run:&lt;br /&gt;
&lt;br /&gt;
  git format-patch work&lt;br /&gt;
&lt;br /&gt;
The command will create a series of emails bodies, one file per email.&lt;br /&gt;
&lt;br /&gt;
Just send the email with the patch inlined for it to ge caught by patchwork.&lt;br /&gt;
&lt;br /&gt;
   BE CAREFUL: several emailers including Thunderdird breaks long lines, causing patch corruption.&lt;br /&gt;
   In the specific case of Thunderbird, an extension is needed to send the patches:  [https://hg.mozilla.org/users/clarkbw_gnome.org/asalted-patches/| Asalted Patches].&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Maintaining_Git_trees</id>
		<title>Maintaining Git trees</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Maintaining_Git_trees"/>
				<updated>2010-01-29T22:32:28Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== KERNEL DEVELOPMENT PROCEDURES AT THE KERNEL UPSTREAM ==&lt;br /&gt;
&lt;br /&gt;
It is important that people understand how upstream development works.&lt;br /&gt;
&lt;br /&gt;
Kernel development has 2 phases:&lt;br /&gt;
&lt;br /&gt;
*1) a merge window typically with 2 weeks (although Linus is gave some indications that he may reduce it on 2.6.34), starting with the release of a new kernel version;&lt;br /&gt;
&lt;br /&gt;
*2) the -rc period, where the Kernel is tested and receive fixes.&lt;br /&gt;
&lt;br /&gt;
The length of the -rc period depends on the number and relevance of the fixes. Considering the recent history, it ranges from -rc6 to -rc8, where each -rc takes one week.&lt;br /&gt;
&lt;br /&gt;
Those are the latest -rc kernels since 2.6.12:&lt;br /&gt;
{|  border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!kernel !!latest -rc version&lt;br /&gt;
|-&lt;br /&gt;
|2.6.12 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.13 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.14 ||align=&amp;quot;center&amp;quot; | rc5&lt;br /&gt;
|-&lt;br /&gt;
|2.6.15 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.16 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.17 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.18 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.19 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.20 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.21 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.22 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.23 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.24 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.25 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.26 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.27 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.28 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.29 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.30 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.31 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.32 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, the announcement of a new -rc kernel gives some hints when that -rc kernel may be the last one.&lt;br /&gt;
&lt;br /&gt;
====Subsystem procedures for merging patches upstream====&lt;br /&gt;
&lt;br /&gt;
The required procedure on subsystem trees is that:&lt;br /&gt;
&lt;br /&gt;
a) During -rc period (e.g. latest main kernel available is 2.6.x, the latest -rc kernel is 2.6.[x+1]-rc&amp;lt;y&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* fix patches for the -rc kernel (2.6.[x+1]) should be sent upstream, being a good idea to send them for some time at linux-next tree, allowing other people to test it, and check for potential conflicts with the other arch's;&lt;br /&gt;
* patches for 2.6.[x+2] should be sent to linux-next.&lt;br /&gt;
&lt;br /&gt;
b) the release of 2.6.[x+1] kernel:&lt;br /&gt;
&lt;br /&gt;
* closes the -rc period and starts the merge window.&lt;br /&gt;
&lt;br /&gt;
c) During the merge window:&lt;br /&gt;
&lt;br /&gt;
* the patch that were added on linux-next during the -rc period for 2.6.[x+2] should be sent upstream;&lt;br /&gt;
* new non-fix patches should be hold until the next -rc period starts, so, they'll be added on 2.6.[x+3];&lt;br /&gt;
* fix patches for 2.6.[x+2] should go to linux-next, wait for a few days and then send upstream.&lt;br /&gt;
&lt;br /&gt;
d) the release of 2.6.[x+2]-rc1 kernel:&lt;br /&gt;
&lt;br /&gt;
* the merge window has closed. No new features are allowed.&lt;br /&gt;
* the patches with new features that arrived during the merge window will be moved to linux-next&lt;br /&gt;
&lt;br /&gt;
====A practical example====&lt;br /&gt;
&lt;br /&gt;
Considering that, at the time this document were written, the last main release is 2.6.32, and the latest -rc release is 2.6.33-rc5, this means that:&lt;br /&gt;
&lt;br /&gt;
* Stable patches, after adding upstream, are being received for 2.6.32 kernel series;&lt;br /&gt;
* Bug fixes are being received for kernel 2.6.33;&lt;br /&gt;
* New feature patches are being received for kernel 2.6.34.&lt;br /&gt;
&lt;br /&gt;
After the release of kernel 2.6.33, starts the period for receiving patches for 2.6.35.&lt;br /&gt;
&lt;br /&gt;
In other words, the features being developed are always meant to be included on the next 2 kernels.&lt;br /&gt;
&lt;br /&gt;
In the specific case of new drivers that don't touch on existing features, it could be possible to send it during the -rc period, but it is safer to assume that those drivers should follow the above procedure, as a later submission may be nacked.&lt;br /&gt;
&lt;br /&gt;
====Patches for stable====&lt;br /&gt;
&lt;br /&gt;
Sometimes, a fix patch corrects a problem that happens also on stable kernels (e. g. on kernel 2.6.x or even 2.6.y, where y &amp;lt; x). In this case, the patch should be sent to stable@kernel.org, in order to be added on stable kernels.&lt;br /&gt;
&lt;br /&gt;
In the case of git-submitted patches with fixes, that also need to be send to stable, all the developer needs to do is to add, a the patch description:&lt;br /&gt;
  CC: stable.kernel.org&lt;br /&gt;
&lt;br /&gt;
At the moment the patch reaches upstream, a copy of the patch will be automatically be sent to the stable maintainer and will be considered for inclusion on the next stable kernel (2.6.x.y).&lt;br /&gt;
&lt;br /&gt;
== KERNEL DEVELOPMENT PROCEDURES FOR V4L/DVB ==&lt;br /&gt;
&lt;br /&gt;
The upsteam procedures should be followed by every kernel subsystem. The subsystems have their own specific procedures detailing how the development patches are handled before arriving upstream. In the case of v4l/dvb, those are the used procedures.&lt;br /&gt;
&lt;br /&gt;
==== Fixes and linux-next patches====&lt;br /&gt;
&lt;br /&gt;
One of the big problems of our model used in the past by the subsystem, based on one Mercurial tree, is that there were just one tree/branch for everything. This makes hard to send some fix patches for 2.6.[x+1], as they may have conflicts with the patches for 2.6.[x+2]. So, when the conflict is simple to solve, the patch is sent as fixes. Otherwise, the patch generally needed to hold to the next cycle. &lt;br /&gt;
The fix patches used to get a special tag, added by the developer (&amp;quot;Priority: high&amp;quot;, in the body of the description), to give a hint to the subsystem maintainer that the patch should be sent upstream.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, sometimes people mark the driver with the wrong tag. For example, a patch got merged on Jan, 22 2010 that marked with &amp;quot;high&amp;quot;. However, that patch didn't apply at the fixes tree, because it fix a regression introduced by a driver that weren't merged upstream yet.&lt;br /&gt;
&lt;br /&gt;
====== How to solve those issues? ======&lt;br /&gt;
&lt;br /&gt;
Well, basically, the subsystem should work with more than one tree (or branch), on upstream submission:&lt;br /&gt;
* a tree(branch) with the fix patches;&lt;br /&gt;
* a tree(branch) with the new feature patches.&lt;br /&gt;
&lt;br /&gt;
So, the subsystem uses two development -git trees:&lt;br /&gt;
* http://linuxtv.org/git//v4l-dvb.git	- for patches that will be sent to the [x+2] kernel (and merged at upstream linux-next tree)&lt;br /&gt;
* http://linuxtv.org/git//fixes.git	- for bug patches that will be sent to the [x+1] kernel (also, patches that need to go to both [x+1] and [x])&lt;br /&gt;
	&lt;br /&gt;
While the patches via -hg, due to the merge conflicts its mentioned, the better is that, even those developers that prefer to develop patches use the old way, to send the fix patches via -git. This way, if is there a conflict, he is the one that can better solve it. Also, it avoids the risk of a patch being wrongly tagged.&lt;br /&gt;
&lt;br /&gt;
Also, after having a patch added on one of the above trees, it can't simply remove it, as others will be cloning that tree. So, the only option would be to send a revert patch, causing the patch history to be dirty and could be resulting on some troubles when submitting upstream. I've seen some nacks on receiving patches upstream from dirty git trees. So, we should really avoid this.&lt;br /&gt;
&lt;br /&gt;
==how to submit a -git pull request==&lt;br /&gt;
&lt;br /&gt;
As the same git tree may have more than one branch, and we'll have 2 -git trees for upstream, it is required that people specify what should be done. The internal maintainer's workflow is based on different mail queues for each type of requesting received. &lt;br /&gt;
&lt;br /&gt;
There are some scripts to automate the process, so it is important that everyone that sends -git pull do it at the same way.&lt;br /&gt;
&lt;br /&gt;
So, a pull request to be send with the following email tags:&lt;br /&gt;
&lt;br /&gt;
  From: &amp;lt;your real email&amp;gt;&lt;br /&gt;
  Subject: [GIT FIXES FOR 2.6.33] Fixes for driver cx88&lt;br /&gt;
  To: linux-media@vger.kernel.org&lt;br /&gt;
&lt;br /&gt;
  From: &amp;lt;your real email&amp;gt;&lt;br /&gt;
  Subject: [GIT PATCHES FOR 2.6.34] Updates for the driver saa7134&lt;br /&gt;
  To: linux-media@vger.kernel.org&lt;br /&gt;
&lt;br /&gt;
The from line may later be used by the git mailbomb script to send you a copy when the patch were committed, so it should be your real email.&lt;br /&gt;
&lt;br /&gt;
The indication between [] on the subject will be handled by the mailer scripts to put the request at the right queue. So, if tagged wrong, it may not be committed.&lt;br /&gt;
&lt;br /&gt;
Don't send a copy of the pull to the maintainer addresses. The pull will be filtering based on the subject and on the mailing list. If you send a c/c to the maintainer, it will be simply discarded.&lt;br /&gt;
&lt;br /&gt;
NEVER send a copy of any pull request to a subscribers-only mailing list. Everyone is free to answer to the email, reviewing your patches. Don't penalty people that wants to contribute with you with SPAM bouncing emails, produced by subscribers only lists.&lt;br /&gt;
&lt;br /&gt;
When a patch touches on other subsystem codes, please copy the other subsystem maintainers. This is important for patches that touches on arch files, and also for -alsa non-trivial patches.&lt;br /&gt;
&lt;br /&gt;
The email should be generated with the usage of git request-pull:&lt;br /&gt;
       git request-pull $ORIGIN $URL&lt;br /&gt;
&lt;br /&gt;
where $ORIGIN is the commit hash of the tree before your patches, and $URL is the URL for your repository.&lt;br /&gt;
&lt;br /&gt;
For example, for the patches merged directly from -hg at the -git trees on Jan, 22 2010, the above commands produced:&lt;br /&gt;
&lt;br /&gt;
  The following changes since commit 2f52713ab3cb9af2eb0f9354dba1421d1497f3e7:&lt;br /&gt;
    Abylay Ospan (1):&lt;br /&gt;
          V4L/DVB: 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card. 22kHz logic controlled by demod&lt;br /&gt;
  &lt;br /&gt;
  are available in the git repository at:&lt;br /&gt;
  &lt;br /&gt;
    git://linuxtv.org/v4l-dvb.git master&lt;br /&gt;
  &lt;br /&gt;
  Andy Walls (4):&lt;br /&gt;
        V4L/DVB: cx25840, v4l2-subdev, ivtv, pvrusb2: Fix ivtv/cx25840 tinny audio&lt;br /&gt;
        V4L/DVB: ivtv: Adjust msleep() delays used to prevent tinny audio and PCI bus hang&lt;br /&gt;
        V4L/DVB: cx18-alsa: Initial non-working cx18-alsa files&lt;br /&gt;
        V4L/DVB: cx18-alsa: Add non-working cx18-alsa-pcm.[ch] files to avoid data loss&lt;br /&gt;
  &lt;br /&gt;
  Devin Heitmueller (20):&lt;br /&gt;
        V4L/DVB: xc3028: fix regression in firmware loading time&lt;br /&gt;
        V4L/DVB: cx18: rename cx18-alsa.c&lt;br /&gt;
        V4L/DVB: cx18: make it so cx18-alsa-main.c compiles&lt;br /&gt;
        V4L/DVB: cx18: export a couple of symbols so they can be shared with cx18-alsa&lt;br /&gt;
        V4L/DVB: cx18: overhaul ALSA PCM device handling so it works&lt;br /&gt;
        V4L/DVB: cx18: add cx18-alsa module to Makefile&lt;br /&gt;
        V4L/DVB: cx18: export more symbols required by cx18-alsa&lt;br /&gt;
        V4L/DVB: cx18-alsa: remove unneeded debug line&lt;br /&gt;
        V4L/DVB: cx18: rework cx18-alsa module loading to support automatic loading&lt;br /&gt;
        V4L/DVB: cx18: cleanup cx18-alsa debug logging&lt;br /&gt;
        V4L/DVB: cx18-alsa: name alsa device after the actual card&lt;br /&gt;
        V4L/DVB: cx18-alsa: remove a couple of warnings&lt;br /&gt;
        V4L/DVB: cx18-alsa: fix memory leak in error condition&lt;br /&gt;
        V4L/DVB: cx18-alsa: fix codingstyle issue&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle fixes&lt;br /&gt;
        V4L/DVB: cx18: codingstyle fixes&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle cleanup&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle cleanup&lt;br /&gt;
        V4L/DVB: cx18: address possible passing of NULL to snd_card_free&lt;br /&gt;
        V4L/DVB: cx18-alsa: Fix the rates definition and move some buffer freeing code.&lt;br /&gt;
  &lt;br /&gt;
  Ian Armstrong (1):&lt;br /&gt;
        V4L/DVB: ivtv: Fix race condition for queued udma transfers&lt;br /&gt;
  &lt;br /&gt;
  Igor M. Liplianin (4):&lt;br /&gt;
        V4L/DVB: Add Support for DVBWorld DVB-S2 PCI 2004D card&lt;br /&gt;
        V4L/DVB: dm1105: connect splitted else-if statements&lt;br /&gt;
        V4L/DVB: dm1105: use dm1105_dev &amp;amp; dev instead of dm1105dvb&lt;br /&gt;
        V4L/DVB: dm1105: use macro for read/write registers&lt;br /&gt;
  &lt;br /&gt;
  JD Louw (1):&lt;br /&gt;
        V4L/DVB: Compro S350 GPIO change&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/common/tuners/tuner-xc2028.c  |   11 +-&lt;br /&gt;
   drivers/media/dvb/dm1105/Kconfig            |    1 +&lt;br /&gt;
   drivers/media/dvb/dm1105/dm1105.c           |  501 ++++++++++++++-------------&lt;br /&gt;
   drivers/media/video/cx18/Kconfig            |   11 +&lt;br /&gt;
   drivers/media/video/cx18/Makefile           |    2 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-main.c   |  293 ++++++++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-mixer.c  |  191 ++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-mixer.h  |   23 ++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-pcm.c    |  353 +++++++++++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-pcm.h    |   27 ++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa.h        |   59 ++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-driver.c      |   40 ++-&lt;br /&gt;
   drivers/media/video/cx18/cx18-driver.h      |   10 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-fileops.c     |    6 +-&lt;br /&gt;
   drivers/media/video/cx18/cx18-fileops.h     |    3 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-mailbox.c     |   46 +++-&lt;br /&gt;
   drivers/media/video/cx18/cx18-streams.c     |    2 +&lt;br /&gt;
   drivers/media/video/cx25840/cx25840-core.c  |   48 ++-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-irq.c         |    5 +-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-streams.c     |    6 +-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-udma.c        |    1 +&lt;br /&gt;
   drivers/media/video/pvrusb2/pvrusb2-hdw.c   |    1 +&lt;br /&gt;
   drivers/media/video/saa7134/saa7134-cards.c |    4 +-&lt;br /&gt;
   include/media/v4l2-subdev.h                 |    1 +&lt;br /&gt;
   24 files changed, 1380 insertions(+), 265 deletions(-)&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-main.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-mixer.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-mixer.h&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-pcm.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-pcm.h&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa.h&lt;br /&gt;
&lt;br /&gt;
This helps to identify what's expected to be found at the -git tree and to double check if the merge happened fine.&lt;br /&gt;
&lt;br /&gt;
====Tags that a patch receive after its submission====&lt;br /&gt;
&lt;br /&gt;
This is probably the most complex issue to solve.&lt;br /&gt;
&lt;br /&gt;
Signed-off-by/Acked-by/Tested-by/Nacked-by tags may be received after a patch or a -git submission. This can happen even while the patch is being tested at linux-next, from people reporting problems on the existing patches, or reporting that a patch worked fine.&lt;br /&gt;
&lt;br /&gt;
Also, the driver maintainer and the subsystem maintainer that is committing those patches should sign each one, to indicate that he reviewed and has accepted the patch. &lt;br /&gt;
&lt;br /&gt;
Currently, if a new tag is added to a committed patch, its hash will change. There were some discussions at Linux Kernel Mailing List about allowing adding new tags on -git without changing the hash, but I think this weren't implemented (yet?).&lt;br /&gt;
&lt;br /&gt;
The same problem occurs with -hg, but, as -hg doesn't support multiple branches (well, it has a &amp;quot;branch&amp;quot; command, but the concept of branch there is different), it was opted that the -hg trees won't have all the needed SOBs. Instead, those would be added only at the submission tree.&lt;br /&gt;
&lt;br /&gt;
With -git, a better procedure can be used:&lt;br /&gt;
&lt;br /&gt;
The developer may have two separate branches on his tree. For example, let's assume that the developer has the following branches on his tree:&lt;br /&gt;
* media-master		(associated with &amp;quot;linuxtv&amp;quot; remote)&lt;br /&gt;
* fixes&lt;br /&gt;
* devel&lt;br /&gt;
&lt;br /&gt;
His development happens on devel branch. When the patches are ready to submission will be copied into a new for_submission branch:&lt;br /&gt;
	git branch for_submission devel&lt;br /&gt;
&lt;br /&gt;
And a pull request from the branch &amp;quot;for_submission&amp;quot; will be sent.&lt;br /&gt;
&lt;br /&gt;
Eventually, he'll write new patches on his devel branch.&lt;br /&gt;
&lt;br /&gt;
After merged, the developer updates the linuxtv remote and drops the for_submission branch. This way, &amp;quot;media-master&amp;quot; will contain his patches that got a new hash, due to the maintainer's SOB. However, he has some new patches on his devel, that applies over the old hashes.&lt;br /&gt;
&lt;br /&gt;
Fortunately, git has a special command to automatically remove the old objects: git rebase.&lt;br /&gt;
&lt;br /&gt;
All the developer needs to do is to run the commands bellow:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!git command&lt;br /&gt;
!notes&lt;br /&gt;
|-&lt;br /&gt;
| git remote update || to update his remotes, including &amp;quot;linuxtv&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| git checkout devel || move to devel branch&lt;br /&gt;
|-&lt;br /&gt;
| git pull . media-master || to make a recursive merge from v4l/dvb upstream&lt;br /&gt;
|-&lt;br /&gt;
| git rebase media-master || to remove the legacy hashes&lt;br /&gt;
|}&lt;br /&gt;
After this, his development branch will contain only upstream patches + the new ones he added after sending the patches for upstream submission.&lt;br /&gt;
&lt;br /&gt;
==Patches submitted via email==&lt;br /&gt;
&lt;br /&gt;
All valid patches submitted via email to [[mailto:linux-media@vger.kernel.org Linux Media ML]] are automatically stored at [[http://patchwork.kernel.org/project/linux-media/list/ Kernel Patchwork]]. A patch, to be valid, should be in diff unified format. If you're using a -git tree, the simplest way to generate unified diff patches is to run:&lt;br /&gt;
  git diff&lt;br /&gt;
&lt;br /&gt;
If you're writing several patches, the better is to create a tag or a branch for the changes you're working. After that, you can use&lt;br /&gt;
   git format-patch &amp;lt;origin_branch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to create the patches for email submission.&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
Suppose that the -git tree were created with:&lt;br /&gt;
&lt;br /&gt;
  git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git v4l-dvb&lt;br /&gt;
  cd v4l-dvb&lt;br /&gt;
  git remote add linuxtv git://linuxtv.org/v4l-dvb.git&lt;br /&gt;
  git remote update&lt;br /&gt;
  git checkout -b media-master linuxtv/master&lt;br /&gt;
    &lt;br /&gt;
Before start working, you need to create your work branch:&lt;br /&gt;
&lt;br /&gt;
  git branch work media-master&lt;br /&gt;
&lt;br /&gt;
And move the working copy to the &amp;quot;work&amp;quot; branch:&lt;br /&gt;
&lt;br /&gt;
  git checkout work&lt;br /&gt;
&lt;br /&gt;
Some changes were done at the driver and saved by commit:&lt;br /&gt;
&lt;br /&gt;
  git commit -as&lt;br /&gt;
&lt;br /&gt;
When the patches are ready for submission via email, all that is needed is to run:&lt;br /&gt;
&lt;br /&gt;
  git format-patch work&lt;br /&gt;
&lt;br /&gt;
The command will create a series of emails bodies, one file per email.&lt;br /&gt;
&lt;br /&gt;
Just send the email with the patch inlined for it to ge caught by patchwork.&lt;br /&gt;
&lt;br /&gt;
   BE CAREFUL: several emailers including Thunderdird breaks long lines, causing patch corruption.&lt;br /&gt;
&lt;br /&gt;
In the specific case of Thunderbird, an extension is needed to send the patches:  [https://hg.mozilla.org/users/clarkbw_gnome.org/asalted-patches/| Asalted Patches].&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Maintaining_Git_trees</id>
		<title>Maintaining Git trees</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Maintaining_Git_trees"/>
				<updated>2010-01-29T22:32:00Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Patches submitted via email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== KERNEL DEVELOPMENT PROCEDURES AT THE KERNEL UPSTREAM ==&lt;br /&gt;
&lt;br /&gt;
It is important that people understand how upstream development works.&lt;br /&gt;
&lt;br /&gt;
Kernel development has 2 phases:&lt;br /&gt;
&lt;br /&gt;
*1) a merge window typically with 2 weeks (although Linus is gave some indications that he may reduce it on 2.6.34), starting with the release of a new kernel version;&lt;br /&gt;
&lt;br /&gt;
*2) the -rc period, where the Kernel is tested and receive fixes.&lt;br /&gt;
&lt;br /&gt;
The length of the -rc period depends on the number and relevance of the fixes. Considering the recent history, it ranges from -rc6 to -rc8, where each -rc takes one week.&lt;br /&gt;
&lt;br /&gt;
Those are the latest -rc kernels since 2.6.12:&lt;br /&gt;
{|  border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!kernel !!latest -rc version&lt;br /&gt;
|-&lt;br /&gt;
|2.6.12 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.13 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.14 ||align=&amp;quot;center&amp;quot; | rc5&lt;br /&gt;
|-&lt;br /&gt;
|2.6.15 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.16 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.17 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.18 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.19 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.20 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.21 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.22 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.23 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.24 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.25 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.26 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.27 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.28 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.29 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.30 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.31 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.32 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, the announcement of a new -rc kernel gives some hints when that -rc kernel may be the last one.&lt;br /&gt;
&lt;br /&gt;
====Subsystem procedures for merging patches upstream====&lt;br /&gt;
&lt;br /&gt;
The required procedure on subsystem trees is that:&lt;br /&gt;
&lt;br /&gt;
a) During -rc period (e.g. latest main kernel available is 2.6.x, the latest -rc kernel is 2.6.[x+1]-rc&amp;lt;y&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* fix patches for the -rc kernel (2.6.[x+1]) should be sent upstream, being a good idea to send them for some time at linux-next tree, allowing other people to test it, and check for potential conflicts with the other arch's;&lt;br /&gt;
* patches for 2.6.[x+2] should be sent to linux-next.&lt;br /&gt;
&lt;br /&gt;
b) the release of 2.6.[x+1] kernel:&lt;br /&gt;
&lt;br /&gt;
* closes the -rc period and starts the merge window.&lt;br /&gt;
&lt;br /&gt;
c) During the merge window:&lt;br /&gt;
&lt;br /&gt;
* the patch that were added on linux-next during the -rc period for 2.6.[x+2] should be sent upstream;&lt;br /&gt;
* new non-fix patches should be hold until the next -rc period starts, so, they'll be added on 2.6.[x+3];&lt;br /&gt;
* fix patches for 2.6.[x+2] should go to linux-next, wait for a few days and then send upstream.&lt;br /&gt;
&lt;br /&gt;
d) the release of 2.6.[x+2]-rc1 kernel:&lt;br /&gt;
&lt;br /&gt;
* the merge window has closed. No new features are allowed.&lt;br /&gt;
* the patches with new features that arrived during the merge window will be moved to linux-next&lt;br /&gt;
&lt;br /&gt;
====A practical example====&lt;br /&gt;
&lt;br /&gt;
Considering that, at the time this document were written, the last main release is 2.6.32, and the latest -rc release is 2.6.33-rc5, this means that:&lt;br /&gt;
&lt;br /&gt;
* Stable patches, after adding upstream, are being received for 2.6.32 kernel series;&lt;br /&gt;
* Bug fixes are being received for kernel 2.6.33;&lt;br /&gt;
* New feature patches are being received for kernel 2.6.34.&lt;br /&gt;
&lt;br /&gt;
After the release of kernel 2.6.33, starts the period for receiving patches for 2.6.35.&lt;br /&gt;
&lt;br /&gt;
In other words, the features being developed are always meant to be included on the next 2 kernels.&lt;br /&gt;
&lt;br /&gt;
In the specific case of new drivers that don't touch on existing features, it could be possible to send it during the -rc period, but it is safer to assume that those drivers should follow the above procedure, as a later submission may be nacked.&lt;br /&gt;
&lt;br /&gt;
====Patches for stable====&lt;br /&gt;
&lt;br /&gt;
Sometimes, a fix patch corrects a problem that happens also on stable kernels (e. g. on kernel 2.6.x or even 2.6.y, where y &amp;lt; x). In this case, the patch should be sent to stable@kernel.org, in order to be added on stable kernels.&lt;br /&gt;
&lt;br /&gt;
In the case of git-submitted patches with fixes, that also need to be send to stable, all the developer needs to do is to add, a the patch description:&lt;br /&gt;
  CC: stable.kernel.org&lt;br /&gt;
&lt;br /&gt;
At the moment the patch reaches upstream, a copy of the patch will be automatically be sent to the stable maintainer and will be considered for inclusion on the next stable kernel (2.6.x.y).&lt;br /&gt;
&lt;br /&gt;
== KERNEL DEVELOPMENT PROCEDURES FOR V4L/DVB ==&lt;br /&gt;
&lt;br /&gt;
The upsteam procedures should be followed by every kernel subsystem. The subsystems have their own specific procedures detailing how the development patches are handled before arriving upstream. In the case of v4l/dvb, those are the used procedures.&lt;br /&gt;
&lt;br /&gt;
==== Fixes and linux-next patches====&lt;br /&gt;
&lt;br /&gt;
One of the big problems of our model used in the past by the subsystem, based on one Mercurial tree, is that there were just one tree/branch for everything. This makes hard to send some fix patches for 2.6.[x+1], as they may have conflicts with the patches for 2.6.[x+2]. So, when the conflict is simple to solve, the patch is sent as fixes. Otherwise, the patch generally needed to hold to the next cycle. &lt;br /&gt;
The fix patches used to get a special tag, added by the developer (&amp;quot;Priority: high&amp;quot;, in the body of the description), to give a hint to the subsystem maintainer that the patch should be sent upstream.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, sometimes people mark the driver with the wrong tag. For example, a patch got merged on Jan, 22 2010 that marked with &amp;quot;high&amp;quot;. However, that patch didn't apply at the fixes tree, because it fix a regression introduced by a driver that weren't merged upstream yet.&lt;br /&gt;
&lt;br /&gt;
====== How to solve those issues? ======&lt;br /&gt;
&lt;br /&gt;
Well, basically, the subsystem should work with more than one tree (or branch), on upstream submission:&lt;br /&gt;
* a tree(branch) with the fix patches;&lt;br /&gt;
* a tree(branch) with the new feature patches.&lt;br /&gt;
&lt;br /&gt;
So, the subsystem uses two development -git trees:&lt;br /&gt;
* http://linuxtv.org/git//v4l-dvb.git	- for patches that will be sent to the [x+2] kernel (and merged at upstream linux-next tree)&lt;br /&gt;
* http://linuxtv.org/git//fixes.git	- for bug patches that will be sent to the [x+1] kernel (also, patches that need to go to both [x+1] and [x])&lt;br /&gt;
	&lt;br /&gt;
While the patches via -hg, due to the merge conflicts its mentioned, the better is that, even those developers that prefer to develop patches use the old way, to send the fix patches via -git. This way, if is there a conflict, he is the one that can better solve it. Also, it avoids the risk of a patch being wrongly tagged.&lt;br /&gt;
&lt;br /&gt;
Also, after having a patch added on one of the above trees, it can't simply remove it, as others will be cloning that tree. So, the only option would be to send a revert patch, causing the patch history to be dirty and could be resulting on some troubles when submitting upstream. I've seen some nacks on receiving patches upstream from dirty git trees. So, we should really avoid this.&lt;br /&gt;
&lt;br /&gt;
==how to submit a -git pull request==&lt;br /&gt;
&lt;br /&gt;
As the same git tree may have more than one branch, and we'll have 2 -git trees for upstream, it is required that people specify what should be done. The internal maintainer's workflow is based on different mail queues for each type of requesting received. &lt;br /&gt;
&lt;br /&gt;
There are some scripts to automate the process, so it is important that everyone that sends -git pull do it at the same way.&lt;br /&gt;
&lt;br /&gt;
So, a pull request to be send with the following email tags:&lt;br /&gt;
&lt;br /&gt;
  From: &amp;lt;your real email&amp;gt;&lt;br /&gt;
  Subject: [GIT FIXES FOR 2.6.33] Fixes for driver cx88&lt;br /&gt;
  To: linux-media@vger.kernel.org&lt;br /&gt;
&lt;br /&gt;
  From: &amp;lt;your real email&amp;gt;&lt;br /&gt;
  Subject: [GIT PATCHES FOR 2.6.34] Updates for the driver saa7134&lt;br /&gt;
  To: linux-media@vger.kernel.org&lt;br /&gt;
&lt;br /&gt;
The from line may later be used by the git mailbomb script to send you a copy when the patch were committed, so it should be your real email.&lt;br /&gt;
&lt;br /&gt;
The indication between [] on the subject will be handled by the mailer scripts to put the request at the right queue. So, if tagged wrong, it may not be committed.&lt;br /&gt;
&lt;br /&gt;
Don't send a copy of the pull to the maintainer addresses. The pull will be filtering based on the subject and on the mailing list. If you send a c/c to the maintainer, it will be simply discarded.&lt;br /&gt;
&lt;br /&gt;
NEVER send a copy of any pull request to a subscribers-only mailing list. Everyone is free to answer to the email, reviewing your patches. Don't penalty people that wants to contribute with you with SPAM bouncing emails, produced by subscribers only lists.&lt;br /&gt;
&lt;br /&gt;
When a patch touches on other subsystem codes, please copy the other subsystem maintainers. This is important for patches that touches on arch files, and also for -alsa non-trivial patches.&lt;br /&gt;
&lt;br /&gt;
The email should be generated with the usage of git request-pull:&lt;br /&gt;
       git request-pull $ORIGIN $URL&lt;br /&gt;
&lt;br /&gt;
where $ORIGIN is the commit hash of the tree before your patches, and $URL is the URL for your repository.&lt;br /&gt;
&lt;br /&gt;
For example, for the patches merged directly from -hg at the -git trees on Jan, 22 2010, the above commands produced:&lt;br /&gt;
&lt;br /&gt;
  The following changes since commit 2f52713ab3cb9af2eb0f9354dba1421d1497f3e7:&lt;br /&gt;
    Abylay Ospan (1):&lt;br /&gt;
          V4L/DVB: 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card. 22kHz logic controlled by demod&lt;br /&gt;
  &lt;br /&gt;
  are available in the git repository at:&lt;br /&gt;
  &lt;br /&gt;
    git://linuxtv.org/v4l-dvb.git master&lt;br /&gt;
  &lt;br /&gt;
  Andy Walls (4):&lt;br /&gt;
        V4L/DVB: cx25840, v4l2-subdev, ivtv, pvrusb2: Fix ivtv/cx25840 tinny audio&lt;br /&gt;
        V4L/DVB: ivtv: Adjust msleep() delays used to prevent tinny audio and PCI bus hang&lt;br /&gt;
        V4L/DVB: cx18-alsa: Initial non-working cx18-alsa files&lt;br /&gt;
        V4L/DVB: cx18-alsa: Add non-working cx18-alsa-pcm.[ch] files to avoid data loss&lt;br /&gt;
  &lt;br /&gt;
  Devin Heitmueller (20):&lt;br /&gt;
        V4L/DVB: xc3028: fix regression in firmware loading time&lt;br /&gt;
        V4L/DVB: cx18: rename cx18-alsa.c&lt;br /&gt;
        V4L/DVB: cx18: make it so cx18-alsa-main.c compiles&lt;br /&gt;
        V4L/DVB: cx18: export a couple of symbols so they can be shared with cx18-alsa&lt;br /&gt;
        V4L/DVB: cx18: overhaul ALSA PCM device handling so it works&lt;br /&gt;
        V4L/DVB: cx18: add cx18-alsa module to Makefile&lt;br /&gt;
        V4L/DVB: cx18: export more symbols required by cx18-alsa&lt;br /&gt;
        V4L/DVB: cx18-alsa: remove unneeded debug line&lt;br /&gt;
        V4L/DVB: cx18: rework cx18-alsa module loading to support automatic loading&lt;br /&gt;
        V4L/DVB: cx18: cleanup cx18-alsa debug logging&lt;br /&gt;
        V4L/DVB: cx18-alsa: name alsa device after the actual card&lt;br /&gt;
        V4L/DVB: cx18-alsa: remove a couple of warnings&lt;br /&gt;
        V4L/DVB: cx18-alsa: fix memory leak in error condition&lt;br /&gt;
        V4L/DVB: cx18-alsa: fix codingstyle issue&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle fixes&lt;br /&gt;
        V4L/DVB: cx18: codingstyle fixes&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle cleanup&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle cleanup&lt;br /&gt;
        V4L/DVB: cx18: address possible passing of NULL to snd_card_free&lt;br /&gt;
        V4L/DVB: cx18-alsa: Fix the rates definition and move some buffer freeing code.&lt;br /&gt;
  &lt;br /&gt;
  Ian Armstrong (1):&lt;br /&gt;
        V4L/DVB: ivtv: Fix race condition for queued udma transfers&lt;br /&gt;
  &lt;br /&gt;
  Igor M. Liplianin (4):&lt;br /&gt;
        V4L/DVB: Add Support for DVBWorld DVB-S2 PCI 2004D card&lt;br /&gt;
        V4L/DVB: dm1105: connect splitted else-if statements&lt;br /&gt;
        V4L/DVB: dm1105: use dm1105_dev &amp;amp; dev instead of dm1105dvb&lt;br /&gt;
        V4L/DVB: dm1105: use macro for read/write registers&lt;br /&gt;
  &lt;br /&gt;
  JD Louw (1):&lt;br /&gt;
        V4L/DVB: Compro S350 GPIO change&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/common/tuners/tuner-xc2028.c  |   11 +-&lt;br /&gt;
   drivers/media/dvb/dm1105/Kconfig            |    1 +&lt;br /&gt;
   drivers/media/dvb/dm1105/dm1105.c           |  501 ++++++++++++++-------------&lt;br /&gt;
   drivers/media/video/cx18/Kconfig            |   11 +&lt;br /&gt;
   drivers/media/video/cx18/Makefile           |    2 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-main.c   |  293 ++++++++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-mixer.c  |  191 ++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-mixer.h  |   23 ++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-pcm.c    |  353 +++++++++++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-pcm.h    |   27 ++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa.h        |   59 ++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-driver.c      |   40 ++-&lt;br /&gt;
   drivers/media/video/cx18/cx18-driver.h      |   10 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-fileops.c     |    6 +-&lt;br /&gt;
   drivers/media/video/cx18/cx18-fileops.h     |    3 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-mailbox.c     |   46 +++-&lt;br /&gt;
   drivers/media/video/cx18/cx18-streams.c     |    2 +&lt;br /&gt;
   drivers/media/video/cx25840/cx25840-core.c  |   48 ++-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-irq.c         |    5 +-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-streams.c     |    6 +-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-udma.c        |    1 +&lt;br /&gt;
   drivers/media/video/pvrusb2/pvrusb2-hdw.c   |    1 +&lt;br /&gt;
   drivers/media/video/saa7134/saa7134-cards.c |    4 +-&lt;br /&gt;
   include/media/v4l2-subdev.h                 |    1 +&lt;br /&gt;
   24 files changed, 1380 insertions(+), 265 deletions(-)&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-main.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-mixer.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-mixer.h&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-pcm.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-pcm.h&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa.h&lt;br /&gt;
&lt;br /&gt;
This helps to identify what's expected to be found at the -git tree and to double check if the merge happened fine.&lt;br /&gt;
&lt;br /&gt;
====Tags that a patch receive after its submission====&lt;br /&gt;
&lt;br /&gt;
This is probably the most complex issue to solve.&lt;br /&gt;
&lt;br /&gt;
Signed-off-by/Acked-by/Tested-by/Nacked-by tags may be received after a patch or a -git submission. This can happen even while the patch is being tested at linux-next, from people reporting problems on the existing patches, or reporting that a patch worked fine.&lt;br /&gt;
&lt;br /&gt;
Also, the driver maintainer and the subsystem maintainer that is committing those patches should sign each one, to indicate that he reviewed and has accepted the patch. &lt;br /&gt;
&lt;br /&gt;
Currently, if a new tag is added to a committed patch, its hash will change. There were some discussions at Linux Kernel Mailing List about allowing adding new tags on -git without changing the hash, but I think this weren't implemented (yet?).&lt;br /&gt;
&lt;br /&gt;
The same problem occurs with -hg, but, as -hg doesn't support multiple branches (well, it has a &amp;quot;branch&amp;quot; command, but the concept of branch there is different), it was opted that the -hg trees won't have all the needed SOBs. Instead, those would be added only at the submission tree.&lt;br /&gt;
&lt;br /&gt;
With -git, a better procedure can be used:&lt;br /&gt;
&lt;br /&gt;
The developer may have two separate branches on his tree. For example, let's assume that the developer has the following branches on his tree:&lt;br /&gt;
* media-master		(associated with &amp;quot;linuxtv&amp;quot; remote)&lt;br /&gt;
* fixes&lt;br /&gt;
* devel&lt;br /&gt;
&lt;br /&gt;
His development happens on devel branch. When the patches are ready to submission will be copied into a new for_submission branch:&lt;br /&gt;
	git branch for_submission devel&lt;br /&gt;
&lt;br /&gt;
And a pull request from the branch &amp;quot;for_submission&amp;quot; will be sent.&lt;br /&gt;
&lt;br /&gt;
Eventually, he'll write new patches on his devel branch.&lt;br /&gt;
&lt;br /&gt;
After merged, the developer updates the linuxtv remote and drops the for_submission branch. This way, &amp;quot;media-master&amp;quot; will contain his patches that got a new hash, due to the maintainer's SOB. However, he has some new patches on his devel, that applies over the old hashes.&lt;br /&gt;
&lt;br /&gt;
Fortunately, git has a special command to automatically remove the old objects: git rebase.&lt;br /&gt;
&lt;br /&gt;
All the developer needs to do is to run the commands bellow:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!git command&lt;br /&gt;
!notes&lt;br /&gt;
|-&lt;br /&gt;
| git remote update || to update his remotes, including &amp;quot;linuxtv&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| git checkout devel || move to devel branch&lt;br /&gt;
|-&lt;br /&gt;
| git pull . media-master || to make a recursive merge from v4l/dvb upstream&lt;br /&gt;
|-&lt;br /&gt;
| git rebase media-master || to remove the legacy hashes&lt;br /&gt;
|}&lt;br /&gt;
After this, his development branch will contain only upstream patches + the new ones he added after sending the patches for upstream submission.&lt;br /&gt;
&lt;br /&gt;
==Patches submitted via email==&lt;br /&gt;
&lt;br /&gt;
All valid patches submitted via email to [[mailto:linux-media@vger.kernel.org Linux Media ML]] are automatically stored at [[http://patchwork.kernel.org/project/linux-media/list/ Kernel Patchwork]]. A patch, to be valid, should be in diff unified format. If you're using a -git tree, the simplest way to generate unified diff patches is to run:&lt;br /&gt;
  git diff&lt;br /&gt;
&lt;br /&gt;
If you're writing several patches, the better is to create a tag or a branch for the changes you're working. After that, you can use&lt;br /&gt;
   git format-patch &amp;lt;origin_branch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to create the patches for email submission.&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
Suppose that the -git tree were created with:&lt;br /&gt;
&lt;br /&gt;
  git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git v4l-dvb&lt;br /&gt;
  cd v4l-dvb&lt;br /&gt;
  git remote add linuxtv git://linuxtv.org/v4l-dvb.git&lt;br /&gt;
  git remote update&lt;br /&gt;
  git checkout -b media-master linuxtv/master&lt;br /&gt;
    &lt;br /&gt;
Before start working, you need to create your work branch:&lt;br /&gt;
&lt;br /&gt;
  git branch work media-master&lt;br /&gt;
&lt;br /&gt;
And move the working copy to the &amp;quot;work&amp;quot; branch:&lt;br /&gt;
&lt;br /&gt;
  git checkout work&lt;br /&gt;
&lt;br /&gt;
Some changes were done at the driver and saved by commit:&lt;br /&gt;
&lt;br /&gt;
  git commit -as&lt;br /&gt;
&lt;br /&gt;
When the patches are ready for submission via email, all that is needed is to run:&lt;br /&gt;
&lt;br /&gt;
  git format-patch work&lt;br /&gt;
&lt;br /&gt;
The command will create a series of emails bodies, one file per email.&lt;br /&gt;
&lt;br /&gt;
Just send the email with the patch inlined for it to ge caught by patchwork.&lt;br /&gt;
&lt;br /&gt;
   BE CAREFULL: several emailers including Thunderdird breaks long lines, causing patch corruption.&lt;br /&gt;
&lt;br /&gt;
In the specific case of Thunderbird, an extension is needed to send the patches:  [https://hg.mozilla.org/users/clarkbw_gnome.org/asalted-patches/| Asalted Patches].&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	<entry>
		<id>http://linuxtv.org/wiki/index.php/Maintaining_Git_trees</id>
		<title>Maintaining Git trees</title>
		<link rel="alternate" type="text/html" href="http://linuxtv.org/wiki/index.php/Maintaining_Git_trees"/>
				<updated>2010-01-29T22:30:39Z</updated>
		
		<summary type="html">&lt;p&gt;Mauro Carvalho Chehab: /* Tags that a patch receive after its submission */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== KERNEL DEVELOPMENT PROCEDURES AT THE KERNEL UPSTREAM ==&lt;br /&gt;
&lt;br /&gt;
It is important that people understand how upstream development works.&lt;br /&gt;
&lt;br /&gt;
Kernel development has 2 phases:&lt;br /&gt;
&lt;br /&gt;
*1) a merge window typically with 2 weeks (although Linus is gave some indications that he may reduce it on 2.6.34), starting with the release of a new kernel version;&lt;br /&gt;
&lt;br /&gt;
*2) the -rc period, where the Kernel is tested and receive fixes.&lt;br /&gt;
&lt;br /&gt;
The length of the -rc period depends on the number and relevance of the fixes. Considering the recent history, it ranges from -rc6 to -rc8, where each -rc takes one week.&lt;br /&gt;
&lt;br /&gt;
Those are the latest -rc kernels since 2.6.12:&lt;br /&gt;
{|  border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!kernel !!latest -rc version&lt;br /&gt;
|-&lt;br /&gt;
|2.6.12 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.13 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.14 ||align=&amp;quot;center&amp;quot; | rc5&lt;br /&gt;
|-&lt;br /&gt;
|2.6.15 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.16 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.17 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.18 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.19 ||align=&amp;quot;center&amp;quot; | rc6&lt;br /&gt;
|-&lt;br /&gt;
|2.6.20 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.21 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.22 ||align=&amp;quot;center&amp;quot; | rc7&lt;br /&gt;
|-&lt;br /&gt;
|2.6.23 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.24 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.25 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.26 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.27 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.28 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.29 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.30 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|-&lt;br /&gt;
|2.6.31 ||align=&amp;quot;center&amp;quot; | rc9&lt;br /&gt;
|-&lt;br /&gt;
|2.6.32 ||align=&amp;quot;center&amp;quot; | rc8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, the announcement of a new -rc kernel gives some hints when that -rc kernel may be the last one.&lt;br /&gt;
&lt;br /&gt;
====Subsystem procedures for merging patches upstream====&lt;br /&gt;
&lt;br /&gt;
The required procedure on subsystem trees is that:&lt;br /&gt;
&lt;br /&gt;
a) During -rc period (e.g. latest main kernel available is 2.6.x, the latest -rc kernel is 2.6.[x+1]-rc&amp;lt;y&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* fix patches for the -rc kernel (2.6.[x+1]) should be sent upstream, being a good idea to send them for some time at linux-next tree, allowing other people to test it, and check for potential conflicts with the other arch's;&lt;br /&gt;
* patches for 2.6.[x+2] should be sent to linux-next.&lt;br /&gt;
&lt;br /&gt;
b) the release of 2.6.[x+1] kernel:&lt;br /&gt;
&lt;br /&gt;
* closes the -rc period and starts the merge window.&lt;br /&gt;
&lt;br /&gt;
c) During the merge window:&lt;br /&gt;
&lt;br /&gt;
* the patch that were added on linux-next during the -rc period for 2.6.[x+2] should be sent upstream;&lt;br /&gt;
* new non-fix patches should be hold until the next -rc period starts, so, they'll be added on 2.6.[x+3];&lt;br /&gt;
* fix patches for 2.6.[x+2] should go to linux-next, wait for a few days and then send upstream.&lt;br /&gt;
&lt;br /&gt;
d) the release of 2.6.[x+2]-rc1 kernel:&lt;br /&gt;
&lt;br /&gt;
* the merge window has closed. No new features are allowed.&lt;br /&gt;
* the patches with new features that arrived during the merge window will be moved to linux-next&lt;br /&gt;
&lt;br /&gt;
====A practical example====&lt;br /&gt;
&lt;br /&gt;
Considering that, at the time this document were written, the last main release is 2.6.32, and the latest -rc release is 2.6.33-rc5, this means that:&lt;br /&gt;
&lt;br /&gt;
* Stable patches, after adding upstream, are being received for 2.6.32 kernel series;&lt;br /&gt;
* Bug fixes are being received for kernel 2.6.33;&lt;br /&gt;
* New feature patches are being received for kernel 2.6.34.&lt;br /&gt;
&lt;br /&gt;
After the release of kernel 2.6.33, starts the period for receiving patches for 2.6.35.&lt;br /&gt;
&lt;br /&gt;
In other words, the features being developed are always meant to be included on the next 2 kernels.&lt;br /&gt;
&lt;br /&gt;
In the specific case of new drivers that don't touch on existing features, it could be possible to send it during the -rc period, but it is safer to assume that those drivers should follow the above procedure, as a later submission may be nacked.&lt;br /&gt;
&lt;br /&gt;
====Patches for stable====&lt;br /&gt;
&lt;br /&gt;
Sometimes, a fix patch corrects a problem that happens also on stable kernels (e. g. on kernel 2.6.x or even 2.6.y, where y &amp;lt; x). In this case, the patch should be sent to stable@kernel.org, in order to be added on stable kernels.&lt;br /&gt;
&lt;br /&gt;
In the case of git-submitted patches with fixes, that also need to be send to stable, all the developer needs to do is to add, a the patch description:&lt;br /&gt;
  CC: stable.kernel.org&lt;br /&gt;
&lt;br /&gt;
At the moment the patch reaches upstream, a copy of the patch will be automatically be sent to the stable maintainer and will be considered for inclusion on the next stable kernel (2.6.x.y).&lt;br /&gt;
&lt;br /&gt;
== KERNEL DEVELOPMENT PROCEDURES FOR V4L/DVB ==&lt;br /&gt;
&lt;br /&gt;
The upsteam procedures should be followed by every kernel subsystem. The subsystems have their own specific procedures detailing how the development patches are handled before arriving upstream. In the case of v4l/dvb, those are the used procedures.&lt;br /&gt;
&lt;br /&gt;
==== Fixes and linux-next patches====&lt;br /&gt;
&lt;br /&gt;
One of the big problems of our model used in the past by the subsystem, based on one Mercurial tree, is that there were just one tree/branch for everything. This makes hard to send some fix patches for 2.6.[x+1], as they may have conflicts with the patches for 2.6.[x+2]. So, when the conflict is simple to solve, the patch is sent as fixes. Otherwise, the patch generally needed to hold to the next cycle. &lt;br /&gt;
The fix patches used to get a special tag, added by the developer (&amp;quot;Priority: high&amp;quot;, in the body of the description), to give a hint to the subsystem maintainer that the patch should be sent upstream.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, sometimes people mark the driver with the wrong tag. For example, a patch got merged on Jan, 22 2010 that marked with &amp;quot;high&amp;quot;. However, that patch didn't apply at the fixes tree, because it fix a regression introduced by a driver that weren't merged upstream yet.&lt;br /&gt;
&lt;br /&gt;
====== How to solve those issues? ======&lt;br /&gt;
&lt;br /&gt;
Well, basically, the subsystem should work with more than one tree (or branch), on upstream submission:&lt;br /&gt;
* a tree(branch) with the fix patches;&lt;br /&gt;
* a tree(branch) with the new feature patches.&lt;br /&gt;
&lt;br /&gt;
So, the subsystem uses two development -git trees:&lt;br /&gt;
* http://linuxtv.org/git//v4l-dvb.git	- for patches that will be sent to the [x+2] kernel (and merged at upstream linux-next tree)&lt;br /&gt;
* http://linuxtv.org/git//fixes.git	- for bug patches that will be sent to the [x+1] kernel (also, patches that need to go to both [x+1] and [x])&lt;br /&gt;
	&lt;br /&gt;
While the patches via -hg, due to the merge conflicts its mentioned, the better is that, even those developers that prefer to develop patches use the old way, to send the fix patches via -git. This way, if is there a conflict, he is the one that can better solve it. Also, it avoids the risk of a patch being wrongly tagged.&lt;br /&gt;
&lt;br /&gt;
Also, after having a patch added on one of the above trees, it can't simply remove it, as others will be cloning that tree. So, the only option would be to send a revert patch, causing the patch history to be dirty and could be resulting on some troubles when submitting upstream. I've seen some nacks on receiving patches upstream from dirty git trees. So, we should really avoid this.&lt;br /&gt;
&lt;br /&gt;
==how to submit a -git pull request==&lt;br /&gt;
&lt;br /&gt;
As the same git tree may have more than one branch, and we'll have 2 -git trees for upstream, it is required that people specify what should be done. The internal maintainer's workflow is based on different mail queues for each type of requesting received. &lt;br /&gt;
&lt;br /&gt;
There are some scripts to automate the process, so it is important that everyone that sends -git pull do it at the same way.&lt;br /&gt;
&lt;br /&gt;
So, a pull request to be send with the following email tags:&lt;br /&gt;
&lt;br /&gt;
  From: &amp;lt;your real email&amp;gt;&lt;br /&gt;
  Subject: [GIT FIXES FOR 2.6.33] Fixes for driver cx88&lt;br /&gt;
  To: linux-media@vger.kernel.org&lt;br /&gt;
&lt;br /&gt;
  From: &amp;lt;your real email&amp;gt;&lt;br /&gt;
  Subject: [GIT PATCHES FOR 2.6.34] Updates for the driver saa7134&lt;br /&gt;
  To: linux-media@vger.kernel.org&lt;br /&gt;
&lt;br /&gt;
The from line may later be used by the git mailbomb script to send you a copy when the patch were committed, so it should be your real email.&lt;br /&gt;
&lt;br /&gt;
The indication between [] on the subject will be handled by the mailer scripts to put the request at the right queue. So, if tagged wrong, it may not be committed.&lt;br /&gt;
&lt;br /&gt;
Don't send a copy of the pull to the maintainer addresses. The pull will be filtering based on the subject and on the mailing list. If you send a c/c to the maintainer, it will be simply discarded.&lt;br /&gt;
&lt;br /&gt;
NEVER send a copy of any pull request to a subscribers-only mailing list. Everyone is free to answer to the email, reviewing your patches. Don't penalty people that wants to contribute with you with SPAM bouncing emails, produced by subscribers only lists.&lt;br /&gt;
&lt;br /&gt;
When a patch touches on other subsystem codes, please copy the other subsystem maintainers. This is important for patches that touches on arch files, and also for -alsa non-trivial patches.&lt;br /&gt;
&lt;br /&gt;
The email should be generated with the usage of git request-pull:&lt;br /&gt;
       git request-pull $ORIGIN $URL&lt;br /&gt;
&lt;br /&gt;
where $ORIGIN is the commit hash of the tree before your patches, and $URL is the URL for your repository.&lt;br /&gt;
&lt;br /&gt;
For example, for the patches merged directly from -hg at the -git trees on Jan, 22 2010, the above commands produced:&lt;br /&gt;
&lt;br /&gt;
  The following changes since commit 2f52713ab3cb9af2eb0f9354dba1421d1497f3e7:&lt;br /&gt;
    Abylay Ospan (1):&lt;br /&gt;
          V4L/DVB: 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card. 22kHz logic controlled by demod&lt;br /&gt;
  &lt;br /&gt;
  are available in the git repository at:&lt;br /&gt;
  &lt;br /&gt;
    git://linuxtv.org/v4l-dvb.git master&lt;br /&gt;
  &lt;br /&gt;
  Andy Walls (4):&lt;br /&gt;
        V4L/DVB: cx25840, v4l2-subdev, ivtv, pvrusb2: Fix ivtv/cx25840 tinny audio&lt;br /&gt;
        V4L/DVB: ivtv: Adjust msleep() delays used to prevent tinny audio and PCI bus hang&lt;br /&gt;
        V4L/DVB: cx18-alsa: Initial non-working cx18-alsa files&lt;br /&gt;
        V4L/DVB: cx18-alsa: Add non-working cx18-alsa-pcm.[ch] files to avoid data loss&lt;br /&gt;
  &lt;br /&gt;
  Devin Heitmueller (20):&lt;br /&gt;
        V4L/DVB: xc3028: fix regression in firmware loading time&lt;br /&gt;
        V4L/DVB: cx18: rename cx18-alsa.c&lt;br /&gt;
        V4L/DVB: cx18: make it so cx18-alsa-main.c compiles&lt;br /&gt;
        V4L/DVB: cx18: export a couple of symbols so they can be shared with cx18-alsa&lt;br /&gt;
        V4L/DVB: cx18: overhaul ALSA PCM device handling so it works&lt;br /&gt;
        V4L/DVB: cx18: add cx18-alsa module to Makefile&lt;br /&gt;
        V4L/DVB: cx18: export more symbols required by cx18-alsa&lt;br /&gt;
        V4L/DVB: cx18-alsa: remove unneeded debug line&lt;br /&gt;
        V4L/DVB: cx18: rework cx18-alsa module loading to support automatic loading&lt;br /&gt;
        V4L/DVB: cx18: cleanup cx18-alsa debug logging&lt;br /&gt;
        V4L/DVB: cx18-alsa: name alsa device after the actual card&lt;br /&gt;
        V4L/DVB: cx18-alsa: remove a couple of warnings&lt;br /&gt;
        V4L/DVB: cx18-alsa: fix memory leak in error condition&lt;br /&gt;
        V4L/DVB: cx18-alsa: fix codingstyle issue&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle fixes&lt;br /&gt;
        V4L/DVB: cx18: codingstyle fixes&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle cleanup&lt;br /&gt;
        V4L/DVB: cx18-alsa: codingstyle cleanup&lt;br /&gt;
        V4L/DVB: cx18: address possible passing of NULL to snd_card_free&lt;br /&gt;
        V4L/DVB: cx18-alsa: Fix the rates definition and move some buffer freeing code.&lt;br /&gt;
  &lt;br /&gt;
  Ian Armstrong (1):&lt;br /&gt;
        V4L/DVB: ivtv: Fix race condition for queued udma transfers&lt;br /&gt;
  &lt;br /&gt;
  Igor M. Liplianin (4):&lt;br /&gt;
        V4L/DVB: Add Support for DVBWorld DVB-S2 PCI 2004D card&lt;br /&gt;
        V4L/DVB: dm1105: connect splitted else-if statements&lt;br /&gt;
        V4L/DVB: dm1105: use dm1105_dev &amp;amp; dev instead of dm1105dvb&lt;br /&gt;
        V4L/DVB: dm1105: use macro for read/write registers&lt;br /&gt;
  &lt;br /&gt;
  JD Louw (1):&lt;br /&gt;
        V4L/DVB: Compro S350 GPIO change&lt;br /&gt;
  &lt;br /&gt;
   drivers/media/common/tuners/tuner-xc2028.c  |   11 +-&lt;br /&gt;
   drivers/media/dvb/dm1105/Kconfig            |    1 +&lt;br /&gt;
   drivers/media/dvb/dm1105/dm1105.c           |  501 ++++++++++++++-------------&lt;br /&gt;
   drivers/media/video/cx18/Kconfig            |   11 +&lt;br /&gt;
   drivers/media/video/cx18/Makefile           |    2 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-main.c   |  293 ++++++++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-mixer.c  |  191 ++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-mixer.h  |   23 ++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-pcm.c    |  353 +++++++++++++++++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa-pcm.h    |   27 ++&lt;br /&gt;
   drivers/media/video/cx18/cx18-alsa.h        |   59 ++++&lt;br /&gt;
   drivers/media/video/cx18/cx18-driver.c      |   40 ++-&lt;br /&gt;
   drivers/media/video/cx18/cx18-driver.h      |   10 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-fileops.c     |    6 +-&lt;br /&gt;
   drivers/media/video/cx18/cx18-fileops.h     |    3 +&lt;br /&gt;
   drivers/media/video/cx18/cx18-mailbox.c     |   46 +++-&lt;br /&gt;
   drivers/media/video/cx18/cx18-streams.c     |    2 +&lt;br /&gt;
   drivers/media/video/cx25840/cx25840-core.c  |   48 ++-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-irq.c         |    5 +-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-streams.c     |    6 +-&lt;br /&gt;
   drivers/media/video/ivtv/ivtv-udma.c        |    1 +&lt;br /&gt;
   drivers/media/video/pvrusb2/pvrusb2-hdw.c   |    1 +&lt;br /&gt;
   drivers/media/video/saa7134/saa7134-cards.c |    4 +-&lt;br /&gt;
   include/media/v4l2-subdev.h                 |    1 +&lt;br /&gt;
   24 files changed, 1380 insertions(+), 265 deletions(-)&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-main.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-mixer.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-mixer.h&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-pcm.c&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa-pcm.h&lt;br /&gt;
   create mode 100644 drivers/media/video/cx18/cx18-alsa.h&lt;br /&gt;
&lt;br /&gt;
This helps to identify what's expected to be found at the -git tree and to double check if the merge happened fine.&lt;br /&gt;
&lt;br /&gt;
====Tags that a patch receive after its submission====&lt;br /&gt;
&lt;br /&gt;
This is probably the most complex issue to solve.&lt;br /&gt;
&lt;br /&gt;
Signed-off-by/Acked-by/Tested-by/Nacked-by tags may be received after a patch or a -git submission. This can happen even while the patch is being tested at linux-next, from people reporting problems on the existing patches, or reporting that a patch worked fine.&lt;br /&gt;
&lt;br /&gt;
Also, the driver maintainer and the subsystem maintainer that is committing those patches should sign each one, to indicate that he reviewed and has accepted the patch. &lt;br /&gt;
&lt;br /&gt;
Currently, if a new tag is added to a committed patch, its hash will change. There were some discussions at Linux Kernel Mailing List about allowing adding new tags on -git without changing the hash, but I think this weren't implemented (yet?).&lt;br /&gt;
&lt;br /&gt;
The same problem occurs with -hg, but, as -hg doesn't support multiple branches (well, it has a &amp;quot;branch&amp;quot; command, but the concept of branch there is different), it was opted that the -hg trees won't have all the needed SOBs. Instead, those would be added only at the submission tree.&lt;br /&gt;
&lt;br /&gt;
With -git, a better procedure can be used:&lt;br /&gt;
&lt;br /&gt;
The developer may have two separate branches on his tree. For example, let's assume that the developer has the following branches on his tree:&lt;br /&gt;
* media-master		(associated with &amp;quot;linuxtv&amp;quot; remote)&lt;br /&gt;
* fixes&lt;br /&gt;
* devel&lt;br /&gt;
&lt;br /&gt;
His development happens on devel branch. When the patches are ready to submission will be copied into a new for_submission branch:&lt;br /&gt;
	git branch for_submission devel&lt;br /&gt;
&lt;br /&gt;
And a pull request from the branch &amp;quot;for_submission&amp;quot; will be sent.&lt;br /&gt;
&lt;br /&gt;
Eventually, he'll write new patches on his devel branch.&lt;br /&gt;
&lt;br /&gt;
After merged, the developer updates the linuxtv remote and drops the for_submission branch. This way, &amp;quot;media-master&amp;quot; will contain his patches that got a new hash, due to the maintainer's SOB. However, he has some new patches on his devel, that applies over the old hashes.&lt;br /&gt;
&lt;br /&gt;
Fortunately, git has a special command to automatically remove the old objects: git rebase.&lt;br /&gt;
&lt;br /&gt;
All the developer needs to do is to run the commands bellow:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
!git command&lt;br /&gt;
!notes&lt;br /&gt;
|-&lt;br /&gt;
| git remote update || to update his remotes, including &amp;quot;linuxtv&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| git checkout devel || move to devel branch&lt;br /&gt;
|-&lt;br /&gt;
| git pull . media-master || to make a recursive merge from v4l/dvb upstream&lt;br /&gt;
|-&lt;br /&gt;
| git rebase media-master || to remove the legacy hashes&lt;br /&gt;
|}&lt;br /&gt;
After this, his development branch will contain only upstream patches + the new ones he added after sending the patches for upstream submission.&lt;br /&gt;
&lt;br /&gt;
==Patches submitted via email==&lt;br /&gt;
&lt;br /&gt;
All valid patches submitted via email to [[mailto:linux-media@vger.kernel.org]] are automatically stored at [[http://patchwork.kernel.org/project/linux-media/list/]]. A patch, to be valid, should be in diff unified format. If you're using a -git tree, the simplest way to generate unified diff patches is to run:&lt;br /&gt;
  git diff&lt;br /&gt;
&lt;br /&gt;
If you're writing several patches, the better is to create a tag or a branch for the changes you're working. After that, you can use&lt;br /&gt;
   git format-patch &amp;lt;origin_branch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to create the patches for email submission.&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
Suppose that the -git tree were created with:&lt;br /&gt;
&lt;br /&gt;
  git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git v4l-dvb&lt;br /&gt;
  cd v4l-dvb&lt;br /&gt;
  git remote add linuxtv git://linuxtv.org/v4l-dvb.git&lt;br /&gt;
  git remote update&lt;br /&gt;
  git checkout -b media-master linuxtv/master&lt;br /&gt;
    &lt;br /&gt;
Before start working, you need to create your work branch:&lt;br /&gt;
&lt;br /&gt;
  git branch work media-master&lt;br /&gt;
&lt;br /&gt;
And move the working copy to the &amp;quot;work&amp;quot; branch:&lt;br /&gt;
&lt;br /&gt;
  git checkout work&lt;br /&gt;
&lt;br /&gt;
Some changes were done at the driver and saved by commit:&lt;br /&gt;
&lt;br /&gt;
  git commit -as&lt;br /&gt;
&lt;br /&gt;
When the patches are ready for submission via email, all that is needed is to run:&lt;br /&gt;
&lt;br /&gt;
  git format-patch work&lt;br /&gt;
&lt;br /&gt;
The command will create a series of emails bodies, one file per email.&lt;br /&gt;
&lt;br /&gt;
Just send the email with the patch inlined for it to ge caught by patchwork.&lt;br /&gt;
&lt;br /&gt;
   BE CAREFULL: several emailers including Thunderdird breaks long lines, causing patch corruption.&lt;br /&gt;
&lt;br /&gt;
In the specific case of Thunderbird, an extension is needed to send the patches:  [https://hg.mozilla.org/users/clarkbw_gnome.org/asalted-patches/| Asalted Patches].&lt;/div&gt;</summary>
		<author><name>Mauro Carvalho Chehab</name></author>	</entry>

	</feed>