[pvrusb2] mythtv and pvrusb2

Mike Isely isely at isely.net
Tue Jul 11 09:25:02 CDT 2006


The issue I'm thinking about here has to do with a change made to the 
pvrusb2 driver in early June.  I reworked the implementation of the 
VIDIOC_S_FMT ioctl() such that the pvrusb2 driver now honors the 
resolution requested via this command.  Previously it "sort of" did this, 
but it was basically broken such that the effect of the call was to do 
nothing.

Since this change:

I've received one report of xawtv 3.x (note: NOT xawtv 4.x - which works 
fine) commanding a bizarre resolution via this call that had the effect of 
trashing the video.  (The person in this case was using xawtv 3.x to 
control the driver while running mplayer at the same time to view the 
video, since xawtv 3.x by itself can't render mpeg2 video data.)

This message thread here seems to describe a scenario where MythTV might 
be doing something to the driver that is corrupting the video in a similar 
manner - which leads me to suspect that the capture resolution set in 
MythTV might be something bizarre.  Either that or a strange behavior in 
MythTV is now affecting the pvrusb2 driver via this changed VIDIOC_S_FMT 
implementation.  This is why I'm asking here that the resolution be 
checked and that it be looked at AFTER MythTV touches the driver.

Last night I got a report of success:  In this case MythTV is working fine 
with the driver PLUS the user is able to adjust the capture resolution 
from within MythTV and the desired effect happens.  This is exactly what 
that change to VIDIOC_S_FMT was supposed to do.  So it would seem to rule 
out the possibility that MythTV might be doing something strange with 
VIDIOC_S_FMT.

Right now, my conclusion is that the pvrusb2 driver is doing things 
correctly and that the problem is rooted in a bad capture resolution set 
within MythTV.  I'd _really_ like to know if this is the case.  So, Renan, 
what capture resolution do you have set, and please read it back via sysfs 
AFTER MythTV has touched the driver (e.g. check the setting while viewing 
live TV).

Clearly there is an unanswered question of how a "bad" resolution can 
trash the video.  That's something I have to investigate.  But it is still 
important to understand if the problem described below is in fact due to a 
strange resolution being set.

I would also very much like to hear from anyone else using the pvrusb2 
driver with MythTV, where the driver version is from the kernel, from V4L, 
or is a standalone snapshot from mid-June onward (tell me which snapshot). 
So, anyone?

   -Mike


On Sun, 9 Jul 2006, Mike Isely wrote:

> On Wed, 5 Jul 2006, Renan Yson wrote:
>
>> thanks for the quick reply!
>>
>>> Which snapshot are you running?
>>
>> i was using the 20060702 snapshot.
>>
>>> After mythtv runs, examine the vertical & horizontal resolution settings
>>> (ctl_resolution_hor and ctl_resolution_ver) for the driver.  For NTSC
>>> these will start off as 720x480, but I wonder if MythTV might be messing
>>
>> i did check this using pvrui.sh in the utils subdirectory and it was
>> set to 720x480. i also check the ctl_resolution_(ver/hor) and they
>> were set to 720x480.
>
> Yes, but was this before or after mythtv touched the driver?
>
> (And running pvrui.sh is just a wrapper around the stuff in /sys so just
> dumping the control variables directly does the same thing.)
>
>
>>
>>> to 720x480.  Failing that, then fall back to the 20060607 snapshot, which
>>> was the last snapshot before this change was made - AND please tell me
>>> about this so when I return on Sunday I can look at this situation again.
>>
>> i reverted back to the 20060607 snapshot, and IT WORKED!
>
> OK, this is a very useful piece of information.  But I still need to know
> if that 720x480 you got back was before or after mythtv attempted to use
> the driver.  I need to know what you got there _after_ mythtv touched it.
> I'm guessing that it will be some kind of messed up resolution.
>
> Can anyone else try this?  Unfortunately right now I'm not set up for this
> test (I usually test with mplayer and xawtv 4.x which of course work fine
> with the latest snapshot).
>
>>
>> thanks a lot for all the help! i'm now a happy user of the pvrusb2 driver.
>>
>> in case you want to add my unit to your survey, at the back is written
>> 24012 Rev D2A3 NTSC/NTSC-J
>
> I'll add it.  Thanks.
>
>   -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