[pvrusb2] initialization of video_gop_size

Mike Isely isely at isely.net
Sun Jun 22 13:43:13 CDT 2008


On Sun, 22 Jun 2008, Dan Bodoh wrote:

> I've just submitted a bug to mythtv
> (http://svn.mythtv.org/trac/ticket/5462) regarding the display of the
> recording length of the show.  I'm not sure if this is a mythtv bug, a
> pvrusb2 bug, a cx2341x bug, or some combination.
> 
> It appears that cx2341x initializes the video_gop_size to 12, and it
> is never changed by the kernel version of pvrusb2 or mythtv (unless
> its changed by the user).
> 
> I've inspected pvrusb2-mci-20080210/driver/pvrusb2-encoder.c.  There's
> two different pvr2_encoder_configure() selected by the macro
> PVR2_ENABLE_CX2341XMOD.    When the macro *is not* defined, pvrusb2
> sets the video_gop_size based to 15 for NTSC, and 12 otherwise.  If
> the macro *is* defined, the video_gop_size is not explicitly set, so
> the cx2341x module's default of 12 is in force.

The macro gets defined in build environments where cx2341x is known to 
exist.  It is definitely preferable to use the cx2341x module where 
possible, but the standalone driver also supports older kernel versions 
where the module is not present.  In those cases PVR2_ENABLE_CX2341XMOD 
is not turned on and the pvrusb2 driver handles the encoder on its own.

If you're running in kernel 2.6.18 or later, OR if you are building 
the standalone driver against v4l-dvb, then use of the cx2341x module is 
enabled.  Otherwise it's all internal to the pvrusb2 driver.

The version of the pvrusb2 driver inside v4l-dvb (and therefore also the 
version resident in the kernel) relies entirely on the cx2341x module 
and lacks this additional old-kernel-compatibility logic.


> 
> Should pvrusb2-encoder.c be setting this value to 15 for NTSC?  Is 12
> a legal value for NTSC?  Or should the default be set correctly in the
> cx2341x module?

The pvrusb2 driver internally is doing what it is doing because, well, 
it's been doing that since basically the beginning of time for the 
driver.  However that's only there for older kernels and has no effect 
if you're using cx2341x which normally you will be using.  So I'd be 
looking at cx2341x.  Alternatively, the pvrusb2 driver could be feeding 
incorrect control input to the cx2341x module.


> 
> It appears the ivtv driver for my old pvr-350 set it correctly to 15.

The ivtv driver also should be using cx2341x....

  -Mike


-- 

Mike Isely
isely @ pobox (dot) com
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8


More information about the pvrusb2 mailing list