LinuxTVWiki:Sandbox: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
Line 12: Line 12:
Follow the instruction to get the AF903x source code archive '''AF903x.tar.gz''' in [[EzCap_DVB_T_Stick]].
Follow the instruction to get the AF903x source code archive '''AF903x.tar.gz''' in [[EzCap_DVB_T_Stick]].


I run kernel 3.0.1 and therefore I needed a few patched just to get the source code compiled (you may not need all of them, but they shouldn't hurt either).
I run kernel 3.0.1 and therefore I needed a few patched just to get the source code compiled (you may not need all of them, but they shouldn't hurt either):


--- a/src/af903x.h 2009-08-14 16:17:10.000000000 +0200
--- a/src/af903x.h 2009-08-14 16:17:10.000000000 +0200
Line 64: Line 64:
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <linux/device.h>
#include <linux/device.h>


Then, here are some bug fixes to prevent deadlocks of the mutexes:

--- a/src/af903x-drv.c 2009-08-14 16:17:10.000000000 +0200
+++ b/src/af903x-drv.c 2011-08-12 21:26:10.610770606 +0200
@@ -1075,7 +1075,7 @@ DWORD DL_ApCtrl (
if(PDC->architecture != Architecture_PIP)
{
- if ( PDC->Demodulator.chipNumber == 2 && bOn) dwError = DL_NIMSuspend(PDC, false);
+ if ( PDC->Demodulator.chipNumber == 2 && bOn) dwError = DRV_NIMSuspend(PDC, false);
for (i=0; i<PDC->Demodulator.chipNumber; i++)
{
@@ -1091,7 +1091,7 @@ DWORD DL_ApCtrl (
}
}
- if(PDC->Demodulator.chipNumber == 2 && !bOn) dwError = DL_NIMSuspend(PDC, true);
+ if(PDC->Demodulator.chipNumber == 2 && !bOn) dwError = DRV_NIMSuspend(PDC, true);
}
else
{
@@ -1100,7 +1100,7 @@ DWORD DL_ApCtrl (
PDC->fc[ucSlaveDemod].GraphBuilt = 1;
if (PDC->fc[0].GraphBuilt == 0 || PDC->fc[1].GraphBuilt == 0)
- dwError = DL_NIMSuspend(PDC, false);
+ dwError = DRV_NIMSuspend(PDC, false);
dwError = DRV_ApCtrl (PDC, ucSlaveDemod, bOn);
}
@@ -1112,7 +1112,7 @@ DWORD DL_ApCtrl (
if (PDC->bTunerPowerOff != true) dwError = DRV_ApCtrl (PDC, ucSlaveDemod, bOn);
if (PDC->fc[0].GraphBuilt == 0 && PDC->fc[1].GraphBuilt == 0 && PDC->bTunerPowerOff == true)
- dwError = DL_NIMSuspend(PDC, true);
+ dwError = DRV_NIMSuspend(PDC, true);
}
}





Revision as of 15:07, 13 August 2011

TerraTec T6 Dual DVB-T stick

It consists of

  • Afatech AF9035B-N2 USB Interface with included AF9033 Demodulator
  • Afatech AF9033B-N2 second Demodulator
  • Fitipower FC0012 Tuner (2 off)

This device is currently not officially supported by Linux, however it is possible to get this device working using a slightly patched version of the AF9035 driver as used in EzCap_DVB_T_Stick.

Instruction to get the stick working

Follow the instruction to get the AF903x source code archive AF903x.tar.gz in EzCap_DVB_T_Stick.

I run kernel 3.0.1 and therefore I needed a few patched just to get the source code compiled (you may not need all of them, but they shouldn't hurt either):

--- a/src/af903x.h      2009-08-14 16:17:10.000000000 +0200
+++ b/src/af903x.h      2011-08-13 16:49:49.799506005 +0200
@@ -9,7 +9,6 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/kref.h>
-#include <linux/smp_lock.h>
 #include <linux/usb.h>
 #include <asm/uaccess.h>
 #include "dvb-usb.h"
--- a/src/userdef.h     2009-08-14 16:17:10.000000000 +0200
+++ b/src/userdef.h     2011-08-01 22:56:02.626583791 +0200
@@ -8,7 +8,9 @@
 typedef     int             INT;       // 4 bytes
 //typedef     void *          HANDLE; 

+#ifndef NULL
 #define NULL    0
+#endif

 #ifdef IN
 #undef IN
--- a/api/type.h        2009-08-14 16:17:10.000000000 +0200
+++ b/api/type.h        2011-08-01 22:54:38.197342415 +0200
@@ -3,6 +3,15 @@

 #include "userdef.h"// for Linux

+#ifdef IN
+#undef IN
+#endif
+#ifdef OUT
+#undef OUT
+#endif
+#ifdef INOUT
+#undef INOUT
+#endif
 #define IN
 #define OUT
 #define INOUT
--- a/api/usb2impl.c    2011-02-15 11:12:59.000000000 +0100
+++ b/api/usb2impl.c    2011-08-01 21:59:17.635389432 +0200
@@ -6,7 +6,6 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/kref.h>
-#include <linux/smp_lock.h>
 #include <linux/usb.h>
 #include <asm/uaccess.h>
 #include <linux/device.h>


Then, here are some bug fixes to prevent deadlocks of the mutexes:

--- a/src/af903x-drv.c  2009-08-14 16:17:10.000000000 +0200
+++ b/src/af903x-drv.c  2011-08-12 21:26:10.610770606 +0200
@@ -1075,7 +1075,7 @@ DWORD DL_ApCtrl (

     if(PDC->architecture != Architecture_PIP)
     {
-       if ( PDC->Demodulator.chipNumber == 2 && bOn) dwError = DL_NIMSuspend(PDC, false);
+       if ( PDC->Demodulator.chipNumber == 2 && bOn) dwError = DRV_NIMSuspend(PDC, false);

        for (i=0; i<PDC->Demodulator.chipNumber; i++)
        {
@@ -1091,7 +1091,7 @@ DWORD DL_ApCtrl (
            }
        }

-       if(PDC->Demodulator.chipNumber == 2 && !bOn) dwError = DL_NIMSuspend(PDC, true);
+       if(PDC->Demodulator.chipNumber == 2 && !bOn) dwError = DRV_NIMSuspend(PDC, true);
     }
     else
     {
@@ -1100,7 +1100,7 @@ DWORD DL_ApCtrl (
            PDC->fc[ucSlaveDemod].GraphBuilt = 1;

            if (PDC->fc[0].GraphBuilt == 0 ||  PDC->fc[1].GraphBuilt == 0)
-               dwError = DL_NIMSuspend(PDC, false);
+               dwError = DRV_NIMSuspend(PDC, false);

            dwError = DRV_ApCtrl (PDC, ucSlaveDemod, bOn);
        }
@@ -1112,7 +1112,7 @@ DWORD DL_ApCtrl (
            if (PDC->bTunerPowerOff != true) dwError = DRV_ApCtrl (PDC, ucSlaveDemod, bOn);

            if (PDC->fc[0].GraphBuilt == 0 && PDC->fc[1].GraphBuilt == 0 && PDC->bTunerPowerOff == true)
-               dwError = DL_NIMSuspend(PDC, true);
+               dwError = DRV_NIMSuspend(PDC, true);
        }
     }

CAPTURES USB VC-211A AND TERRATEC CINERGY 200

The devices USB Model VC-211A, which can be found with the logos of ACTionMaster, Digitus or LinXcel, were added as card = 74 in cardlist of the em28xx driver at November 26, 2009, by the developer Mauro Chehab. These devices are erroneously recognized by the command "lsusb" as:

Bus 001 Device 002: ID eb1a:2800 eMPIA Technology, Inc. Terratec Cinergy 200

But they are simpler.Besides not having audio processor, are devoid of tuner and EEPROM. And why not have EEPROM, the driver v4l2 needs editing a file *. conf to recognize it and set it up correctly as CARD = 74 (VC-211A - ACTionMaster, or LinXcel Digitus). This can be done in the console as follows:

$ sudo gedit /etc/modprobe.d/captura.conf $ Sudo gedit / etc / modprobe.d / captura.conf

In this file, you must edit and save with the following parameters:

options em28xx card=6 core_debug=1 options em28xx card = 6 core_debug = 1

Obviously, until that amendment to em28xx kernel is integrated into the various Linux distributions that use v4l2, the user that have a VC-211A should download the tree v4l2 and compile the driver as guides on page How_to_Obtain, _Build_and_Install_V4L-DVB_Device_Drivers.

Before this change, the resolution of 720x480 required by v4l2 version 0.1.2 was not compatible with the captors VC-211A and older ones, since they only work with 640x480. This error generated a loss of data causing the captured image does not exceed the maximum of 360x240. This whole problem has been corrected by the master Mauro Chehab, which is worthy of respect and gratitude of the entire Linux community and especially the fans for the video capture.

We take this opportunity to give our thanks to all those who have worked directly or indirectly in the developed project video4linux.

By Raymond Eduvirgens