Skip to contentSkip to conversation

Leadtek CoolCommand Y0400046

DISCUSSION Mauro Carvalho Chehab 1 participant 1 message Jul 1, 2011 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Em 01-07-2011 09:24, Jonathan Liu escreveu:

Quoted 6 lines

Hi Mauro,

I had a problem with my the Y0400046 remote control not working properly with my Leadtek WinFast TV2000 XP Deluxe. It seems the keycode mask is incorrect for my particular card.
I have attached a patch which fixes the issue for me but i'm not sure if it is the correct way to do it. If you have some time can you take a look at the patch?

(c/c Linux media ML)

Quoted 28 lines

Any help is greatly appreciated.

Regards,
Jonathan

0001-media-bttv-input-Fix-WinFast-2000-keycode-mask.patch

From caa0c6ad14ef361dbaba01e9b6844d2606f5411a Mon Sep 17 00:00:00 2001
From: Jonathan Liu <[email protected]>
Date: Fri, 1 Jul 2011 22:08:46 +1000
Subject: [PATCH] [media] bttv-input: Fix WinFast 2000 keycode mask

The remote control for Leadtek WinFast TV2000 XP Deluxe doesn't work as the keycode mask is incorrect. This fixes the keycode mask so the remote control codes are correctly interpreted.

---
 drivers/media/video/bt8xx/bttv-input.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/bt8xx/bttv-input.c +0 -0
index 677d70c..f861a00 100644

drivers/media/video/bt8xx/bttv-input.c int bttv_input_init(struct bttv *btv)

Quoted 9 lines
drivers/media/video/bt8xx/bttv-input.c +1 -2
@@ -469,7 +469,7 @@ int bttv_input_init(struct bttv *btv)
 
 	case BTTV_BOARD_WINFAST2000:
 		ir_codes         = RC_MAP_WINFAST;
-		ir->mask_keycode = 0x1f8;
+		ir->mask_keycode = (btv->cardid == 0x6606107d) ? 0x8f8: 0x1f8;
 		break;
 	case BTTV_BOARD_MAGICTVIEW061:
 	case BTTV_BOARD_MAGICTVIEW063:
-- 1.7.6

Hmm.. I see, there are a few different models using the same board entry:

drivers/media/video/bt8xx/bttv-cards.c:   { 0x6606107d, BTTV_BOARD_WINFAST2000,   "Leadtek WinFast TV 2000" },
drivers/media/video/bt8xx/bttv-cards.c:   { 0x6609107d, BTTV_BOARD_WINFAST2000,   "Leadtek TV 2000 XP" },
drivers/media/video/bt8xx/bttv-cards.c:   { 0x217d6606, BTTV_BOARD_WINFAST2000,   "Leadtek WinFast TV 2000" },
drivers/media/video/bt8xx/bttv-cards.c:   { 0xfff6f6ff, BTTV_BOARD_WINFAST2000,   "Leadtek WinFast TV 2000" },

What we generally do, on such cases is to create a separate entry for the board that has something different. This helps to track the differences between them.

Yet, your solution seems to work fine. I'm wandering if the other board models may also have a problem with the keycode mask.

Well, for now, I'll apply your patch as-is, but it would be good to have some feedback from other users with similar boards.

Thanks,
Mauro