[pvrusb2] WinTV PVR USB2 with Beagleboard driver

Mike Isely isely at isely.net
Mon Dec 21 23:07:42 CST 2009


On Thu, 17 Dec 2009, marco at panzanella.net wrote:

>    I am getting closer.  There is pre-compiled modules in the angrstrom
>    archives for this board.  My problem is that I only copied the
>    pvrusb2.ko file instead of using tar on the modules file from the root
>    directory.  I did that for my kernel version and the driver seems to
>    load fine.  I have a /dev/video0 device now.  I can also copy from this
>    device to a file but only get static so far.
> 
>    One thing that I have found is that I occassionally get the following:
> 
>    [ 2452.706542] usb 1-2.3: firmware: requesting v4l-cx2341x-enc.fw
>    [ 2452.856628] pvrusb2: ***WARNING*** Device encoder firmware seems to be missing.
>    [ 2452.864746] pvrusb2: Did you install the pvrusb2 firmware files in their proper location?
>    [ 2452.876617] pvrusb2: request_firmware unable to locate encoder file v4l-cx2341x-enc.fw

This is a significant problem.  If the encoder firmware can't be found 
(and that IS what is happening here), then the encoder won't work.  For 
a hybrid Hauppauge device (e.g. HVR-1950) this problem should still 
allow digital (e.g. ATSC reception) mode to work since in that case the 
encoder is not required.  But other than that the device is crippled.

The pvrusb2 driver, a long time ago, used to always require loading of 
this firmware when the device is initialized.  Today that's no longer 
the case.  I did this as part of the changes to support digital mode.  
Today the driver can load this firmware on-the-fly only at the point 
when it's actually needed.  Thus you can actually get all the way 
through the device initialization (and see a /dev/video0) before the 
driver discovers that this encoder firmware is missing.

> 
>    I did follow your setup file to copy the firmware (downloaded) of the
>    PVR USB2 device to /lib/firmware:
> 
>    root at beagleboard:~# ls /lib/firmware/v4l-*
>    144 /lib/firmware/v4l-cx23418-apu.fw  156
>    /lib/firmware/v4l-cx2341x-init.mpg
>    160 /lib/firmware/v4l-cx23418-cpu.fw   16 /lib/firmware/v4l-cx25840.fw
>     16 /lib/firmware/v4l-cx23418-dig.fw    8
>    /lib/firmware/v4l-pvrusb2-24xxx-01.fw
>    260 /lib/firmware/v4l-cx2341x-dec.fw    8
>    /lib/firmware/v4l-pvrusb2-29xxx-01.fw
>    376 /lib/firmware/v4l-cx2341x-enc.fw

What I believe I said in the setup documentation was that the correct 
location in which to load the firmware files is distribution-dependant.  
When the pvrusb2 driver requests, say, "v4l-cx2341x-enc.fw" it is 
actually asking another kernel subsystem to load a file of that name 
into kernel space (whereupon the driver copies the bytes out to the 
hardware).  The driver is unaware and doesn't care where the file 
actually lives.  It's up to a collaboration between that kernel facility 
and a user space daemon (e.g. udev) to figure that out.  This is why the 
location is really a distribution dependant thing.  I can tell you where 
Debian expects firmware files (and I did list examples in the 
documentation) but that is no guarantee that other distributions use the 
same scheme.


> 
>    I have udev and the firmware.sh file has two directories, one of them
>    being /lib/firmware.  So I don't know why the driver can't find the
>    firmware file.  Is there a better way to test why it can't find the
>    file?  I did copy ALL the firmware files to this directory (as you can
>    see above) so I shouldn't be missing a supporting file either.  Do I
>    need to make these executable or something else?

What is firmware.sh?

The driver asks another kernel facility ("firmware_class"?) to load the 
file.  That facility makes a request to user space, and it is a utility 
in user space that actually "finds" the file.  If the file isn't being 
found then I would guess that you're either putting it in the wrong 
place for your distribution or there is some misconfiguration or missing 
aspect / package in your distribution.

That probably doesn't help very much :-(  Unfortunately I know little 
(actually nothing at all) about the distribution you are using.

If / when you do solve this, please do post your solution here so that 
others can hopefully benefit from your digging on this.

  -Mike


-- 

Mike Isely
isely @ isely (dot) net
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8


More information about the pvrusb2 mailing list