* [PATCH] support for Hauppauge WinTV MiniStic IR remote
@ 2010-06-15 16:23 Richard Zidlicky
2010-07-04 16:32 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 2+ messages in thread
From: Richard Zidlicky @ 2010-06-15 16:23 UTC (permalink / raw)
To: linux-media
Hi,
I have guessed which gpio line to use and activated the ir-remote receiver.
The keymap seems to work fairly well with the supplied DSR-0112 remote, mostly
tested it with xev as I do not have a working lircd on this computer.
The patch is against 2.6.34.
Richard
Jun 15 16:46:27 localhost kernel: [24399.381936] usb 5-6: New USB device found, idVendor=2040, idProduct=5500
Jun 15 16:46:27 localhost kernel: [24399.381939] usb 5-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jun 15 16:46:27 localhost kernel: [24399.381941] usb 5-6: Product: WinTV MiniStick
Jun 15 16:46:27 localhost kernel: [24399.381943] usb 5-6: Manufacturer: Hauppauge Computer Works
Jun 15 16:46:27 localhost kernel: [24399.381945] usb 5-6: SerialNumber: f069684c
Jun 15 16:46:27 localhost kernel: [24399.384194] usb 5-6: firmware: requesting sms1xxx-hcw-55xxx-dvbt-02.fw
Jun 15 16:46:28 localhost kernel: [24400.000075] smscore_set_device_mode: firmware download success: sms1xxx-hcw-55
xxx-dvbt-02.fw
Jun 15 16:46:28 localhost kernel: [24400.000303] DVB: registering new adapter (Hauppauge WinTV MiniStick)
Jun 15 16:46:28 localhost kernel: [24400.000796] DVB: registering adapter 0 frontend 0 (Siano Mobile Digital MDTV R
eceiver)...
Jun 15 16:46:28 localhost kernel: [24400.001798] sms_ir_init: Allocating input device
Jun 15 16:46:28 localhost kernel: [24400.001802] sms_ir_init: IR remote keyboard type is 1
Jun 15 16:46:28 localhost kernel: [24400.001804] sms_ir_init: IR port 0, timeout 100 ms
Jun 15 16:46:28 localhost kernel: [24400.001807] sms_ir_init: Input device (IR) SMS IR w/kbd type 1 is set for key
events
Jun 15 16:46:28 localhost kernel: [24400.001887] input: SMS IR w/kbd type 1 as /devices/pci0000:00/0000:00:1d.7/usb
5/5-6/input/input9
--- linux-2.6.34/drivers/media/dvb/siano/smsir.h.rz 2010-06-11 11:24:20.000000000 +0200
+++ linux-2.6.34/drivers/media/dvb/siano/smsir.h 2010-06-11 01:12:54.000000000 +0200
@@ -30,6 +30,7 @@
enum ir_kb_type {
SMS_IR_KB_DEFAULT_TV,
+ SMS_IR_KB_HCW_DSR0112,
SMS_IR_KB_HCW_SILVER
};
--- linux-2.6.34/drivers/media/dvb/siano/smsir.c.rz 2010-06-11 10:07:32.000000000 +0200
+++ linux-2.6.34/drivers/media/dvb/siano/smsir.c 2010-06-15 18:08:37.000000000 +0200
@@ -54,6 +54,34 @@
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
},
+ [SMS_IR_KB_HCW_DSR0112] = {
+ .ir_protocol = IR_RC5,
+ .rc5_kbd_address = KEYBOARD_ADDRESS_LIGHTING,
+ .keyboard_layout_map = {
+ KEY_0, KEY_1, KEY_2,
+ KEY_3, KEY_4, KEY_5,
+ KEY_6, KEY_7, KEY_8,
+ KEY_9, KEY_TEXT, KEY_RED,
+ KEY_RADIO, KEY_MENU,
+ KEY_SUBTITLE,
+ KEY_MUTE, KEY_VOLUMEUP,
+ KEY_VOLUMEDOWN, KEY_PREVIOUS, 0,
+ KEY_UP, KEY_DOWN, KEY_LEFT,
+ KEY_RIGHT, KEY_VIDEO, KEY_AUDIO,
+ KEY_MHP, KEY_EPG, KEY_TV,
+ 0, KEY_NEXTSONG, KEY_EXIT,
+ KEY_CHANNELUP, KEY_CHANNELDOWN,
+ KEY_CHANNEL, 0,
+ KEY_PREVIOUSSONG, KEY_ENTER,
+ KEY_SLEEP, 0, 0, KEY_BLUE,
+ 0, 0, 0, 0, KEY_GREEN, 0,
+ KEY_PAUSE, 0, KEY_REWIND,
+ 0, KEY_FASTFORWARD, KEY_PLAY,
+ KEY_STOP, KEY_RECORD,
+ KEY_YELLOW, 0, 0, KEY_SELECT,
+ KEY_ZOOM, KEY_POWER, 0, 0
+ }
+ },
[SMS_IR_KB_HCW_SILVER] = {
.ir_protocol = IR_RC5,
.rc5_kbd_address = KEYBOARD_ADDRESS_LIGHTING1,
@@ -120,6 +148,7 @@
sms_log("kernel input keycode (from ir) %d", keycode);
input_report_key(coredev->ir.input_dev, keycode, 1);
+ input_report_key(coredev->ir.input_dev, keycode, 0);
input_sync(coredev->ir.input_dev);
}
@@ -247,6 +276,8 @@
int sms_ir_init(struct smscore_device_t *coredev)
{
struct input_dev *input_dev;
+ int i;
+ u16 *key_map;
sms_log("Allocating input device");
input_dev = input_allocate_device();
@@ -278,7 +309,14 @@
/* Key press events only */
input_dev->evbit[0] = BIT_MASK(EV_KEY);
- input_dev->keybit[BIT_WORD(BTN_0)] = BIT_MASK(BTN_0);
+
+ key_map = keyboard_layout_maps[coredev->ir.ir_kb_type].keyboard_layout_map;
+
+ memset (input_dev->keybit, 0, sizeof(input_dev->keybit));
+ for (i=0; i<IR_KEYBOARD_LAYOUT_SIZE; i++) {
+ if (key_map[i])
+ set_bit (key_map[i], input_dev->keybit);
+ }
sms_log("Input device (IR) %s is set for key events", input_dev->name);
--- linux-2.6.34/drivers/media/dvb/siano/sms-cards.c.rz 2010-06-09 14:37:19.000000000 +0200
+++ linux-2.6.34/drivers/media/dvb/siano/sms-cards.c 2010-06-11 01:08:49.000000000 +0200
@@ -64,6 +64,8 @@
.type = SMS_NOVA_B0,
.fw[DEVICE_MODE_ISDBT_BDA] = "sms1xxx-hcw-55xxx-isdbt-02.fw",
.fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw",
+ .ir_kb_type = SMS_IR_KB_HCW_DSR0112,
+ .board_cfg.ir = 4,
.board_cfg.leds_power = 26,
.board_cfg.led0 = 27,
.board_cfg.led1 = 28,
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] support for Hauppauge WinTV MiniStic IR remote
2010-06-15 16:23 [PATCH] support for Hauppauge WinTV MiniStic IR remote Richard Zidlicky
@ 2010-07-04 16:32 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2010-07-04 16:32 UTC (permalink / raw)
To: Richard Zidlicky; +Cc: linux-media
Em 15-06-2010 13:23, Richard Zidlicky escreveu:
> Hi,
>
> I have guessed which gpio line to use and activated the ir-remote receiver.
> The keymap seems to work fairly well with the supplied DSR-0112 remote, mostly
> tested it with xev as I do not have a working lircd on this computer.
>
> The patch is against 2.6.34.
There are a few CodingStyle issues. Also, please send your Signed-off-by:
Cheers,
Mauro
patching file drivers/media/dvb/siano/smsir.h
patching file drivers/media/dvb/siano/smsir.c
patching file drivers/media/dvb/siano/sms-cards.c
Patch applies OK
WARNING: please, no space before tabs
#77: FILE: drivers/media/dvb/siano/smsir.c:73:
+^I^I^I^I^IKEY_CHANNELUP, ^IKEY_CHANNELDOWN,$
WARNING: line over 80 characters
#115: FILE: drivers/media/dvb/siano/smsir.c:313:
+ key_map = keyboard_layout_maps[coredev->ir.ir_kb_type].keyboard_layout_map;
ERROR: trailing whitespace
#116: FILE: drivers/media/dvb/siano/smsir.c:314:
+^I^I$
WARNING: space prohibited between function name and open parenthesis '('
#117: FILE: drivers/media/dvb/siano/smsir.c:315:
+ memset (input_dev->keybit, 0, sizeof(input_dev->keybit));
ERROR: spaces required around that '=' (ctx:VxV)
#118: FILE: drivers/media/dvb/siano/smsir.c:316:
+ for (i=0; i<IR_KEYBOARD_LAYOUT_SIZE; i++) {
^
ERROR: spaces required around that '<' (ctx:VxV)
#118: FILE: drivers/media/dvb/siano/smsir.c:316:
+ for (i=0; i<IR_KEYBOARD_LAYOUT_SIZE; i++) {
^
WARNING: space prohibited between function name and open parenthesis '('
#120: FILE: drivers/media/dvb/siano/smsir.c:318:
+ set_bit (key_map[i], input_dev->keybit);
ERROR: Missing Signed-off-by: line(s)
total: 4 errors, 4 warnings, 79 lines checked
patches/lmml_106247_support_for_hauppauge_wintv_ministic_ir_remote.patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-04 16:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-15 16:23 [PATCH] support for Hauppauge WinTV MiniStic IR remote Richard Zidlicky
2010-07-04 16:32 ` Mauro Carvalho Chehab
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.