[pvrusb2] testing pvrusb2

Mike Isely isely at isely.net
Mon Nov 6 01:59:42 CST 2006


On Sun, 5 Nov 2006, Abe Shan wrote:

> Mike,
> 
> Thanks for the tips.
> 
> To focus the attention on testing pvrusb2, I compiled and tested xawtv-4.x.
> 
> Unfortunately, there still seems to be some trouble. Should the encoder
> light up when using scantv?

It should only light up when actually streaming.  I don't know if scantv 
attempts to read video data.  (It's been too long since I did this last 
and I don't remember.)


> > scantv
> using device "Hauppauge WinTV pvr-usb2"
> using input "composite"

That's not right.  The input should be the tuner, i.e. "television".  
There's nothing to "scan" when you're connected to the composite input :-)


> using TV norm "NTSC-M"
> using frequency table "us-cable"
> 
> Anyway, when I proceed with xawtv, the /var/log/messages registers the
> following error.
> Nov  5 21:38:59 shafran kernel: [ 1421.470668] pvrusb2: ***WARNING***
> device's encoder appears to be stuck (status=000000003)
> Nov  5 21:38:59 shafran kernel: [ 1421.470675] pvrusb2: Encoder command:
> 0x81
> Nov  5 21:38:59 shafran kernel: [ 1421.470677] pvrusb2: Giving up waiting.
> It is likely that this is a bad idea...
> Nov  5 21:38:59 shafran kernel: [ 1421.470681] pvrusb2: Error recovery
> initiatedNov  5 21:38:59 shafran kernel: [ 1421.470683] pvrusb2: Retrying
> device reconfiguration

This is unfortunately not out of the ordinary.  It might not be related to 
the scanning problem you are having.

The pvrusb2 driver executes a sort of a handshake protocol when talking to 
the encoder chip (the part of the device creating the mpeg2 stream).  The 
protocol involves the driver setting a few shared memory locations then 
setting some bits in a control register that causes the encoder to execute 
the requested command.  Some time later the encoder is supposed to finish 
that command and respond with some status bits, which the pvrusb2 driver 
will be polling for.  Every once in a while the encoder fails to respond.  
When that happens you get the message above, after the pvrusb2 driver 
gives up waiting.  The pvrusb2 driver recovers this situation by resetting 
the encoder, reloading its firmware, and reinitializing its configuration.  
The whole sequence takes on the order of a second and except for these log 
messages would be hardly noticed.  This only seems to happen when 
streaming is started (not while it is underway) so it never disrupts a 
running video stream.  Anyway, the driver can usually recover this 
situation.  Though I don't really like the fact that this happens, I 
should probably tone down the messages in the log.


> 
> Then, when I try to use the 'scan analog' in edit, the program seg-faults.
> Have you seen this before?

No, I haven't seen a seg-fault during scan.  But I'm running an older 
snapshot of that program (and it's been a long time since I did a scan) so 
we might not be doing an apples-apples comparison here.  I'm not going to 
get a chance to try to reproduce this until at least Tuesday night.  It'd 
be great if someone else here using xawtv could perhaps chip in here.

  -Mike


-- 
                        |         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