[pvrusb2] A bit of advice

Mike Isely isely at isely.net
Tue Feb 14 07:52:14 CST 2006


Two problems here.

First, you can't run mplayer in v4l mode.  If you do that, then mplayer 
thinks it is talking to a dumb frame buffer device, which this is not, and 
won't recognize the mpeg2 format of the data coming from the driver. 
Just run mplayer as if you were trying to play an mpeg2 file but instead 
use /dev/video0 as the "file".  This is discussed on the pvrusb2 page 
(just search for mplayer).

Second, what kernel version are you running and which tveeprom did you use 
(kernel or from the driver)?  The reason for the unknown tuner type is 
this:

> Feb 14 11:21:04 gruzis tveeprom: tuner = LG S001D MK3 (idx = 60, type = 4)

The driver reads a Hauppauge specific tuner type out of the device's 
eeprom and then attempts to map that to a V4L specific tuner type.  In 
this case it mapped Hauppauge type 60 to V4L type 4, and type 4 in V4L 
means "unknown".  So the mapping failed.  This might be fixable by going 
to a later kernel versio or trying the tveeprom.ko from the driver 
snapshot.

   -Mike


On Tue, 14 Feb 2006, ervins at latnet.lv wrote:

>
> Hi All,
>
> I have PVR USB2 and am ytuing to get it working on linux box. I'm running Gentoo
> linux with kernel 2.6.13. The driver itself compiled ok and hotplug is detecting
> the card successfully. Everything looks fine except I cannod get any output what
> so ever from the card. I'm trying to play /dev/video0 using mplayer and all i
> get is :
>
> v4l2: current audio mode is : STEREO
> v4l2: ioctl request buffers failed: Invalid argument
> v4l2: 0 frames successfully processed, 0 frames dropped.
>
> When I plug in the device i get the following messages:
>
> Feb 14 11:21:01 gruzis usb 1-2: new high speed USB device using ehci_hcd and
> address 3
> Feb 14 11:21:01 gruzis Linux video capture interface: v1.00
> Feb 14 11:21:01 gruzis pvrusb2 pvr_init
> Feb 14 11:21:01 gruzis pvrusb2 pvr2_hdw_create: hdw=e98eb000
> Feb 14 11:21:01 gruzis pvrusb2 Driver unit number is 0, name is pvrusb2_a
> Feb 14 11:21:01 gruzis pvrusb2 subsys_stream_mask: 0x1e
> Feb 14 11:21:01 gruzis pvrusb2 pvr2_hdw_setup(hdw=e98eb000) begin
> Feb 14 11:21:01 gruzis pvrusb2 pvr2_upload_firmware1
> Feb 14 11:21:01 gruzis pvrusb2 pvr_probe(pvr=f71983c0)
> Feb 14 11:21:01 gruzis usbcore: registered new driver pvrusb2
> Feb 14 11:21:01 gruzis /root/prv/pvrusb2-mci-20060121/driver/pvrusb2-main.c:
> Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner : 20060121 (from www.isely.net)
> Feb 14 11:21:01 gruzis /root/prv/pvrusb2-mci-20060121/driver/pvrusb2-main.c:
> Debug mask is 16834943 (0x100e17f)
> Feb 14 11:21:01 gruzis pvrusb2 cpureset_assert(1)
> Feb 14 11:21:01 gruzis pvrusb2 Upload done, releasing device's CPU
> Feb 14 11:21:01 gruzis pvrusb2 cpureset_assert(0)
> Feb 14 11:21:01 gruzis pvrusb2 Upload done (8192 bytes sent)
> Feb 14 11:21:01 gruzis pvrusb2 pvr2_hdw_setup(hdw=e98eb000) done, ok=1 init_ok=0
> Feb 14 11:21:01 gruzis pvrusb2 Device microcontroller firmware (re)loaded; it
> should now reset and reconnect.
> Feb 14 11:21:01 gruzis usb 1-2: USB disconnect, address 3
> Feb 14 11:21:01 gruzis pvrusb2 pvr_disconnect(pvr=f71983c0) BEGIN
> Feb 14 11:21:01 gruzis pvrusb2 pvr2_hdw_disconnect(hdw=e98eb000)
> Feb 14 11:21:01 gruzis pvrusb2 pvr2_hdw_remove_usb_stuff: hdw=e98eb000
> Feb 14 11:21:01 gruzis pvrusb2 render_useless
> Feb 14 11:21:01 gruzis pvrusb2 pvr2_hdw_destroy: hdw=e98eb000
> Feb 14 11:21:01 gruzis pvrusb2 pvr_disconnect(pvr=f71983c0) DONE
> Feb 14 11:21:03 gruzis usb 1-2: new high speed USB device using ehci_hcd and
> address 4
> Feb 14 11:21:03 gruzis pvrusb2 pvr2_hdw_create: hdw=e98eb000
> Feb 14 11:21:03 gruzis pvrusb2 Driver unit number is 0, name is pvrusb2_a
> Feb 14 11:21:03 gruzis pvrusb2 subsys_stream_mask: 0x1e
> Feb 14 11:21:03 gruzis pvrusb2 pvr_probe(pvr=f724e040)
> Feb 14 11:21:03 gruzis pvrusb2 pvr2_hdw_setup(hdw=e98eb000) begin
> Feb 14 11:21:03 gruzis pvrusb2 Performing a device reset...
> Feb 14 11:21:03 gruzis usb 1-2: reset high speed USB device using ehci_hcd and
> address 4
> Feb 14 11:21:03 gruzis pvrusb2 i2c_attach [client=tveeprom @ 0x50 ctxt=ee62eac0]
> Feb 14 11:21:03 gruzis : chip found @ 0xc2 (pvrusb2_a)
> Feb 14 11:21:03 gruzis pvrusb2 i2c_attach [client=(tuner unset) @ 0x61
> ctxt=ee62e520]
> Feb 14 11:21:03 gruzis msp34xx: init: chip=MSP3415G-B8 +nicam +simple +simpler
> +radio mode=simpler
> Feb 14 11:21:03 gruzis msp34xxg: daemon started
> Feb 14 11:21:03 gruzis pvrusb2 i2c_attach [client=MSP3415G-B8 @ 0x40
> ctxt=e9aba5e0]
> Feb 14 11:21:03 gruzis tda9885/6/7: chip found @ 0x86
> Feb 14 11:21:03 gruzis pvrusb2 i2c_attach [client=tda9887 @ 0x43 ctxt=e9aba580]
> Feb 14 11:21:03 gruzis pvrusb2 pvr2_upload_firmware2
> Feb 14 11:21:03 gruzis pvrusb2 Requesting uproc soft reset
> Feb 14 11:21:03 gruzis pvrusb2 Requesting uproc hard reset
> Feb 14 11:21:04 gruzis pvrusb2 upload of pvrusb2.f2 : 262144 / 262144
> Feb 14 11:21:04 gruzis tveeprom: Hauppauge: model = 29039, rev = D160, serial# =
> 8040319
> Feb 14 11:21:04 gruzis tveeprom: tuner = LG S001D MK3 (idx = 60, type = 4)
> Feb 14 11:21:04 gruzis tveeprom: tuner fmt = PAL(D/K) (eeprom = 0x74, v4l2 =
> 0x00400e17)
> Feb 14 11:21:04 gruzis tveeprom: audio_processor = MSP3415 (type = 6)
> Feb 14 11:21:04 gruzis pvrusb2 eeprom detected v4l tveeprom module
> Feb 14 11:21:04 gruzis pvrusb2 eeprom direct call results:
> Feb 14 11:21:04 gruzis pvrusb2 has_radio=1
> Feb 14 11:21:04 gruzis pvrusb2 tuner_type=4
> Feb 14 11:21:04 gruzis pvrusb2 tuner_formats=0x400e17
> Feb 14 11:21:04 gruzis pvrusb2 audio_processor=6
> Feb 14 11:21:04 gruzis pvrusb2 model=29039
> Feb 14 11:21:04 gruzis pvrusb2 revision=9508240
> Feb 14 11:21:04 gruzis pvrusb2 serial_number=8040319
> Feb 14 11:21:04 gruzis pvrusb2 rev_str=D160
> Feb 14 11:21:04 gruzis pvrusb2 Detected video standard PAL-BG (from eeprom)
> Feb 14 11:21:04 gruzis pvrusb2 Detected video standard PAL-I (from eeprom)
> Feb 14 11:21:04 gruzis pvrusb2 Detected video standard SECAM-L (from eeprom)
> Feb 14 11:21:04 gruzis pvrusb2 Setting initial video standard to PAL-BG
> (detected from eeprom)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Brightness" <-- 128
> (<integer>)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Contrast" <-- 68
> (<integer>)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Saturation" <-- 64
> (<integer>)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Volume" <-- 65535
> (<integer>)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Audio Bitrate" <-- 3
> (224kb/s)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Audio CRC" <-- 1
> (<integer>)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Average video bitrate" <--
> 6000000 (<integer>)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Peak video bitrate" <--
> 6000000 (<integer>)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Video Standard" <-- 1
> (PAL-BG)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Audio Mode" <-- 1 (Stereo)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Tuner Frequency (Hz)" <--
> 175250000 (<integer>)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Horizontal capture
> resolution" <-- 720 (<integer>)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Vertical capture
> resolution" <-- 480 (<integer>)
> Feb 14 11:21:04 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Audio Layer" <-- 2
> (<integer>)
> Feb 14 11:21:04 gruzis pvrusb2 Probed: ctxt=ee62eac0 ctl_mask=0x2f tveeprom @
> 0x50 [v4l2_standard v4l2_bcsh v4l2_volume v4l2_freq v4l2_size]
> Feb 14 11:21:04 gruzis pvrusb2 i2c 0x61 tuner handler set up
> Feb 14 11:21:04 gruzis pvrusb2 Probed: ctxt=ee62e520 ctl_mask=0x2f (tuner unset)
> @ 0x61 (handler: pvrusb2-tuner) [v4l2_standard v4l2_bcsh v4l2_volume v4l2_freq
> v4l2_size]
> Feb 14 11:21:04 gruzis pvrusb2 i2c 0x40 msp3400 V4L1 handler set up
> Feb 14 11:21:04 gruzis pvrusb2 Probed: ctxt=e9aba5e0 ctl_mask=0x1c0 MSP3415G-B8
> @ 0x40 (handler: pvrusb2-audio) [v4l1_standard v4l1_volume v4l1_freq]
> Feb 14 11:21:04 gruzis pvrusb2 i2c 0x43 tda9887 V4L2 handler set up
> Feb 14 11:21:04 gruzis pvrusb2 Probed: ctxt=e9aba580 ctl_mask=0x2f tda9887 @
> 0x43 (handler: pvrusb2-demod) [v4l2_standard v4l2_bcsh v4l2_volume v4l2_freq
> v4l2_size]
> Feb 14 11:21:04 gruzis pvrusb2 i2c tuner set_type(4)
> Feb 14 11:21:04 gruzis pvrusb2 i2c msp3400 set_stereo
> Feb 14 11:21:04 gruzis pvrusb2 i2c demod set_config(0x0)
> Feb 14 11:21:04 gruzis pvrusb2 i2c v4l2 set_standard(1)
> Feb 14 11:21:04 gruzis tuner 5-0061: tuner type not set
> Feb 14 11:21:04 gruzis pvrusb2 i2c v4l2 set_bcsh b=128 c=68 s=64 h=0
> Feb 14 11:21:04 gruzis pvrusb2 i2c v4l2 set_volume(vol=65535 bal=0 bas=0 treb=0
> mute=0)
> Feb 14 11:21:04 gruzis pvrusb2 i2c v4l2 set_freq(175250000)
> Feb 14 11:21:04 gruzis tuner 5-0061: tuner type not set
> Feb 14 11:21:04 gruzis pvrusb2 i2c v4l2 set_size(720x576)
> Feb 14 11:21:04 gruzis pvrusb2 i2c v4l1 set_standard(1)
> Feb 14 11:21:04 gruzis pvrusb2 i2c v4l1 set_volume(vol=65535 bal=0 bas=0 treb=0
> mute=0)
> Feb 14 11:21:04 gruzis pvrusb2 i2c v4l1 set_freq(175250000)
> Feb 14 11:21:04 gruzis pvrusb2 pvr2_stream_create: sp=e9a29c00
> Feb 14 11:21:04 gruzis pvrusb2 pvr2_hdw_setup: video stream is e9a29c00
> Feb 14 11:21:04 gruzis pvrusb2 pvr2_hdw_setup(hdw=e98eb000) done, ok=1 init_ok=1
> Feb 14 11:21:04 gruzis pvrusb2 Device initialization completed successfully.
> Feb 14 11:21:04 gruzis pvrusb2 Registered pvrusb2 v4l device, minor=0
>
>
> The line that bothers me is:
> Feb 14 11:21:04 gruzis tuner 5-0061: tuner type not set
>
> It looks like pvr driver did not tell tuner type to v4l tuner driver?
> Anyway, when I try to play something from /dev/video0 i see in the log:
>
>
> Feb 14 11:22:05 gruzis pvrusb2 pvr2_v4l2_do_ioctl failure, ret=-22
> cmd=-1069525479 (0xc0405619)
> Feb 14 11:22:05 gruzis pvrusb2 pvr2_v4l2_do_ioctl failure, ret=-22
> cmd=-1068739046 (0xc04c561a)
> Feb 14 11:22:05 gruzis pvrusb2 pvr2_v4l2_do_ioctl failure, ret=-22
> cmd=-1069525502 (0xc0405602)
> Feb 14 11:22:05 gruzis pvrusb2 pvr2_v4l2_do_ioctl failure, ret=-22
> cmd=-1069525479 (0xc0405619)
> Feb 14 11:22:05 gruzis pvrusb2 /*--TRACE_COMMIT--*/ "Video Standard" <-- 0
> (NTSC-M)
> Feb 14 11:22:05 gruzis pvrusb2 i2c v4l2 set_standard(0)
> Feb 14 11:22:05 gruzis tuner 5-0061: tuner type not set
> Feb 14 11:22:05 gruzis pvrusb2 i2c v4l2 set_size(720x480)
> Feb 14 11:22:05 gruzis pvrusb2 i2c v4l1 set_standard(0)
> Feb 14 11:22:05 gruzis pvrusb2 pvr2_v4l2_do_ioctl failure, ret=-515
> cmd=-1072409080 (0xc0145608)
>
> And it tells that video standard it NTSC even tho I specified norm=1 (PAL-BG) on
> mplayer command line.
>
>
> Any Ideas how to get around this one?
> Thank you!
>
>
> Ervins
>
>
>
>

-- 
                         |         Mike Isely          |     PGP fingerprint
      Spammers Die!!     |                             | 03 54 43 4D 75 E5 CC 92
                         |   isely @ pobox (dot) com   | 71 16 01 E2 B5 F5 C1 E8
                         |                             |


More information about the pvrusb2 mailing list