[pvrusb2] WinTV-HVR-1950 will not load firmware

Mike Isely isely at isely.net
Fri Oct 23 22:09:49 CDT 2009


On Fri, 23 Oct 2009, Ken Bass wrote:

> I just recently bought a WinTV-HVR-1950. I went the USB route thinking it
> would be simple plug and play, so far a real PITA. I'm running Fedora 11. The
> label on the box bottom says 75111 LF, Rev C3E9
> 
> The fwextract.pl script was unable to find drivers from the CDROM. Can I
> really be the first person using this USB device? I thought it has been out
> for about 16 months already. I would love to smack Hauppauge upside the head
> for making this so difficult for Linux users.

This is not really Hauppauge's fault.  Linux is not their 
responsibility.  Best I can do here is to provide a program (e.g. 
fwextract.pl) that can find and extract the needed firmware from the 
Windows drivers.  The program uses md5sums to do the work which 
generally makes the process very very robust.  However every time 
Hauppauge updates their driver package, then the md5sums for the 
expected container files can change, causing fwextract.pl to miss 
things.  When that happens it's not subtle so there's no risk of people 
being fooled by such changes.  This issue however is why I've tried to 
carefully document a viable "manual extraction" process that anyone with 
a Windows machine should be able to use to generate the needed 
additional info for fwextract.pl to operate on.  The manual process is 
more difficult as you can see, which is why I encourage people to send 
me the results so I can update fwextract.pl for everyone else's benefit.


> 
> Since the fwextract.pl script did not work, I had to go through the hassle of
> rebuilding a Fedora 11 kernel to enable the CONFIG_VIDEO_PVRUSB2_DEBUGIFC
> driver option.

Yeah, you do need that option to execute the manual extraction for the 
FX2 firmware.  However you don't need to rebuild the whole kernel.  A 
much, much easier strategy is just to grab the latest standalone pvrusb2 
driver and build that against your unchanged kernel.  The standalone 
driver turns on that option in its internal build.  Then you can just 
move the distro's pvrusb2.ko out of the way and use the version you just 
compiled.



> 
> I jumped through all the hoops of booting Windows, USB snooping and FX2
> capture thanks to the details instructions at isely.net.
> 
> However, it still does not work. I only get this far now...
> 
> usb 1-4: new high speed USB device using ehci_hcd and address 2
> usb 1-4: New USB device found, idVendor=2040, idProduct=7501
> usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> usb 1-4: Product: WinTV
> usb 1-4: Manufacturer: Hauppauge
> usb 1-4: SerialNumber: 7300-00-F0XXXXXX
> usb 1-4: configuration #1 chosen from 1 choice
> Linux video capture interface: v2.00
> usbcore: registered new interface driver pvrusb2
> pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner
> pvrusb2: Debug mask is 31 (0x1f)
> usb 1-4: firmware: requesting v4l-pvrusb2-73xxx-01.fw
> pvrusb2: Device microcontroller firmware (re)loaded; it should now reset and
> reconnect.
> 
> It does not appear that is ever reconnects since that is the last entry in the
> log file.

And this is the point I would expect things to fail if that FX2 firmware 
didn't work properly.  What has happened here is that the pvrusb2 driver 
discovered that the device's FX2 firmware needed to be loaded, so it 
loaded it.  After it is loaded the device is rebooted so that it can 
start running the new firmware.  (This is NOT a destructive operation - 
such firmware only ever runs in RAM in the device; no ROM is ever 
overwritten.)  So if that new firmware is bad, the device will crash 
instead of rebooting and you're lefting wondering why it didn't 
reconnect.



> 
> One thing that was odd during is that fw_extract.pl --search did not find
> anything for fw2 (file v4l-cx2341x-enc.fw) [It took a LONG time]. However,
> after I added the fw1/fw3 items to the fwextract.pl contenInfo and reran
> fw_extract.pl, it found a hit for fw2 in the contentinfo. Sounds like there
> might be a problem with the search/fuzzy search?

When you run the training sequence, fwextract.pl first attempts to find 
exact bit-for-bit copies of each firmware image within any of the files 
in the Windows driver package.  This step goes pretty rapidly.  However 
if fwextract.pl can't find one or more of the images it falls back to a 
fuzzy matching algorithm, whereupon it will allow a certain (very low) 
number of byte differences between what is in the driver package versus 
what you're training it against.  This is important for the FX2 firmware 
because the FX2 processor apparently modifies its own image slightly - 
thus what you pull from the device won't be an exact match.  But it's 
more than close enough.

As for why it could not locate the encoder image.  However I downloaded 
Hauppauge's latest driver package and attempted to train fwextract.pl 
against it using all the various firmware images I have laying around 
and discovered that the encoder firmware was already sitting in the 
package as its own file.  Long story short, fwextract.pl already knows 
how to find that file in the new driver package because of this so 
that's why it found it for you even though you didn't add a definition 
for it.



> 
> If I boot Windows first and then reboot into Fedora 11, the driver loads
> (however the red light goes out). So this tells me something might be wrong
> with the firmware/firmware download process.
> 
> usb 1-4: new high speed USB device using ehci_hcd and address 2
> usb 1-4: New USB device found, idVendor=2040, idProduct=7501
> usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> usb 1-4: Product: WinTV
> usb 1-4: Manufacturer: Hauppauge
> usb 1-4: SerialNumber: 7300-00-F0XXXXXX
> usb 1-4: configuration #1 chosen from 1 choice
> usbcore: registered new interface driver pvrusb2
> pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner
> pvrusb2: Debug mask is 31 (0x1f)
> cx25840 1-0044: cx25843-24 found @ 0x88 (pvrusb2_a)
> pvrusb2: Attached sub-driver cx25840
> tuner 1-0042: chip found @ 0x84 (pvrusb2_a)
> pvrusb2: Attached sub-driver tuner
> pvrusb2: Supported video standard(s) reported available in hardware:
> PAL-M/N/Nc;NTSC-M/Mj/Mk;ATSC-8VSB/16VSB
> pvrusb2: Mapping standards mask=0x300b700
> (PAL-M/N/Nc;NTSC-M/Mj/Mk;ATSC-8VSB/16VSB)
> pvrusb2: Setting up 6 unique standard(s)
> pvrusb2: Set up standard idx=0 name=PAL-M
> pvrusb2: Set up standard idx=1 name=PAL-N
> pvrusb2: Set up standard idx=2 name=PAL-Nc
> pvrusb2: Set up standard idx=3 name=NTSC-M
> pvrusb2: Set up standard idx=4 name=NTSC-Mj
> pvrusb2: Set up standard idx=5 name=NTSC-Mk
> pvrusb2: Initial video standard (determined by device type): NTSC-M
> pvrusb2: Device initialization completed successfully.
> pvrusb2: registered device video0 [mpeg]
> DVB: registering new adapter (pvrusb2-dvb)
> 
> Next, if I type
> v4l2-ctl -d0 --all
> 
> I see the following:
> cx25840 1-0044: firmware: requesting v4l-cx25840.fw
> cx25840 1-0044: loaded v4l-cx25840.fw firmware (16382 bytes)
> usb 1-4: firmware: requesting v4l-cx2341x-enc.fw
> 
> So I am unsure from the logs if the v4l-cx2341x-enc.fw was ever loaded.
> However, a cat /dev/video0 > test.ts 'works' at that point (including audio).

And that tells me that the FX2 firmware should actually be OK, it's just 
that something went awry when you manually extracted it.  I've sent you 
additional e-mail about this.


> 
> I also tried the current standalone driver (pvrusb2: 20091011 (from
> www.isely.net):Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner) with the same
> result.

This I would have expected.  The problem is definitely with the FX2 
firmware, not the driver.

  -Mike



More information about the pvrusb2 mailing list