Moderator Control Panel ]

TBS 6981 driver on ClearOS 6.4

TBS 6981 driver on ClearOS 6.4

Postby maxximum » Wed Apr 24, 2013 12:06 am

Hello,

I've just got a TBS 6981, and I'm trying to make it work under ClearOS 6.4 x64 (Redhat 6.4 clone, http://www.clearfoundation.com/Software/overview.html).

Kernel :
Code: Select All Code
# uname -a
Linux maxximum 2.6.32-358.2.1.v6.x86_64 #1 SMP Thu Mar 14 13:29:27 MDT 2013 x86_64 x86_64 x86_64 GNU/Linux

Installed packages :
Code: Select All Code
# rpm -qa | grep kernel | sort
dracut-kernel-004-303.el6.noarch
kernel-2.6.32-358.2.1.v6.x86_64
kernel-devel-2.6.32-358.2.1.v6.x86_64
kernel-firmware-2.6.32-358.2.1.v6.noarch
kernel-headers-2.6.32-358.2.1.v6.x86_64
also :
Code: Select All Code
gcc-4.4.7-3.el6.x86_64
gcc-c++-4.4.7-3.el6.x86_64
make-3.81-20.el6.x86_64

Code: Select All Code
lspci :
02:00.0 Multimedia video controller [0400]: Conexant Systems, Inc. CX23885 PCI Video and Audio Decoder [14f1:8852] (rev 04)
        Subsystem: Device [6981:8888]
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 37
        Region 0: Memory at f6800000 (64-bit, non-prefetchable) [size=2M]
        Capabilities: [40] Express (v1) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <2us, L1 <4us
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [80] Power Management version 2
                Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [90] Vital Product Data
                Product Name: "
                End
        Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee004b8  Data: 0000
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                AERCap: First Error Pointer: 14, GenCap- CGenEn- ChkCap- ChkEn-
        Capabilities: [200 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed+ WRR32+ WRR64+ WRR128-
                Ctrl:   ArbSelect=WRR64
                Status: InProgress-
                Port Arbitration Table [240] <?>
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=01
                        Status: NegoPending- InProgress-
        Kernel driver in use: cx23885
        Kernel modules: cx23885

Loading stock "cx23885" module, provided with ClearOS 6.4 kernel :
Code: Select All Code
# modprobe -v cx23885
insmod /lib/modules/2.6.32-358.2.1.v6.x86_64/kernel/drivers/media/video/cx23885/cx23885.ko

dmesg when "cx23885" loads :
Code: Select All Code
cx23885 driver version 0.0.2 loaded
cx23885 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
cx23885[0]: Your board isn't known (yet) to the driver.
cx23885[0]: Try to pick one of the existing card configs via
cx23885[0]: card=<n> insmod option.  Updating to the latest
cx23885[0]: version might help as well.
cx23885[0]: Here is a list of valid choices for the card=<n> insmod option:
cx23885[0]:    card=0 -> UNKNOWN/GENERIC
cx23885[0]:    card=1 -> Hauppauge WinTV-HVR1800lp
cx23885[0]:    card=2 -> Hauppauge WinTV-HVR1800
cx23885[0]:    card=3 -> Hauppauge WinTV-HVR1250
cx23885[0]:    card=4 -> DViCO FusionHDTV5 Express
cx23885[0]:    card=5 -> Hauppauge WinTV-HVR1500Q
cx23885[0]:    card=6 -> Hauppauge WinTV-HVR1500
cx23885[0]:    card=7 -> Hauppauge WinTV-HVR1200
cx23885[0]:    card=8 -> Hauppauge WinTV-HVR1700
cx23885[0]:    card=9 -> Hauppauge WinTV-HVR1400
cx23885[0]:    card=10 -> DViCO FusionHDTV7 Dual Express
cx23885[0]:    card=11 -> DViCO FusionHDTV DVB-T Dual Express
cx23885[0]:    card=12 -> Leadtek Winfast PxDVR3200 H
cx23885[0]:    card=13 -> Compro VideoMate E650F
cx23885[0]:    card=14 -> TurboSight TBS 6920
cx23885[0]:    card=15 -> TeVii S470
cx23885[0]:    card=16 -> DVBWorld DVB-S2 2005
cx23885[0]:    card=17 -> NetUP Dual DVB-S2 CI
cx23885[0]:    card=18 -> Hauppauge WinTV-HVR1270
cx23885[0]:    card=19 -> Hauppauge WinTV-HVR1275
cx23885[0]:    card=20 -> Hauppauge WinTV-HVR1255
cx23885[0]:    card=21 -> Hauppauge WinTV-HVR1210
cx23885[0]:    card=22 -> Mygica X8506 DMB-TH
cx23885[0]:    card=23 -> Magic-Pro ProHDTV Extreme 2
cx23885[0]:    card=24 -> Hauppauge WinTV-HVR1850
cx23885[0]:    card=25 -> Compro VideoMate E800
cx23885[0]:    card=26 -> Hauppauge WinTV-HVR1290
cx23885[0]:    card=27 -> Mygica X8558 PRO DMB-TH
cx23885[0]:    card=28 -> LEADTEK WinFast PxTV1200
cx23885[0]:    card=29 -> GoTView X5 3D Hybrid
CORE cx23885[0]: subsystem: 6981:8888, board: UNKNOWN/GENERIC [card=0,autodetected]
cx23885_dev_checkrevision() Hardware revision = 0xa5
cx23885[0]/0: found at 0000:02:00.0, rev: 4, irq: 17, latency: 0, mmio: 0xf6800000
cx23885 0000:02:00.0: setting latency timer to 64
cx23885 0000:02:00.0: irq 37 for MSI/MSI-X

I tried with "rmmod cx23885 && modprobe -v cx23885 card=14" but it fails (TBS 6920 is not TBS 6981).
Last edited by maxximum on Wed Apr 24, 2013 12:10 am, edited 1 time in total.
maxximum
 
Posts: 2
Joined: Tue Apr 23, 2013 4:35 pm

Re: TBS 6981 driver on ClearOS 6.4

Postby maxximum » Wed Apr 24, 2013 12:07 am

// I had to split post // second part //

The first problem (solved, please read) :
- kernel 2.6.32-358.2.1 has its own "cx23885" kernel module, which is loaded at boot time when it discovers TBS 6981.
- however, there is no device created under /dev/dvb and dmesg shows that TBS 6981 is "UNKNOWN/GENERIC" (it should be detected as "TurboSight TBS 6981").
- from these points I understand that kernel 2.6.32-358.2.1 module "cx23885" can't manage TBS 6981, and I must compile drivers from TBS.
- I downloaded "tbs-linux-drivers_v130318.zip" and follows instructions in "README_TBS6981" file but I have the following error when I run make :

Code: Select All Code
[root@maxximum linux-tbs-drivers]# ./v4l/tbs-x86_64.sh
TBS drivers configured for x86_64 platform.

[root@maxximum linux-tbs-drivers]# make
make -C /tmp/linux-tbs-drivers/v4l
make[1]: Entering directory `/tmp/linux-tbs-drivers/v4l'
No version yet, using 2.6.32-358.2.1.v6.x86_64
make[1]: Leaving directory `/tmp/linux-tbs-drivers/v4l'
make[1]: Entering directory `/tmp/linux-tbs-drivers/v4l'
scripts/make_makefile.pl
Updating/Creating .config
Preparing to compile for kernel version 2.6.32

***WARNING:*** You do not have the full kernel sources installed.
This does not prevent you from building the v4l-dvb tree if you have the
kernel headers, but the full kernel source may be required in order to use
make menuconfig / xconfig / qconfig.

If you are experiencing problems building the v4l-dvb tree, please try
building against a vanilla kernel before reporting a bug.

Vanilla kernels are available at http://kernel.org.
On most distros, this will compile a newly downloaded kernel:

cp /boot/config-`uname -r` <your kernel dir>/.config
cd <your kernel dir>
make all modules_install install

Please see your distro's web site for instructions to build a new kernel.

V4L2_MEM2MEM_DEV: Requires at least kernel 2.6.33
VIDEO_TVP7002: Requires at least kernel 2.6.34
VIDEO_AK881X: Requires at least kernel 2.6.33
VIDEO_TIMBERDALE: Requires at least kernel 2.6.39
VIDEO_VIA_CAMERA: Requires at least kernel 2.6.37
SOC_CAMERA: Requires at least kernel 2.6.33
SOC_CAMERA_MT9M001: Requires at least kernel 2.6.33
SOC_CAMERA_MT9M111: Requires at least kernel 2.6.33
SOC_CAMERA_MT9T031: Requires at least kernel 2.6.33
SOC_CAMERA_MT9V022: Requires at least kernel 2.6.33
SOC_CAMERA_TW9910: Requires at least kernel 2.6.33
SOC_CAMERA_PLATFORM: Requires at least kernel 2.6.33
SOC_CAMERA_OV772X: Requires at least kernel 2.6.33
RADIO_SAA7706H: Requires at least kernel 2.6.34
RADIO_TIMBERDALE: Requires at least kernel 2.6.39
RADIO_WL1273: Requires at least kernel 2.6.39
DVB_FIREDTV: Requires at least kernel 3.0.0
Created default (all yes) .config file
./scripts/make_myconfig.pl
make[1]: Leaving directory `/tmp/linux-tbs-drivers/v4l'
make[1]: Entering directory `/tmp/linux-tbs-drivers/v4l'
perl scripts/make_config_compat.pl /lib/modules/2.6.32-358.2.1.v6.x86_64/source ./.myconfig ./config-compat.h
creating symbolic links...
make -C firmware prep
make[2]: Entering directory `/tmp/linux-tbs-drivers/v4l/firmware'
make[2]: Leaving directory `/tmp/linux-tbs-drivers/v4l/firmware'
make -C firmware
make[2]: Entering directory `/tmp/linux-tbs-drivers/v4l/firmware'
  CC  ihex2fw
Generating vicam/firmware.fw
Generating dabusb/firmware.fw
Generating dabusb/bitstream.bin
Generating ttusb-budget/dspbootcode.bin
Generating cpia2/stv0672_vp4.bin
Generating av7110/bootcode.bin
make[2]: Leaving directory `/tmp/linux-tbs-drivers/v4l/firmware'
Kernel build directory is /lib/modules/2.6.32-358.2.1.v6.x86_64/build
make -C /lib/modules/2.6.32-358.2.1.v6.x86_64/build SUBDIRS=/tmp/linux-tbs-drivers/v4l  modules
make[2]: Entering directory `/usr/src/kernels/2.6.32-358.2.1.v6.x86_64'
  CC [M]  /tmp/linux-tbs-drivers/v4l/au0828-core.o
In file included from <command-line>:0:
/tmp/linux-tbs-drivers/v4l/compat.h:26: error: conflicting types for 'find_next_zero_bit'
include/linux/bitops.h:232: note: previous declaration of 'find_next_zero_bit' was here
/tmp/linux-tbs-drivers/v4l/compat.h:32: error: conflicting types for 'find_next_bit'
include/linux/bitops.h:222: note: previous declaration of 'find_next_bit' was here
make[3]: *** [/tmp/linux-tbs-drivers/v4l/au0828-core.o] Error 1
make[2]: *** [_module_/tmp/linux-tbs-drivers/v4l] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.32-358.2.1.v6.x86_64'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/tmp/linux-tbs-drivers/v4l'
make: *** [all] Error 2

The solution is here :
https://www.centos.org/modules/newbb/viewtopic.php?topic_id=41830&forum=55&post_id=180247

So, I've commented out lines in "compat.h" file, did "make clean" and run again "make", and finally "make" is OK.
First problem solved.


The second problem :
The 'beauty' with distro like RHEL (or Debian, Ubuntu ... whatever) is that they use packaging system (rpm, yum, apt-get ...) in order to keep and maintain stability of all OS.
The main rule is "never install from tarball", always from (trusted) packages.
Kernel 2.6.32-358.2.1 used with ClearOS is a "plus" version with comes with it's own video4linux ; as such "cx23885" and many V4L kernel modules are provided out of the box.

Now, if I run "make install" as root ;
- this is install from tarball : files changed or overrided won't be tracked by packaging system.
- that will over-ride "critical" system files of running kernel : kernel symbols, and many kernel modules.
Consequently, stability of resulting system is unknown.


I would imagine to dig further :
- apply patches to kernel source, and rebuild kernel from SRPM ("kernel-2.6.32-358.2.1.v6.src.rpm").
- build a video4linux "TBS" KMOD ; not easy task ... I can't find such V4L KMOD even on ELrepo for RHEL 6.
- build only "cx23885" kernel module ? how ?

Help appreciated ; what do do now ?

Thanks.
maxximum
 
Posts: 2
Joined: Tue Apr 23, 2013 4:35 pm


Return to Linux

Who is online

Users browsing this forum: No registered users and 2 guests