diff -u lirc-0.8.2/debian/changelog lirc-0.8.2/debian/changelog --- lirc-0.8.2/debian/changelog +++ lirc-0.8.2/debian/changelog @@ -1,3 +1,17 @@ +lirc (0.8.2-0ubuntu3) gutsy; urgency=low + + * Add 14_lirc_i2c.dpatch to fix lirc-i2c on 2.6.22 kernel + for PVR-150 and HVR-1300. (LP: #128650) + * Add 15_macmini.dpatch to fix macmini support. (LP: #126955) + * Add 16_lirc-gpio.dpatch to fix GPIO by backporting deprecated + functions, until sysfs support is added to GPIO module. + * debian/lirc.postinst & debian/lirc.templates: + Add functionality to choose your remote. Automatically load this + information into /etc/lirc/hardware.conf and choose a /etc/lirc/lircd.conf + for your remote. (LP: #65174) + + -- Mario Limonciello Thu, 26 Jul 2007 19:47:03 -0700 + lirc (0.8.2-0ubuntu2) gutsy; urgency=low * Make sure lirc_gpio is buildable by adding extra_2.6.22 diff -u lirc-0.8.2/debian/patches/00list lirc-0.8.2/debian/patches/00list --- lirc-0.8.2/debian/patches/00list +++ lirc-0.8.2/debian/patches/00list @@ -5,0 +6,3 @@ +14-lirc-i2c.dpatch +15_macmini.dpatch +16_lirc-gpio.dpatch diff -u lirc-0.8.2/debian/lirc.postinst lirc-0.8.2/debian/lirc.postinst --- lirc-0.8.2/debian/lirc.postinst +++ lirc-0.8.2/debian/lirc.postinst @@ -104,11 +104,72 @@ } +ChooseRemote() +{ + #Find the current remote configuration + db_get lirc/remote + OLDREMOTE=$RET + + #Present the user with some choices + #To later explain what this is actually doing without man pages: + #First, only grab lines with a ; + #Next, sort the list + #Now, remove all commas from streams + #Now, Remove all remaining comments or ['s + #Now, Print the remote name + #Now, Affix a comma and space to all starts of lines + #Lastly, change the newline to a null character + REMOTES=`grep ";" /usr/share/lirc/lirc.hwdb | sort | sed 's/,//g' | awk -F ";" '$0!~/^#|^\[/{print $1}' | sed 's/^/,\ /' | tr '\n' '\0'` + db_subst lirc/remote REMOTES $REMOTES + db_input high lirc/remote || true + db_go + + db_get lirc/remote + CHOSEN_REMOTE="${RET}" + MODULES=`grep ";" /usr/share/lirc/lirc.hwdb | sort | sed 's/,//g' | grep "${CHOSEN_REMOTE}" | awk -F ";" '$0!~/^#|^\[/{print $3}'` + DRIVER=`grep ";" /usr/share/lirc/lirc.hwdb | sort | sed 's/,//g' | grep "${CHOSEN_REMOTE}" | awk -F ";" '$0!~/^#|^\[/{print $2}'` + LIRCD_CONF=`grep ";" /usr/share/lirc/lirc.hwdb | sort | sed 's/,//g' | grep "${CHOSEN_REMOTE}" | awk -F ";" '$0!~/^#|^\[/{print $5}'` + SUPPORTED_DRIVERS=`lircd -H help 2>&1 | awk '$0!~/^S|^D/{print $1}' | tr '\n' '\ '` + if [ "$OLDREMOTE" != "$CHOSEN_REMOTE" ] && [ "$CHOSEN_REMOTE" != "None" ]; then + db_fset lirc/reconfigure config_changed true + + #/dev/input/eventX is a weird case + if [ "$LIRCD_CONF" != "generic config file for Linux input layer" ]; then + db_set lirc/lircd_conf "$LIRCD_CONF" + else + db_set lirc/lircd_conf "" + fi + #lirc.hwdb puts none rather than ;; + if [ "$MODULES" != "none" ]; then + db_set lirc/modules "$MODULES" + else + db_set lirc/modules "" + fi + + #only need to put driver for non kernel module devices + if echo "$SUPPORTED_DRIVERS" | grep "$DRIVER" > /dev/null; then + db_set lirc/driver "$DRIVER" + else + db_set lirc/driver "" + fi + db_go + elif [ "$CHOSEN_REMOTE" = "None" ]; then + db_fset lirc/reconfigure config_changed true + db_set lirc/driver "" + db_set lirc/modules "" + db_set lirc/lircd_conf "" + db_go + fi +} + . /usr/share/debconf/confmodule if [ "$1" = "configure" ]; then [ -x /usr/sbin/update-devfsd ] && /usr/sbin/update-devfsd >&2 + #parse the lirc.hwdb to find our remote + ChooseRemote + db_fget lirc/reconfigure config_changed CONFIG_CHANGED=$RET db_fset lirc/reconfigure config_changed false @@ -131,7 +192,8 @@ # If we don't have a valid lircd.conf try to get one if [ ! -f /etc/lirc/lircd.conf ] \ - || grep -q "^#UNCONFIGURED" /etc/lirc/lircd.conf ;then + || grep -q "^#UNCONFIGURED" /etc/lirc/lircd.conf \ + || $CONFIG_CHANGED ;then db_get lirc/lircd_conf # if there is a misplaced config file it is ok to move it to @@ -143,7 +205,9 @@ # we don't restore the file unless the user is (re)configuring elif $CONFIG_CHANGED \ && [ -f "/usr/share/lirc/remotes/$RET" ];then - echo trying default lircd.conf + if [ -f "/etc/lirc/lircd.conf" ]; then + mv /etc/lirc/lircd.conf /etc/lirc/lircd.conf.dpkg-old + fi cp /usr/share/lirc/remotes/$RET \ /etc/lirc/lircd.conf fi diff -u lirc-0.8.2/debian/lirc.templates lirc-0.8.2/debian/lirc.templates --- lirc-0.8.2/debian/lirc.templates +++ lirc-0.8.2/debian/lirc.templates @@ -104,0 +105,7 @@ + +Template: lirc/remote +Type: select +Choices: None ${REMOTES} +Default: None +_Description: Please choose your remote. + Please choose your primary remote from the list below: diff -u lirc-0.8.2/debian/po/cs.po lirc-0.8.2/debian/po/cs.po --- lirc-0.8.2/debian/po/cs.po +++ lirc-0.8.2/debian/po/cs.po @@ -15,7 +15,7 @@ msgstr "" "Project-Id-Version: lirc\n" "Report-Msgid-Bugs-To: ubuntu-devel-discuss@lists.ubuntu.com\n" -"POT-Creation-Date: 2007-03-24 18:56-0500\n" +"POT-Creation-Date: 2007-07-27 02:27-0500\n" "PO-Revision-Date: 2006-09-26 11:34+0200\n" "Last-Translator: Miroslav Jezbera \n" "Language-Team: Czech \n" @@ -468,0 +469,12 @@ + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your remote." +msgstr "" + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your primary remote from the list below:" +msgstr "" diff -u lirc-0.8.2/debian/po/fr.po lirc-0.8.2/debian/po/fr.po --- lirc-0.8.2/debian/po/fr.po +++ lirc-0.8.2/debian/po/fr.po @@ -13,7 +13,7 @@ msgstr "" "Project-Id-Version: lirc 0.8.0\n" "Report-Msgid-Bugs-To: ubuntu-devel-discuss@lists.ubuntu.com\n" -"POT-Creation-Date: 2007-03-24 18:56-0500\n" +"POT-Creation-Date: 2007-07-27 02:27-0500\n" "PO-Revision-Date: 2006-08-20 20:42+0200\n" "Last-Translator: Jean-Luc Coulon (f5ibh) \n" "Language-Team: French \n" @@ -486,0 +487,12 @@ + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your remote." +msgstr "" + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your primary remote from the list below:" +msgstr "" diff -u lirc-0.8.2/debian/po/templates.pot lirc-0.8.2/debian/po/templates.pot --- lirc-0.8.2/debian/po/templates.pot +++ lirc-0.8.2/debian/po/templates.pot @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: ubuntu-devel-discuss@lists.ubuntu.com\n" -"POT-Creation-Date: 2007-03-24 18:56-0500\n" +"POT-Creation-Date: 2007-07-27 02:27-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -395,0 +396,12 @@ + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your remote." +msgstr "" + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your primary remote from the list below:" +msgstr "" diff -u lirc-0.8.2/debian/po/da.po lirc-0.8.2/debian/po/da.po --- lirc-0.8.2/debian/po/da.po +++ lirc-0.8.2/debian/po/da.po @@ -15,7 +15,7 @@ msgstr "" "Project-Id-Version: lirc 0.6.6-12\n" "Report-Msgid-Bugs-To: ubuntu-devel-discuss@lists.ubuntu.com\n" -"POT-Creation-Date: 2007-03-24 18:56-0500\n" +"POT-Creation-Date: 2007-07-27 02:27-0500\n" "PO-Revision-Date: 2005-12-12 20:41+0100\n" "Last-Translator: Morten Brix Pedersen \n" "Language-Team: Danish \n" @@ -455,6 +455,18 @@ "Hvis du svarer nej til dette spørgsmål, vil /var/log/lircd blive liggende og " "du skal tage dig af det selv." +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your remote." +msgstr "" + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your primary remote from the list below:" +msgstr "" + #~ msgid "" #~ "i2c: TV cards from Hauppauge and PixelView. Needs the new I2C stack " #~ "(present on 2.4 kernels). You can get it at:" diff -u lirc-0.8.2/debian/po/vi.po lirc-0.8.2/debian/po/vi.po --- lirc-0.8.2/debian/po/vi.po +++ lirc-0.8.2/debian/po/vi.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: lirc 0.7.1pre2-6\n" "Report-Msgid-Bugs-To: ubuntu-devel-discuss@lists.ubuntu.com\n" -"POT-Creation-Date: 2007-03-24 18:56-0500\n" +"POT-Creation-Date: 2007-07-27 02:27-0500\n" "PO-Revision-Date: 2005-12-12 20:44+0100\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" @@ -441,6 +441,18 @@ "you will have to take care of it yourself." msgstr "Nếu bạn trả lời «Không» thì sẽ phải tự loại bỏ «/var/log/lircd»." +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your remote." +msgstr "" + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your primary remote from the list below:" +msgstr "" + #~ msgid "" #~ "i2c: TV cards from Hauppauge and PixelView. Needs the new I2C stack " #~ "(present on 2.4 kernels). You can get it at:" diff -u lirc-0.8.2/debian/po/sv.po lirc-0.8.2/debian/po/sv.po --- lirc-0.8.2/debian/po/sv.po +++ lirc-0.8.2/debian/po/sv.po @@ -15,7 +15,7 @@ msgstr "" "Project-Id-Version: lirc 0.7.1pre2-9\n" "Report-Msgid-Bugs-To: ubuntu-devel-discuss@lists.ubuntu.com\n" -"POT-Creation-Date: 2007-03-24 18:56-0500\n" +"POT-Creation-Date: 2007-07-27 02:27-0500\n" "PO-Revision-Date: 2005-11-17 02:25+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -459,6 +459,18 @@ "Om du svarar \"nej\" till denna frga kommer /var/log/lircd att lmnas kvar " "och du mste ta hand om den sjlv." +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your remote." +msgstr "" + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your primary remote from the list below:" +msgstr "" + #~ msgid "" #~ "i2c: TV cards from Hauppauge and PixelView. Needs the new I2C stack " #~ "(present on 2.4 kernels). You can get it at:" diff -u lirc-0.8.2/debian/po/ja.po lirc-0.8.2/debian/po/ja.po --- lirc-0.8.2/debian/po/ja.po +++ lirc-0.8.2/debian/po/ja.po @@ -15,7 +15,7 @@ msgstr "" "Project-Id-Version: lirc\n" "Report-Msgid-Bugs-To: ubuntu-devel-discuss@lists.ubuntu.com\n" -"POT-Creation-Date: 2007-03-24 18:56-0500\n" +"POT-Creation-Date: 2007-07-27 02:27-0500\n" "PO-Revision-Date: 2006-07-26 22:00+0900\n" "Last-Translator: Kenshi Muto \n" "Language-Team: Japanese \n" @@ -463,0 +464,12 @@ + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your remote." +msgstr "" + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your primary remote from the list below:" +msgstr "" diff -u lirc-0.8.2/debian/po/nl.po lirc-0.8.2/debian/po/nl.po --- lirc-0.8.2/debian/po/nl.po +++ lirc-0.8.2/debian/po/nl.po @@ -17,7 +17,7 @@ msgstr "" "Project-Id-Version: lirc_0.8.0-5_nl\n" "Report-Msgid-Bugs-To: ubuntu-devel-discuss@lists.ubuntu.com\n" -"POT-Creation-Date: 2007-03-24 18:56-0500\n" +"POT-Creation-Date: 2007-07-27 02:27-0500\n" "PO-Revision-Date: 2006-06-15 20:03+0100\n" "Last-Translator: Kurt De Bree \n" "Language-Team: Dutch \n" @@ -480,0 +481,12 @@ + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your remote." +msgstr "" + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your primary remote from the list below:" +msgstr "" diff -u lirc-0.8.2/debian/po/de.po lirc-0.8.2/debian/po/de.po --- lirc-0.8.2/debian/po/de.po +++ lirc-0.8.2/debian/po/de.po @@ -15,7 +15,7 @@ msgstr "" "Project-Id-Version: lirc 0.7\n" "Report-Msgid-Bugs-To: ubuntu-devel-discuss@lists.ubuntu.com\n" -"POT-Creation-Date: 2007-03-24 18:56-0500\n" +"POT-Creation-Date: 2007-07-27 02:27-0500\n" "PO-Revision-Date: 2006-05-18 16:34+0200\n" "Last-Translator: Franz Pletz \n" "Language-Team: German \n" @@ -486,0 +487,12 @@ + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your remote." +msgstr "" + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your primary remote from the list below:" +msgstr "" diff -u lirc-0.8.2/debian/po/pt.po lirc-0.8.2/debian/po/pt.po --- lirc-0.8.2/debian/po/pt.po +++ lirc-0.8.2/debian/po/pt.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: lirc 0.8.0-4\n" "Report-Msgid-Bugs-To: ubuntu-devel-discuss@lists.ubuntu.com\n" -"POT-Creation-Date: 2007-03-24 18:56-0500\n" +"POT-Creation-Date: 2007-07-27 02:27-0500\n" "PO-Revision-Date: 2006-06-12 23:34+0100\n" "Last-Translator: Rui Branco \n" "Language-Team: Portuguese \n" @@ -463,0 +464,12 @@ + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your remote." +msgstr "" + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your primary remote from the list below:" +msgstr "" diff -u lirc-0.8.2/debian/po/es.po lirc-0.8.2/debian/po/es.po --- lirc-0.8.2/debian/po/es.po +++ lirc-0.8.2/debian/po/es.po @@ -15,7 +15,7 @@ msgstr "" "Project-Id-Version: 0.8.0\n" "Report-Msgid-Bugs-To: ubuntu-devel-discuss@lists.ubuntu.com\n" -"POT-Creation-Date: 2007-03-24 18:56-0500\n" +"POT-Creation-Date: 2007-07-27 02:27-0500\n" "PO-Revision-Date: 2006-09-28 19:10+0200\n" "Last-Translator: Héctor García Álvarez \n" "Language-Team: LANGUAGE \n" @@ -475,6 +475,18 @@ "Si contesta 'no' a esta pregunta, /var/log/lircd quedará en su sitio y " "tendrá que encargarse usted mismo de él." +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your remote." +msgstr "" + +#. Type: select +#. Description +#: ../lirc.templates:15001 +msgid "Please choose your primary remote from the list below:" +msgstr "" + #~ msgid "" #~ "i2c: TV cards from Hauppauge and PixelView. Needs the new I2C stack " #~ "(present on 2.4 kernels). You can get it at:" only in patch2: unchanged: --- lirc-0.8.2.orig/debian/patches/16_lirc-gpio.dpatch +++ lirc-0.8.2/debian/patches/16_lirc-gpio.dpatch @@ -0,0 +1,91 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 16_lirc-gpio.dpatch by Mario Limonciello +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad lirc-0.8.2~/drivers/lirc_gpio/Makefile.am lirc-0.8.2/drivers/lirc_gpio/Makefile.am +--- lirc-0.8.2~/drivers/lirc_gpio/Makefile.am 2004-04-25 11:29:25.000000000 -0500 ++++ lirc-0.8.2/drivers/lirc_gpio/Makefile.am 2007-07-27 01:16:19.000000000 -0500 +@@ -5,9 +5,9 @@ + ## this is so that Automake includes the C compiling definitions, and + ## includes the source files in the distribution. + EXTRA_PROGRAMS = automake_dummy +-automake_dummy_SOURCES = lirc_gpio.c ++automake_dummy_SOURCES = lirc_gpio.c bttv_deprecated.o + + ## there is no *just* object file support in automake. This is close enough +-module_DATA = lirc_gpio.o ++module_DATA = lirc_gpio.o bttv_deprecated.o + + include ../Makefile.common +diff -urNad lirc-0.8.2~/drivers/lirc_gpio/bttv_deprecated.c lirc-0.8.2/drivers/lirc_gpio/bttv_deprecated.c +--- lirc-0.8.2~/drivers/lirc_gpio/bttv_deprecated.c 1969-12-31 18:00:00.000000000 -0600 ++++ lirc-0.8.2/drivers/lirc_gpio/bttv_deprecated.c 2007-07-27 01:15:43.000000000 -0500 +@@ -0,0 +1,44 @@ ++//Temporarily added until a resolution is reached upstream ++//For kernel 2.6.22 ++ ++#include ++#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,22) ++#include "extra_2.6.22/bttv.h" ++#include "extra_2.6.22/bttvp.h" ++#else ++#include "../drivers/media/video/bt8xx/bttv.h" ++#include "../drivers/media/video/bt8xx/bttvp.h" ++#endif ++ ++struct bttv bttvs[BTTV_MAX]; ++unsigned int bttv_debug; ++unsigned int bttv_num; /* number of Bt848s in use */ ++ ++int bttv_get_cardinfo(unsigned int card, int *type, unsigned *cardid) ++{ ++ printk("The bttv_* interface is obsolete and will go away,\n" ++ "please use the new, sysfs based interface instead.\n"); ++ if (card >= bttv_num) { ++ return -1; ++ } ++ *type = bttvs[card].c.type; ++ *cardid = bttvs[card].cardid; ++ return 0; ++} ++ ++wait_queue_head_t* bttv_get_gpio_queue(unsigned int card) ++{ ++ struct bttv *btv; ++ ++ if (card >= bttv_num) { ++ return NULL; ++ } ++ ++ btv = &bttvs[card]; ++ if (bttvs[card].shutdown) { ++ return NULL; ++ } ++ return &btv->gpioq; ++} ++ ++ +diff -urNad lirc-0.8.2~/drivers/lirc_gpio/bttv_deprecated.h lirc-0.8.2/drivers/lirc_gpio/bttv_deprecated.h +--- lirc-0.8.2~/drivers/lirc_gpio/bttv_deprecated.h 1969-12-31 18:00:00.000000000 -0600 ++++ lirc-0.8.2/drivers/lirc_gpio/bttv_deprecated.h 2007-07-27 01:15:43.000000000 -0500 +@@ -0,0 +1,6 @@ ++//Temporarily re-added for Ubuntu Kernel 2.6.22 until upstream ++//Resolution is reached. ++extern wait_queue_head_t* bttv_get_gpio_queue(unsigned int card); ++extern int bttv_get_cardinfo(unsigned int card, int *type, ++ unsigned int *cardid); ++ +diff -urNad lirc-0.8.2~/drivers/lirc_gpio/lirc_gpio.c lirc-0.8.2/drivers/lirc_gpio/lirc_gpio.c +--- lirc-0.8.2~/drivers/lirc_gpio/lirc_gpio.c 2007-07-27 01:15:42.000000000 -0500 ++++ lirc-0.8.2/drivers/lirc_gpio/lirc_gpio.c 2007-07-27 01:15:43.000000000 -0500 +@@ -63,6 +63,7 @@ + #elif LINUX_VERSION_CODE == KERNEL_VERSION(2,6,22) + #include "extra_2.6.22/bttv.h" + #include "extra_2.6.22/bttvp.h" ++#include "bttv_deprecated.h" + #else + #include "../drivers/media/video/bt8xx/bttv.h" + #include "../drivers/media/video/bt8xx/bttvp.h" only in patch2: unchanged: --- lirc-0.8.2.orig/debian/patches/14-lirc-i2c.dpatch +++ lirc-0.8.2/debian/patches/14-lirc-i2c.dpatch @@ -0,0 +1,105 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 14-lirc-i2c.dpatch by Mario Limonciello +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad lirc-0.8.2~/drivers/lirc_i2c/lirc_i2c.c lirc-0.8.2/drivers/lirc_i2c/lirc_i2c.c +--- lirc-0.8.2~/drivers/lirc_i2c/lirc_i2c.c 2007-02-13 00:45:15.000000000 -0600 ++++ lirc-0.8.2/drivers/lirc_i2c/lirc_i2c.c 2007-07-27 10:29:10.000000000 -0500 +@@ -1,4 +1,4 @@ +-/* $Id: lirc_i2c.c,v 1.39 2007/02/13 06:45:15 lirc Exp $ */ ++/* $Id: lirc_i2c.c,v 1.41 2007/07/25 20:16:47 lirc Exp $ */ + + /* + * i2c IR lirc plugin for Hauppauge and Pixelview cards - new 2.3.x i2c stack +@@ -15,6 +15,8 @@ + * Jerome Brock + * modified for Leadtek Winfast PVR2000 by + * Thomas Reitmayr (treitmayr@yahoo.com) ++ * modified for Hauppauge HVR-1300 by ++ * Jan Frey (jfrey@gmx.de) + * + * parts are cut&pasted from the old lirc_haup.c driver + * +@@ -416,11 +418,22 @@ + ir->l.add_to_buf=add_to_buf_pv951; + break; + case 0x71: +- /* The PVR150 IR receiver uses the same protocol as other +- Hauppauge cards, but the data flow is different, so we need +- to deal with it by its own. +- */ +- strcpy(ir->c.name,"Hauppauge IR (PVR150)"); ++#ifdef I2C_HW_B_CX2341X ++ if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848) || ++ adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2341X)) ++#else ++ if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) ++#endif ++ { ++ /* The PVR150 IR receiver uses the same protocol as other ++ Hauppauge cards, but the data flow is different, so we need ++ to deal with it by its own. ++ */ ++ strcpy(ir->c.name,"Hauppauge PVR150"); ++ } ++ else { /* I2C_HW_B_CX2388x */ ++ strcpy(ir->c.name,"Hauppauge HVR1300"); ++ } + ir->l.code_length = 13; + ir->l.add_to_buf=add_to_buf_haup_pvr150; + break; +@@ -469,7 +482,7 @@ + kfree(ir); + return -1; + } +- printk("lirc_i2c: chip found @ 0x%02x (%s)\n",addr,ir->c.name); ++ printk("lirc_i2c: chip 0x%x found @ 0x%02x (%s)\n",adap->id,addr,ir->c.name); + + /* register device */ + i2c_attach_client(&ir->c); +@@ -514,6 +527,14 @@ + 0x30, /* KNC ONE IR */ + 0x6b, /* Adaptec IR */ + -1}; ++ ++#ifdef I2C_HW_B_CX2388x ++ static const int probe_cx88[] = { ++ 0x18, /* Leadtek Winfast PVR2000 */ ++ 0x71, /* Hauppauge HVR-IR */ ++ -1}; ++#endif ++ + struct i2c_client c; char buf; int i,rc; + + #ifdef I2C_HW_B_CX2341X +@@ -539,17 +560,19 @@ + } + + #ifdef I2C_HW_B_CX2388x +- /* Leadtek Winfast PVR2000 */ ++ /* Leadtek Winfast PVR2000 or Hauppauge HVR-1300 */ + else if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2388x)) { + memset(&c,0,sizeof(c)); + c.adapter = adap; +- c.addr = 0x18; +- rc = i2c_master_recv(&c,&buf,1); +- dprintk("probe 0x%02x @ %s: %s\n", +- c.addr, adap->name, +- (1 == rc) ? "yes" : "no"); +- if (1 == rc) { +- ir_attach(adap,c.addr,0,0); ++ for (i = 0; -1 != probe_cx88[i]; i++) { ++ c.addr = probe_cx88[i]; ++ rc = i2c_master_recv(&c,&buf,1); ++ dprintk("probe 0x%02x @ %s: %s\n", ++ c.addr, adap->name, ++ (1 == rc) ? "yes" : "no"); ++ if (1 == rc) { ++ ir_attach(adap,c.addr,0,0); ++ } + } + } + #endif only in patch2: unchanged: --- lirc-0.8.2.orig/debian/patches/15_macmini.dpatch +++ lirc-0.8.2/debian/patches/15_macmini.dpatch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 15_macmini.dpatch by Mario Limonciello +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad lirc-0.8.2~/daemons/hw-types.c lirc-0.8.2/daemons/hw-types.c +--- lirc-0.8.2~/daemons/hw-types.c 2007-05-05 05:20:03.000000000 -0700 ++++ lirc-0.8.2/daemons/hw-types.c 2007-07-26 20:25:18.000000000 -0700 +@@ -109,6 +109,7 @@ + &hw_livedrive_midi, + &hw_livedrive_seq, + &hw_logitech, ++ &hw_macmini, + &hw_mp3anywhere, + &hw_mouseremote, + &hw_mouseremote_ps2,