«
»

Kernel 2.6.17 and lirc_gpio driver

September 9th, 2006 by George Notaras

I use an old bt878-based TV capture card, whose remote control needs the lirc_gpio driver in order to work. I remember that this specific LIRC driver could not be compiled after upgrading to kernel 2.6.17. I investigated this problem a couple of days ago and it seems that the cause of this issue is the fact that the location of the bt848/bt878 related kernel headers has changed.

The needed headers, bttv.h and bttvp.h, now exist in the drivers/media/video/bt8xx/ directory. Their old location was drivers/media/video/. So, compiling lirc_gpio requires the following small patch:

--- drivers/lirc_gpio/lirc_gpio.c.original      2006-01-01 15:43:46.000000000 +0200
+++ drivers/lirc_gpio/lirc_gpio.c       2006-09-08 20:03:34.000000000 +0300
@@ -49,8 +49,8 @@
 #include "../drivers/char/bttv.h"
 #include "../drivers/char/bttvp.h"
 #else
-#include "../drivers/media/video/bttv.h"
-#include "../drivers/media/video/bttvp.h"
+#include "../drivers/media/video/bt8xx/bttv.h"
+#include "../drivers/media/video/bt8xx/bttvp.h"
 #endif
 #if BTTV_VERSION_CODE < KERNEL_VERSION(0,7,45)

While lirc_gpio should now be compiled without problems, there is one more issue, which seems to be a kernel-source bug. The bttvp.h “includes” another header (btcx-risc.h), which should exist in the same directory. But, this file actually exists in the parent directory (drivers/media/video/). So, until this kernel source issue is resolved, the only way to build lirc_gpio succesfully is to:

  1. patch LIRC sources with the above patch,
  2. copy the btcx-risc.h kernel header from location: drivers/media/video/ to location: drivers/media/video/bt8xx/ within the kernel source tree.

I have already filed a bug about this in the Fedora Bugzilla. If there is anything I have missed, drop me a line.

Further Reading

The Kernel 2.6.17 and lirc_gpio driver by George Notaras, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Terms and conditions beyond the scope of this license may be available at www.g-loaded.eu.

Related Articles

Tags: , ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight=""> <pre>