Kernel 2.6.17 and lirc_gpio driver

No Comments

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

Kernel 2.6.17 and lirc_gpio driver by George Notaras, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Copyright © 2006 - Some Rights Reserved

About George Notaras

George Notaras is the editor of G-Loaded Journal, a technical blog about Free and Open-Source Software. George is a GNU/Linux enthusiast, a self-taught programmer and system administrator. He strongly believes that "knowledge is power" and has created this web site to share the IT knowledge and experience he has gained over the years with other people. George primarily uses CentOS and Fedora and spends some of his spare time developing open-source software. Follow George on Twitter: @gnotaras

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>