
mark.paulus at verizonbusiness
Nov 14, 2007, 8:34 AM
Post #8 of 14
(8977 views)
Permalink
|
|
Re: [ivtv-users] [TEST] Please test my ivtv-i2c tree!
[In reply to]
|
|
Scott Reynolds wrote: > On Nov 13, 2007, at 4:42 PM, Hans Verkuil wrote: > >> I heard more reports about compatibility problems and I traced it to >> some recent videodev changes that break compatibility for kernels < >> 2.6.19. So in order to test this you need a kernel >- 2.6.19. > > I looked into this last week and I'm pretty confident this is just a > bogus version test. If you look at the lines near the errors > mentioned, you'll see a check for kernel 2.6.13; however, struct class > didn't gain .dev_attrs, and hadn't renamed .release to .dev_release, > until 2.6.19. > > If you change both #if LINUX_VERSION_CODE lines from 13 to 19 you'll > get it to compile (with a warning), but there will be another error > v4l1-compat.c that I'm not entirely sure of how to handle. At least on > my system it chokes on the __pure attribute to palette_to_pixelformat(). > > The patch I used to get the latest v4l-dvb to compile is appended. It > seems to work for me but I can't guarantee its correctness, YMMV, etc. > > --scott > > diff -r b9523a14ccea linux/drivers/media/video/v4l1-compat.c > --- a/linux/drivers/media/video/v4l1-compat.c Sun Nov 04 14:34:05 2007 > -0200 > +++ b/linux/drivers/media/video/v4l1-compat.c Wed Nov 07 00:00:45 2007 > -0600 > @@ -145,7 +145,7 @@ const static unsigned int palette2pixelf > [VIDEO_PALETTE_YUV422P] = V4L2_PIX_FMT_YUV422P, > }; > > -static unsigned int __pure > +static unsigned int /* __pure */ > palette_to_pixelformat(unsigned int palette) > { > if (palette < ARRAY_SIZE(palette2pixelformat)) > diff -r b9523a14ccea linux/drivers/media/video/videodev.c > --- a/linux/drivers/media/video/videodev.c Sun Nov 04 14:34:05 2007 > -0200 > +++ b/linux/drivers/media/video/videodev.c Tue Nov 06 19:31:57 2007 > -0600 > @@ -111,7 +111,7 @@ static void video_release(struct device > vfd->release(vfd); > } > > -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) > static struct device_attribute video_device_attrs[] = { > __ATTR(name, S_IRUGO, show_name, NULL), > __ATTR_NULL > @@ -120,7 +120,7 @@ static struct device_attribute video_dev > > static struct class video_class = { > .name = VIDEO_NAME, > -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) > +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) > .release = video_release, > #else > .dev_attrs = video_device_attrs, > I used this patch and managed to get the modules to compile and load on my 2.6.18 debian/etch kernel. However, I have a question. Will these modules now load in a deterministic manner? For instance, on this box I have a PVR-150, a air2PC card, an Avermedia A180, and a DVICO pcHDTV RT5 lite. My issue is that in myth, I need to assign the proper /dev/device to the proper capture device. To get around that with previous versions, I had some custom rules in hotplug/udev that would create custom aliases, such as /dev/ivtv0, /dev/bttv_vid0. However, this release has broken the mechanism that created my /dev/ivtv0, so mythtv isn't happy. Will all devices load and create /dev/video* in the same order all the time, or is it still up in the air as to which device will create which /dev/video*, based upon who's faster today???? This is a long outstanding issue with udev/hotplug, but someone needs to fix it, if they can figure out how.
|