[pvrusb2] No data from HVR-1900 encoder

Mike Isely isely at isely.net
Thu Jun 16 17:10:34 CDT 2011


See below...

On Thu, 16 Jun 2011, Magnus Ekhall wrote:

> Hello,
> 
> I'm using the pvrusb2 driver (excellent work by the way!) to use a
> Hauppauge HVR-1900 model 73xxx.
> 
> The driver identifies the tuner (TDA18271HD/C2), the demodulator
> (cx25840) at boot and generally everything works great.
> 
> However approx. once per week something odd happens. When mythtv tries
> to use the analogue tuner there is no data coming out of /dev/video0.
> 
> Not even if I cat /dev/video0 I get anything in that case.

Those two symptoms are consistent - if cat doesn't work then mythtv 
won't be able to stream from it either.


> 
> I've even tried to reload the pvrusb2 driver and yanking the USB-cable.
> 
> The only thing that works is a reboot.

Power-cycling just the tuner *should* also clear things up.  But you 
should not even need to do that.  Read further...


> 
> Now, that sounds a bit like the mystery bug written on the FAQ, but I'm
> not sure.
> 
> Also, I know that pvrusb2 is sort of a higher level driver which uses
> sub-drivers, so maybe I'm at the wrong forum here...
> 
> Anyway, the problem is really annoying, so any input is most welcome!
> 
> In the kernel log there are a message that I believe might have
> something to do with the issue:
> 
> "
> May  1 08:49:33 digimatrix kernel: [383494.928478] pvrusb2:
> ***WARNING*** device's encoder appears to be stuck (status=0x00000003)
> May  1 08:49:33 digimatrix kernel: [383494.928485] pvrusb2: Encoder
> command: 0x81
> May  1 08:49:33 digimatrix kernel: [383494.928489] pvrusb2: Giving up on
> command.  This is normally recovered via a firmware reload and
> re-initialization; concern is only warranted if this happens repeatedly
> and rapidly.
> "

This is a longstanding behavior in the driver.  What's happening here is 
that the pvrusb2 driver has detected that the mpeg encoder chip has 
stopped responding.  That chip is its own processor with a firmware 
program that gets loaded to it.  When (if) it crashes this is the 
result.

The pvrusb2 driver detects this situation and prints the warning to the 
kernel log.  But the recovery is (should be) automatic - other logic in 
the driver then resets the mpeg encoder, sends it a fresh firmware 
image, and restarts it for you.  (Actually what happens is that the 
driver marks internal state to track what it thinks has happened, e.g. 
dead mpeg encoder, and then the driver's normal internal state machine 
just sequences whatever steps it thinks are needed to bring the video 
pipeline back up into a working condition.)  This is normally what is 
supposed to happen.  You should see further messages in the kernel log 
as the driver reinitializes the encoder.  Do you see that?

The "concern" mentioned there is if the recovery is attempted and then 
the chip immediately crashes again (or perhaps just fails to start).  
"Normally" that never happens.  Of course if the hardware is misbevaing 
or if it is overheating then well anything is possible.


> 
> 
> I don't know how to reload the firmware and do a re-initialization. I
> assume a modprobe -r would do that? In that case this does not help me.

If the hardware is truly fouled up, then reloading the driver might not 
help.  But power-cycling the tuner would probably clear it up.  But the 
driver should be recovering this for you automatically...

  -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