[linux-dvb] Re: [PATCH] budget-ci IR: keymap for Technotrend 1500

Ville-Pekka Vainio vpivaini at cs.helsinki.fi
Wed Nov 29 20:38:24 CET 2006


Ville-Pekka Vainio kirjoitti:
> Hello,
> 
> This is a patch to enable support for the Technotrend 1500 Budget
> bundled remote. It is based on a previous patch by Jussi Kukkonen.
...
> 
> 
> diff -r 9120d68b52b5 linux/drivers/media/common/ir-keymaps.c
> --- a/linux/drivers/media/common/ir-keymaps.c    Tue Nov 28 09:14:44 
> 2006 -0200
> +++ b/linux/drivers/media/common/ir-keymaps.c    Wed Nov 29 20:26:18 
> 2006 +0200
> @@ -1650,3 +1650,42 @@ IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR
>  };
> 
>  EXPORT_SYMBOL_GPL(ir_codes_budget_ci_old);
> +
> +/* for the Technotrend 1500 bundled remote: */
> +IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE] = {
> +    [ 0x01 ] = KEY_POWER,
> +    [ 0x02 ] = KEY_SHUFFLE,    /* ? double-arrow key */
> +    [ 0x03 ] = KEY_1,
> +    [ 0x04 ] = KEY_2,
> +    [ 0x05 ] = KEY_3,
> +    [ 0x06 ] = KEY_4,
> +    [ 0x07 ] = KEY_5,
> +    [ 0x08 ] = KEY_6,
> +    [ 0x09 ] = KEY_7,
> +    [ 0x0a ] = KEY_8,
> +    [ 0x0b ] = KEY_9,
> +    [ 0x0c ] = KEY_0,
> +    [ 0x0d ] = KEY_UP,
> +    [ 0x0e ] = KEY_LEFT,
> +    [ 0x0f ] = KEY_OK,
> +    [ 0x10 ] = KEY_RIGHT,
> +    [ 0x11 ] = KEY_DOWN,
> +    [ 0x12 ] = KEY_INFO,
> +    [ 0x13 ] = KEY_EXIT,
> +    [ 0x14 ] = KEY_RED,
> +    [ 0x15 ] = KEY_GREEN,
> +    [ 0x16 ] = KEY_YELLOW,
> +    [ 0x17 ] = KEY_BLUE,
> +    [ 0x18 ] = KEY_MUTE,
> +    [ 0x19 ] = KEY_TEXT,
> +    [ 0x1a ] = KEY_MODE,    /* ? TV/Radio */
> +    [ 0x21 ] = KEY_OPTION,
> +    [ 0x22 ] = KEY_EPG,
> +    [ 0x23 ] = KEY_CHANNELUP,
> +    [ 0x24 ] = KEY_CHANNELDOWN,
> +    [ 0x25 ] = KEY_VOLUMEUP,
> +    [ 0x26 ] = KEY_VOLUMEDOWN,
> +    [ 0x27 ] = KEY_SETUP,
> +};
> +
> +EXPORT_SYMBOL_GPL(ir_codes_tt_1500);
> diff -r 9120d68b52b5 linux/drivers/media/dvb/ttpci/budget-ci.c
> --- a/linux/drivers/media/dvb/ttpci/budget-ci.c    Tue Nov 28 09:14:44 2006
> -0200
> +++ b/linux/drivers/media/dvb/ttpci/budget-ci.c    Wed Nov 29 20:46:57 2006
> +0200
> @@ -229,7 +229,6 @@ static int msp430_ir_init(struct budget_
>      switch (budget_ci->budget.dev->pci->subsystem_device) {
>      case 0x100c:
>      case 0x100f:
> -    case 0x1010:
>      case 0x1011:
>      case 0x1012:
>      case 0x1017:
> @@ -239,6 +238,16 @@ static int msp430_ir_init(struct budget_
> 
>          if (rc5_device < 0)
>              budget_ci->ir.rc5_device = 0x1f;
> +        else
> +            budget_ci->ir.rc5_device = rc5_device;
> +        break;
> +    case 0x1010:
> +        /* for the Technotrend 1500 bundled remote */
> +        ir_input_init(input_dev, &budget_ci->ir.state,
> +                  IR_TYPE_RC5, ir_codes_tt_1500);
> +
> +        if (rc5_device < 0)
> +            budget_ci->ir.rc5_device = IR_DEVICE_ANY;
>          else
>              budget_ci->ir.rc5_device = rc5_device;
>          break;
> diff -r 9120d68b52b5 linux/include/media/ir-common.h
> --- a/linux/include/media/ir-common.h    Tue Nov 28 09:14:44 2006 -0200
> +++ b/linux/include/media/ir-common.h    Wed Nov 29 20:06:29 2006 +0200
> @@ -93,6 +93,7 @@ extern IR_KEYTAB_TYPE ir_codes_norwood[I
>  extern IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE];
>  extern IR_KEYTAB_TYPE ir_codes_proteus_2309[IR_KEYTAB_SIZE];
>  extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE];
> +extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE];
> 
>  #endif
> 
> 

Hello again,

As Michael Krufky pointed out on IRC, I forgot my sign-off, so here it is

Signed-off-by: Ville-Pekka Vainio <vpivaini at cs.helsinki.fi>

-- 
Ville-Pekka Vainio
vpivaini at cs.helsinki.fi



More information about the linux-dvb mailing list