[pvrusb2] Tuner problems with recent driver snapshots

Mike Isely isely at isely.net
Sun Jan 1 14:24:06 CST 2006


On Sun, 1 Jan 2006, Per Christian Henden wrote:

> Hi,
>
> I've been using the snapshot from 20051208 with kernel 2.6.14 for a while,
> which worked great. I recently upgraded to snapshot 20051231, and both with
> and without tda9887 loaded (port2=0 or not), no channels work, the tuning
> looks off [1].
>
> When I reinstall the old driver snapshot, everything works again.
> The 20051226 snapshot has the same problem.
>
> How can I help fix this?
>
> I'm using ubuntu breezy-current on ppc32.
>
> [1] http://www.pvv.org/~perchrh/tv-20051231A.mpg

Yuck.  I was expecting subtle problems.  I wonder if I did something bad 
that is endian sensitive.  None of the changes should have been endian 
related.

Well let's start by turning on lots of debug tracing.  The possible flags 
are defined in pvrusb2-debug.h.  I recommend turning on PVR2_TRACE_I2C_CMD 
and PVR2_TRACE_I2C_CORE, which enable log messages related to the new 
logic.

You can turn on those debug flags using one of three methods:

1. You can edit pvrusb2-main.c and just 'or' them into the 
DEFAULT_DEBUG_MASK symbol.

2. You can specify a complete debug mask as a module parameter but you'll 
have to manually reload pvrusb2.ko to do this (i.e. "modprobe -r pvrusb2; 
modprobe pvrusb2 debug=<some wierd number>".

3. You can modify the debug mask in real time by writing the new value 
into /sys/modules/pvrusb2/parameters/debug.

Methods 2 & 3 work with decimal values, though the debug variable is 
really a giant bit mask.  So you'll have to do some hex <-> decimal 
conversions here.  You can just cat out that sysfs file 
/sys/modules/pvrusb2/parameters/debug to see what the current mask looks 
like.

It'd probably just be easiest to edit pvrusb2-main.c and add in the new 
flags there.  In this way we'll be able to easily see the entire 
initialization sequence.

Another thing you can do right away is to cat out a debuginfo variable in 
sysfs.  Do this:  "cat /sys/class/pvrusb2/sn-*/debuginfo"  This will dump 
some general information about the driver's state; with the new snapshot 
you'll also get a list of the attached I2C modules and an indication of 
their ID and the type of commands that the driver plans on sending to 
each.  This dump is fairly short.

   -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