PDA

View Full Version : [SOLVED] Fedora 14 and Hauppauge WinTV-HVR2200 problem


otnateos
12th April 2011, 12:33 PM
Hi all,

I just put Hauppauge WinTV-HVR2200 device to my system, however I can't get it working

$ lspci -s 03:00 -vvv
03:00.0 Multimedia controller: Philips Semiconductors Device 7164 (rev 81)
Subsystem: Hauppauge computer works Inc. Device 8900
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: 32 bytes
Interrupt: pin A routed to IRQ 17
Region 0: Memory at f8000000 (64-bit, non-prefetchable) [size=4M]
Region 2: Memory at f8400000 (64-bit, non-prefetchable) [size=4M]
Capabilities: [40] MSI: Enable- Count=1/16 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [50] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <256ns, 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 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #1, Speed 2.5GT/s, Width x2, ASPM L0s L1, Latency L0 <4us, L1 <64us
ClockPM- Surprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
Capabilities: [74] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [7c] Vendor Specific Information: Len=84 <?>
Capabilities: [100 v1] Vendor Specific Information: ID=0000 Rev=0 Len=060 <?>
Capabilities: [160 v1] Virtual Channel
Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
Arb: Fixed- WRR32- WRR64- WRR128-
Ctrl: ArbSelect=Fixed
Status: InProgress-
VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
Status: NegoPending- InProgress-
VC1: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable- ID=0 ArbSelect=Fixed TC/VC=00
Status: NegoPending- InProgress-
Kernel driver in use: saa7164
Kernel modules: saa7164

looking at dmesg, initially I see error

[ 8.509277] saa7164_downloadfirmware() no first image
[ 8.509325] saa7164_downloadfirmware() Waiting for firmware upload (NXP7164-2010-03-10.1.fw)
[ 8.538258] saa7164_downloadfirmware() Upload failed. (file not found?)
[ 8.538297] Failed to boot firmware, no features registered


Then I try to download firmwares from Stephen Toth's website

$ wget http://www.steventoth.net/linux/hvr22xx/firmwares/4019072/NXP7164-2010-03-10.1.fw
$ cp NXP7164-2010-03-10.1.fw /lib/firmware
$ wget http://www.steventoth.net/linux/hvr22xx/firmwares/4038864/v4l-saa7164-1.0.3-3.fw
$ cp v4l-saa7164-1.0.3-3.fw /lib/firmware
$ rmmod saa7164
$ modprobe saa7164


dmesg print out the following error

[ 1017.346537] saa7164 driver loaded
[ 1017.346628] saa7164 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 1017.348459] CORE saa7164[0]: subsystem: 0070:8900, board: Hauppauge WinTV-HVR2200 [card=5,autodetected]
[ 1017.348467] saa7164[0]/0: found at 0000:03:00.0, rev: 129, irq: 17, latency: 0, mmio: 0xf8000000
[ 1017.348477] saa7164 0000:03:00.0: setting latency timer to 64
[ 1017.458014] saa7164_downloadfirmware() no first image
[ 1017.458024] saa7164_downloadfirmware() Waiting for firmware upload (NXP7164-2010-03-10.1.fw)
[ 1017.475325] saa7164_downloadfirmware() firmware read 4019072 bytes.
[ 1017.475329] saa7164_downloadfirmware() firmware loaded.
[ 1017.475331] Firmware file header part 1:
[ 1017.475334] .FirmwareSize = 0x0
[ 1017.475336] .BSLSize = 0x0
[ 1017.475338] .Reserved = 0x3d538
[ 1017.475340] .Version = 0x3
[ 1017.475342] saa7164_downloadfirmware() SecBootLoader.FileSize = 4019072
[ 1017.475349] saa7164_downloadfirmware() FirmwareSize = 0x1fd6
[ 1017.475352] saa7164_downloadfirmware() BSLSize = 0x0
[ 1017.475354] saa7164_downloadfirmware() Reserved = 0x0
[ 1017.475357] saa7164_downloadfirmware() Version = 0x1661c00
[ 1023.035017] saa7164_downloadimage() image corrupt
[ 1023.035038] bootloader d/l has failed
[ 1023.035312] Failed to boot firmware, no features registered

Now I am completely lost why the image is corrupted. Does anyone has tried Hauppauge HVR-2200 or HVR-2250 in Fedora 14 ? or do I have to compile the firmware like the instruction from http://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-HVR-2200. (I tried before and failed)

o my kernel information

$ uname -a
Linux x 2.6.35.11-83.fc14.x86_64 #1 SMP Mon Feb 7 07:06:44 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Miikka
12th April 2011, 12:47 PM
What went wrong with the linuxtv guide? I believe following it has the best chances of making your card work.

otnateos
12th April 2011, 01:03 PM

got error
error: implicit declaration of function 'kfree'
and
error: implicit declaration of function 'kzalloc'

Miikka
12th April 2011, 02:04 PM
Try this:
https://patchwork.kernel.org/patch/118189/

otnateos
17th April 2011, 08:31 AM
Try this:
https://patchwork.kernel.org/patch/118189/
thanks for your reply, and sorry for the late reply. i guess the only way to get it working is to compile against my kernel. and finally i got it working after manually editing it by hand (should have used sed and grep i think to make it faster)


for any error with kzalloc , kfree and other k* , i used that solution by adding
#include <linux/slab.h>
to any c files under /v4l directory

then i had to download kernel source and copy all c and header files from /drivers/media/dvb/dvb-core/ to my /v4l directory to fix errors related to 'struct net_device'
i had to replace all 'usb_buffer_alloc' to 'usb_alloc_coherent' and 'usb_free_alloc' to 'usb_free_coherent'
last bit i had to replace usb autosuspend_disabled with usb_enable_autosuspend. e.g. https://patchwork.kernel.org/patch/95943/




one of the post helped me to fix the compile on kernel 2.6.35 is post http://ubuntuforums.org/showthread.php?t=1567490&page=8 by newbuntu81
one other post which might help will be http://ubuntuforums.org/showpost.php?p=10398468&postcount=358