All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aleksandr V. Piskunov" <aleksandr.v.piskunov@gmail.com>
To: linux-media@vger.kernel.org
Cc: Oldrich Jedlicka <oldium.pro@seznam.cz>
Subject: AVerTV MCE 116 Plus remote
Date: Sat, 3 Oct 2009 00:49:09 +0300	[thread overview]
Message-ID: <20091002214909.GA4761@moon> (raw)

Preliminary version of patch adding support for AVerTV MCE 116 Plus remote.
This board has an IR sensor is connected to EM78P153S, general purpose 8-bit
microcontroller with a 1024 × 13 bits of OTP-ROM. According to i2cdetect, it is
sitting on address 0x40.

Patch allows ir-kbd-i2c to probe cx2341x boards for this address. Manually
loading ir-kbd-i2c now detects remote, every key is working as expected.

As I understand, current I2C/probing code is being redesigned/refactored. Sheer
amount of #ifdefs for every second kernel version is making my eyes bleed, so
please somebody involved check if patch is ok. 

Should I also add the 0x40 address to addr_list[] in ivtv-i2c.c? How to point
ivtv to this remote and autoload ir-kbd-i2c?

diff --git a/linux/drivers/media/video/ir-kbd-i2c.c b/linux/drivers/media/video/ir-kbd-i2c.c
--- a/linux/drivers/media/video/ir-kbd-i2c.c
+++ b/linux/drivers/media/video/ir-kbd-i2c.c
@@ -461,7 +461,7 @@
 		}
 		break;
 	case 0x40:
-		name        = "AVerMedia Cardbus remote";
+		name        = "AVerMedia RM-FP/RM-KH remote";
 		ir->get_key = get_key_avermedia_cardbus;
 		ir_type     = IR_TYPE_OTHER;
 		ir_codes    = &ir_codes_avermedia_cardbus_table;
@@ -706,8 +706,12 @@
 			ir_attach(adap, msg.addr, 0, 0);
 	}
 
-	/* Special case for AVerMedia Cardbus remote */
-	if (adap->id == I2C_HW_SAA7134) {
+	/* Special case for AVerMedia remotes:
+	   * AVerTV Hybrid+FM Cardbus
+	   * AVerTV MCE 116 Plus
+	   * probably others with RM-FP, RM-KH remotes and microcontroller
+	     chip @ 0x40 */
+	if ((adap->id == I2C_HW_SAA7134) || (adap->id == I2C_HW_B_CX2341X)) {
 		unsigned char subaddr, data;
 		struct i2c_msg msg[] = { { .addr = 0x40, .flags = 0,
 					   .buf = &subaddr, .len = 1},

             reply	other threads:[~2009-10-02 21:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-02 21:49 Aleksandr V. Piskunov [this message]
2009-10-03 13:19 ` AVerTV MCE 116 Plus remote Andy Walls
2009-10-03 17:43   ` Aleksandr V. Piskunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091002214909.GA4761@moon \
    --to=aleksandr.v.piskunov@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=oldium.pro@seznam.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.