[mythtv] [PATCH] Re: ivtv settings patch (revisited)

Ken Bass kbass at kenbass.com
Wed Oct 22 17:17:40 EDT 2003


On Tue, 23 Sep 2003 21:24:28 -0400, Isaac Richards <ijr at po.cwru.edu> wrote:

>On Tuesday 23 September 2003 12:56 am, Geoffrey Hausheer wrote:
>> Okay, here is a good version of the patch.  I had screwed up the mapping
>> for the stream type in the previous patch.  It worked okay in some
>> settings, but not in others.  Should be all better now.
>
>Works well for me, I just committed this.
>
>Isaac

Release 0.12 doesn't work with my PVR-250. I tried many things to debug this
including changing from a Redhat 9.0 kernel to a kernel.org 2.4.22 with
bytesex.org v4l2 patch. I always had odd 'ioctl unknown errors' but 0.11
didn't care.

After debugging some here is what I've found:
a) mpegrecorder.cpp tries to set the audio volume of the PVR-250 (mythtv
0.11 didn't do this). If it fails, it returns. This causes a 'black' screen.
b) myth is using local 'videodev_myth.h' and 'videodev2_myth.h' include
files instead of those installed by the bytesex.org patches. I guess this is
to support those running kernels that don't apply the official patches, but
it certainly caused me hours of confusion.
c) The constants used in videodev2_myth.h do not match the bytesex.org
patches which causes the ioctls to fail when setting the audio volume using
the VIDIOC_S_CTRL ioctl. For example,

current v4l2 videodev2.h:
#define VIDIOC_S_CTRL           _IOWR ('V', 28, struct v4l2_control)

and it defines

/* for compatibility, will go away some day */
#define VIDIOC_S_CTRL_OLD       _IOW  ('V', 28, struct v4l2_control)

However, videodev2_myth.h defines:
#define VIDIOC_S_CTRL           _IOW  ('V', 28, struct v4l2_control)

This causes the ioctl number to be different between the ivtv driver and
what mythtv is passing to the driver.

There are a few ways to fix this. I patched ivtv-api.c. Where it says:

'case VIDIOC_S_CTRL:'  

I changed it to:

'case VIDIOC_S_CTRL:
 case VIDIOC_S_CTRL_OLD:'  

and I rebuilt/reinstalled IVTV. Per IVTV instructions I use videodev2.h from
the kernel, not the old one that comes with IVTV. 


More information about the mythtv-dev mailing list