@@ -30,6 +30,7 @@
enum ir_kb_type {
SMS_IR_KB_DEFAULT_TV,
+ SMS_IR_KB_HCW_DSR0112,
SMS_IR_KB_HCW_SILVER
};
@@ -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);
@@ -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,