NSLU2-Linux
view · edit · print · history

SlugOS.InstallWinTVPVRUSB2 History

Hide minor edits - Show changes to markup

December 04, 2006, at 06:56 PM by Chacko --
Added lines 4-7:

  • Q: 2006.12.04* Somebody can confirm if this is aleardy in 3.10 shipped? Is this procedure neeed any more? [Chacko]

August 07, 2006, at 06:10 PM by eFfeM --
Changed lines 17-30 from:

Just issue the following commands on the slug:

  • cd /lib/modules/2.6.*
  • insmod ./kernel/drivers/media/video/v4l1-compat.ko
  • insmod ./kernel/drivers/media/video/v4l2-common.ko
  • insmod ./kernel/drivers/media/video/videodev.ko
  • insmod ./kernel/drivers/base//firmware_class.ko
  • insmod ./kernel/drivers/media/video/msp3400.ko
  • insmod ./kernel/drivers/media/video/saa7115.ko
  • insmod ./kernel/drivers/media/video/tveeprom.ko
  • insmod ./kernel/drivers/media/video/tuner.ko
  • insmod ./kernel/drivers/usb/media/pvrusb2.ko
  • depmod -a
to:

Just issue the following command on the slug:

depmod -a

August 05, 2006, at 07:51 PM by eFfeM --
Changed lines 6-7 from:

The Hauppauge WinTV PVR USB2 is an analog USB TV card that outputs MPEG2?. It is available in several different hardware variants. This driver aims to work for all variants. More information can be found at http://www.isely.net/pvrusb2/pvrusb2.html

to:

The Hauppauge WinTV PVR USB2 is an analog USB TV card that outputs MPEG2. It is available in several different hardware variants. This driver aims to work for all variants. More information can be found at http://www.isely.net/pvrusb2/pvrusb2.html

August 05, 2006, at 07:51 PM by eFfeM --
Changed lines 1-2 from:

Work in progress ... This is supported on the current development head.

to:

This is supported on the current development head and will be in the next SlugOS release. Work is in progress to make this available under SlugOS 3.10

Added lines 6-7:

The Hauppauge WinTV PVR USB2 is an analog USB TV card that outputs MPEG2?. It is available in several different hardware variants. This driver aims to work for all variants. More information can be found at http://www.isely.net/pvrusb2/pvrusb2.html

Changed lines 29-30 from:
  • depmod -a
to:
  • depmod -a
Changed lines 74-81 from:

After doing this you might want to do a dmesg | tail and check for the following lines at the end:
pvrusb2 /*--TRACE_COMMIT--*/ "Channel" <-- 0 (<integer>)
pvrusb2 /*--TRACE_COMMIT--*/ "Channel Program ID" <-- 0 (<integer>)
pvrusb2 pvr2_stream_create: sp=c0ff4960
pvrusb2 pvr2_hdw_setup: video stream is c0ff4960
pvrusb2 pvr2_hdw_setup(hdw=c0f6d000) done, ok=1 init_ok=1
pvrusb2 Device initialization completed successfully.
pvrusb2 Registered pvrusb2 v4l device, minor=0\\

to:

After doing this you might want to do a dmesg | tail and check for the following line at the end:
pvrusb2: Device initialization completed successfully.\\

August 05, 2006, at 07:43 PM by eFfeM --
Added lines 1-88:

Work in progress ... This is supported on the current development head.

Installing a Hauppauge WinTV PVR USB2 on SlugOS

Installing the software

Installing the software is simple. As root ust type:
ipkg install pvrusb2-mci

Loading the modules

Assuming all the above succeeded you now need to load all modules on the slug.

Just issue the following commands on the slug:

  • cd /lib/modules/2.6.*
  • insmod ./kernel/drivers/media/video/v4l1-compat.ko
  • insmod ./kernel/drivers/media/video/v4l2-common.ko
  • insmod ./kernel/drivers/media/video/videodev.ko
  • insmod ./kernel/drivers/base//firmware_class.ko
  • insmod ./kernel/drivers/media/video/msp3400.ko
  • insmod ./kernel/drivers/media/video/saa7115.ko
  • insmod ./kernel/drivers/media/video/tveeprom.ko
  • insmod ./kernel/drivers/media/video/tuner.ko
  • insmod ./kernel/drivers/usb/media/pvrusb2.ko
  • depmod -a

Loading the firmware

Next you'll need to extract the firmware. See details at the pvrusb2 Linux driver page. I used fwfind.sh (found in the utils section. The firmware was extracted from wintv_usb2_11_23074.exe. For some reason I had to do fwfind.sh twice to get the firmware files.

Extracting will give you two files: pvrusb2.f1 8192 bytes 8051 program image pvrusb2.f2 262144 bytes mpeg2 encoder image

On the slug, create the directory /lib/firmware and copy the two firmware files to this directory.

Making devices

Next you'll need to make the entries in /dev. I used a script called MAKEDEV.v4l that I got from the Video4Linux sources. However you can easily issue the needed mknod commands yourself. The major device number is 81, and actually you only need /dev/video0. The others (/dev/radio, /dev/vbi, /dev/vtx) are still unexplored territory.

Below is the full listing of major 81 on my system.
lrwxrwxrwx 1 root root 11 Sep 24 12:52 /dev/radio -> /dev/radio0
crw-rw-rw- 1 root root 81, 64 Sep 24 12:52 /dev/radio0
crw-rw-rw- 1 root root 81, 65 Sep 24 12:52 /dev/radio1
crw-rw-rw- 1 root root 81, 66 Sep 24 12:52 /dev/radio2
crw-rw-rw- 1 root root 81, 67 Sep 24 12:52 /dev/radio3
lrwxrwxrwx 1 root root 9 Sep 24 12:52 /dev/vbi -> /dev/vbi0
crw-rw-rw- 1 root root 81, 224 Sep 24 12:52 /dev/vbi0
crw-rw-rw- 1 root root 81, 225 Sep 24 12:52 /dev/vbi1
crw-rw-rw- 1 root root 81, 226 Sep 24 12:52 /dev/vbi2
crw-rw-rw- 1 root root 81, 227 Sep 24 12:52 /dev/vbi3
lrwxrwxrwx 1 root root 11 Sep 24 12:52 /dev/video -> /dev/video0
crw-rw-rw- 1 root root 81, 0 Sep 24 12:52 /dev/video0
crw-rw-rw- 1 root root 81, 1 Sep 24 12:52 /dev/video1
crw-rw-rw- 1 root root 81, 2 Sep 24 12:52 /dev/video2
crw-rw-rw- 1 root root 81, 3 Sep 24 12:52 /dev/video3
lrwxrwxrwx 1 root root 9 Sep 24 12:52 /dev/vtx -> /dev/vtx0
crw-rw-rw- 1 root root 81, 192 Sep 24 12:52 /dev/vtx0
crw-rw-rw- 1 root root 81, 193 Sep 24 12:52 /dev/vtx1
crw-rw-rw- 1 root root 81, 194 Sep 24 12:52 /dev/vtx2
crw-rw-rw- 1 root root 81, 195 Sep 24 12:52 /dev/vtx3

Testing your work

Testing is not very difficult.

  • Power the WinTV PVR USB2 using the supplied PSU. Make sure an antenna is connected with a good signal. Connect the WinTV PVR USB2 via USB to the USB port of a running and booted slug. Hotplug is used to load the modules and firmware, and loading the firmware at slug startup is still untested.
    After doing this you might want to do a dmesg | tail and check for the following lines at the end:
    pvrusb2 /*--TRACE_COMMIT--*/ "Channel" <-- 0 (<integer>)
    pvrusb2 /*--TRACE_COMMIT--*/ "Channel Program ID" <-- 0 (<integer>)
    pvrusb2 pvr2_stream_create: sp=c0ff4960
    pvrusb2 pvr2_hdw_setup: video stream is c0ff4960
    pvrusb2 pvr2_hdw_setup(hdw=c0f6d000) done, ok=1 init_ok=1
    pvrusb2 Device initialization completed successfully.
    pvrusb2 Registered pvrusb2 v4l device, minor=0
    If you got this the hotplugging worked and your driver modules are loaded.
    Next do the following (substituting sn-9508240 with whatever is in your pvrusb2 directory):
  • cd /sys/class/pvrusb2/sn-9508240/ctl_video_standard
  • make sure cur_val has the right value. If not check enum_val for a list of values and do echo newvalue >cur_val
  • cd /sys/class/pvrusb2/sn-9508240/ctl_frequency
  • Find a suitable frequency (not channel!) for your region and type echo frequency >cur_val. Note that frequency is in Hz, so it will look something like 528000000.
  • Type cat /dev/video0 >/tmp/slug.mpg
  • Hit ^C after 10 seconds or so
  • Copy /tmp/slug.mpg to a system where you can watch MPEG video (e.g. your Linux or Windows box) and see if it plays.
view · edit · print · history · Last edited by Chacko.
Originally by eFfeM.
Page last modified on December 04, 2006, at 06:56 PM