From patchwork Mon Aug 16 12:00:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Drung X-Patchwork-Id: 61804 X-Patchwork-Delegate: leann.ogasawara@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id D08FBB70D6 for ; Mon, 16 Aug 2010 22:28:41 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1Okyno-0008Dx-R4; Mon, 16 Aug 2010 13:28:32 +0100 Received: from mail-ey0-f177.google.com ([209.85.215.177]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OkyN0-0002jE-F6 for kernel-team@lists.ubuntu.com; Mon, 16 Aug 2010 13:00:50 +0100 Received: by eye22 with SMTP id 22so1007192eye.8 for ; Mon, 16 Aug 2010 05:00:50 -0700 (PDT) Received: by 10.213.32.78 with SMTP id b14mr2599267ebd.84.1281960049664; Mon, 16 Aug 2010 05:00:49 -0700 (PDT) Received: from [192.168.3.10] (77-22-116-243-dynip.superkabel.de [77.22.116.243]) by mx.google.com with ESMTPS id u9sm9879019eeh.5.2010.08.16.05.00.48 (version=SSLv3 cipher=RC4-MD5); Mon, 16 Aug 2010 05:00:48 -0700 (PDT) Subject: [PATCH] UBUNTU: [Upstream] lirc - Fix Hauppauge TV Card is detected as Leadtek IR From: Benjamin Drung To: kernel-team@lists.ubuntu.com Date: Mon, 16 Aug 2010 14:00:47 +0200 Message-ID: <1281960047.2008.179.camel@deep-thought> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 X-Mailman-Approved-At: Mon, 16 Aug 2010 13:28:29 +0100 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Benjamin Drung OriginalLocation: http://lirc.cvs.sourceforge.net/viewvc/lirc/lirc/drivers/lirc_i2c/lirc_i2c.c?r1=1.71&r2=1.72 BugLink: http://bugs.launchpad.net/bugs/550369 Signed-off-by: Benjamin Drung --- ubuntu/lirc/lirc_i2c/lirc_i2c.c | 32 +++++++++++++++++--------------- 1 files changed, 17 insertions(+), 15 deletions(-) diff --git a/ubuntu/lirc/lirc_i2c/lirc_i2c.c b/ubuntu/lirc/lirc_i2c/lirc_i2c.c index dca6b51..2db5a64 100644 --- a/ubuntu/lirc/lirc_i2c/lirc_i2c.c +++ b/ubuntu/lirc/lirc_i2c/lirc_i2c.c @@ -491,20 +491,23 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ir->l.add_to_buf = add_to_buf_pv951; break; case 0x71: -#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)) { + + + +#ifdef I2C_HW_B_CX2388x + /* Leadtek Winfast PVR2000 or Hauppauge HVR-1300 */ + if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2388x)) + strlcpy(ir->c.name, "Hauppauge HVR1300", I2C_NAME_SIZE); + else #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. */ strlcpy(ir->c.name, "Hauppauge PVR150", I2C_NAME_SIZE); - } else /* I2C_HW_B_CX2388x */ - strlcpy(ir->c.name, "Hauppauge HVR1300", I2C_NAME_SIZE); + } ir->l.code_length = 13; ir->l.add_to_buf = add_to_buf_haup_pvr150; break; @@ -515,19 +518,18 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) break; case 0x18: case 0x1a: -#ifdef I2C_HW_B_CX2341X - if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848) || - adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2341X)) { +#ifdef I2C_HW_B_CX2388x + if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2388x)) { + strlcpy(ir->c.name, "Leadtek IR", I2C_NAME_SIZE); + ir->l.code_length = 8; + ir->l.add_to_buf = add_to_buf_pvr2000; + } else { #else - if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) { + { #endif strlcpy(ir->c.name, "Hauppauge IR", I2C_NAME_SIZE); ir->l.code_length = 13; ir->l.add_to_buf = add_to_buf_haup; - } else { /* I2C_HW_B_CX2388x */ - strlcpy(ir->c.name, "Leadtek IR", I2C_NAME_SIZE); - ir->l.code_length = 8; - ir->l.add_to_buf = add_to_buf_pvr2000; } break; case 0x30: