[media] rename drivers/media/IR to drives/media/rc

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Mauro Carvalho Chehab
2010-11-09 23:00:14 -03:00
parent 3ffea4988b
commit 32cf86f6d1
113 changed files with 3 additions and 3 deletions

167
drivers/media/rc/Kconfig Normal file
View File

@@ -0,0 +1,167 @@
menuconfig IR_CORE
tristate "Infrared remote controller adapters"
depends on INPUT
default INPUT
---help---
Enable support for Remote Controllers on Linux. This is
needed in order to support several video capture adapters.
Enable this option if you have a video capture board even
if you don't need IR, as otherwise, you may not be able to
compile the driver for your adapter.
config IR_LEGACY
tristate
depends on IR_CORE
default IR_CORE
if IR_CORE
config LIRC
tristate
default y
---help---
Enable this option to build the Linux Infrared Remote
Control (LIRC) core device interface driver. The LIRC
interface passes raw IR to and from userspace, where the
LIRC daemon handles protocol decoding for IR reception and
encoding for IR transmitting (aka "blasting").
source "drivers/media/rc/keymaps/Kconfig"
config IR_NEC_DECODER
tristate "Enable IR raw decoder for the NEC protocol"
depends on IR_CORE
select BITREVERSE
default y
---help---
Enable this option if you have IR with NEC protocol, and
if the IR is decoded in software
config IR_RC5_DECODER
tristate "Enable IR raw decoder for the RC-5 protocol"
depends on IR_CORE
select BITREVERSE
default y
---help---
Enable this option if you have IR with RC-5 protocol, and
if the IR is decoded in software
config IR_RC6_DECODER
tristate "Enable IR raw decoder for the RC6 protocol"
depends on IR_CORE
select BITREVERSE
default y
---help---
Enable this option if you have an infrared remote control which
uses the RC6 protocol, and you need software decoding support.
config IR_JVC_DECODER
tristate "Enable IR raw decoder for the JVC protocol"
depends on IR_CORE
select BITREVERSE
default y
---help---
Enable this option if you have an infrared remote control which
uses the JVC protocol, and you need software decoding support.
config IR_SONY_DECODER
tristate "Enable IR raw decoder for the Sony protocol"
depends on IR_CORE
default y
---help---
Enable this option if you have an infrared remote control which
uses the Sony protocol, and you need software decoding support.
config IR_RC5_SZ_DECODER
tristate "Enable IR raw decoder for the RC-5 (streamzap) protocol"
depends on IR_CORE
select BITREVERSE
default y
---help---
Enable this option if you have IR with RC-5 (streamzap) protocol,
and if the IR is decoded in software. (The Streamzap PC Remote
uses an IR protocol that is almost standard RC-5, but not quite,
as it uses an additional bit).
config IR_LIRC_CODEC
tristate "Enable IR to LIRC bridge"
depends on IR_CORE
depends on LIRC
default y
---help---
Enable this option to pass raw IR to and from userspace via
the LIRC interface.
config IR_ENE
tristate "ENE eHome Receiver/Transceiver (pnp id: ENE0100/ENE02xxx)"
depends on PNP
depends on IR_CORE
---help---
Say Y here to enable support for integrated infrared receiver
/transceiver made by ENE.
You can see if you have it by looking at lspnp output.
Output should include ENE0100 ENE0200 or something similar.
To compile this driver as a module, choose M here: the
module will be called ene_ir.
config IR_IMON
tristate "SoundGraph iMON Receiver and Display"
depends on USB_ARCH_HAS_HCD
depends on IR_CORE
select USB
---help---
Say Y here if you want to use a SoundGraph iMON (aka Antec Veris)
IR Receiver and/or LCD/VFD/VGA display.
To compile this driver as a module, choose M here: the
module will be called imon.
config IR_MCEUSB
tristate "Windows Media Center Ed. eHome Infrared Transceiver"
depends on USB_ARCH_HAS_HCD
depends on IR_CORE
select USB
---help---
Say Y here if you want to use a Windows Media Center Edition
eHome Infrared Transceiver.
To compile this driver as a module, choose M here: the
module will be called mceusb.
config IR_NUVOTON
tristate "Nuvoton w836x7hg Consumer Infrared Transceiver"
depends on PNP
depends on IR_CORE
---help---
Say Y here to enable support for integrated infrared receiver
/transciever made by Nuvoton (formerly Winbond). This chip is
found in the ASRock ION 330HT, as well as assorted Intel
DP55-series motherboards (and of course, possibly others).
To compile this driver as a module, choose M here: the
module will be called nuvoton-cir.
config IR_STREAMZAP
tristate "Streamzap PC Remote IR Receiver"
depends on USB_ARCH_HAS_HCD
depends on IR_CORE
select USB
---help---
Say Y here if you want to use a Streamzap PC Remote
Infrared Receiver.
To compile this driver as a module, choose M here: the
module will be called streamzap.
endif #IR_CORE

22
drivers/media/rc/Makefile Normal file
View File

@@ -0,0 +1,22 @@
ir-common-objs := ir-functions.o
ir-core-objs := ir-keytable.o ir-sysfs.o ir-raw-event.o rc-map.o
obj-y += keymaps/
obj-$(CONFIG_IR_CORE) += ir-core.o
obj-$(CONFIG_IR_LEGACY) += ir-common.o
obj-$(CONFIG_LIRC) += lirc_dev.o
obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o
obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o
obj-$(CONFIG_IR_RC6_DECODER) += ir-rc6-decoder.o
obj-$(CONFIG_IR_JVC_DECODER) += ir-jvc-decoder.o
obj-$(CONFIG_IR_SONY_DECODER) += ir-sony-decoder.o
obj-$(CONFIG_IR_RC5_SZ_DECODER) += ir-rc5-sz-decoder.o
obj-$(CONFIG_IR_LIRC_CODEC) += ir-lirc-codec.o
# stand-alone IR receivers/transmitters
obj-$(CONFIG_IR_IMON) += imon.o
obj-$(CONFIG_IR_MCEUSB) += mceusb.o
obj-$(CONFIG_IR_NUVOTON) += nuvoton-cir.o
obj-$(CONFIG_IR_ENE) += ene_ir.o
obj-$(CONFIG_IR_STREAMZAP) += streamzap.o

1217
drivers/media/rc/ene_ir.c Normal file

File diff suppressed because it is too large Load Diff

262
drivers/media/rc/ene_ir.h Normal file
View File

@@ -0,0 +1,262 @@
/*
* driver for ENE KB3926 B/C/D/E/F CIR (also known as ENE0XXX)
*
* Copyright (C) 2010 Maxim Levitsky <maximlevitsky@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
#include <linux/spinlock.h>
/* hardware address */
#define ENE_STATUS 0 /* hardware status - unused */
#define ENE_ADDR_HI 1 /* hi byte of register address */
#define ENE_ADDR_LO 2 /* low byte of register address */
#define ENE_IO 3 /* read/write window */
#define ENE_IO_SIZE 4
/* 8 bytes of samples, divided in 2 packets*/
#define ENE_FW_SAMPLE_BUFFER 0xF8F0 /* sample buffer */
#define ENE_FW_SAMPLE_SPACE 0x80 /* sample is space */
#define ENE_FW_PACKET_SIZE 4
/* first firmware flag register */
#define ENE_FW1 0xF8F8 /* flagr */
#define ENE_FW1_ENABLE 0x01 /* enable fw processing */
#define ENE_FW1_TXIRQ 0x02 /* TX interrupt pending */
#define ENE_FW1_HAS_EXTRA_BUF 0x04 /* fw uses extra buffer*/
#define ENE_FW1_EXTRA_BUF_HND 0x08 /* extra buffer handshake bit*/
#define ENE_FW1_LED_ON 0x10 /* turn on a led */
#define ENE_FW1_WPATTERN 0x20 /* enable wake pattern */
#define ENE_FW1_WAKE 0x40 /* enable wake from S3 */
#define ENE_FW1_IRQ 0x80 /* enable interrupt */
/* second firmware flag register */
#define ENE_FW2 0xF8F9 /* flagw */
#define ENE_FW2_BUF_WPTR 0x01 /* which half of the buffer to read */
#define ENE_FW2_RXIRQ 0x04 /* RX IRQ pending*/
#define ENE_FW2_GP0A 0x08 /* Use GPIO0A for demodulated input */
#define ENE_FW2_EMMITER1_CONN 0x10 /* TX emmiter 1 connected */
#define ENE_FW2_EMMITER2_CONN 0x20 /* TX emmiter 2 connected */
#define ENE_FW2_FAN_INPUT 0x40 /* fan input used for demodulated data*/
#define ENE_FW2_LEARNING 0x80 /* hardware supports learning and TX */
/* firmware RX pointer for new style buffer */
#define ENE_FW_RX_POINTER 0xF8FA
/* high parts of samples for fan input (8 samples)*/
#define ENE_FW_SMPL_BUF_FAN 0xF8FB
#define ENE_FW_SMPL_BUF_FAN_PLS 0x8000 /* combined sample is pulse */
#define ENE_FW_SMPL_BUF_FAN_MSK 0x0FFF /* combined sample maximum value */
#define ENE_FW_SAMPLE_PERIOD_FAN 61 /* fan input has fixed sample period */
/* transmitter ports */
#define ENE_GPIOFS1 0xFC01
#define ENE_GPIOFS1_GPIO0D 0x20 /* enable tx output on GPIO0D */
#define ENE_GPIOFS8 0xFC08
#define ENE_GPIOFS8_GPIO41 0x02 /* enable tx output on GPIO40 */
/* IRQ registers block (for revision B) */
#define ENEB_IRQ 0xFD09 /* IRQ number */
#define ENEB_IRQ_UNK1 0xFD17 /* unknown setting = 1 */
#define ENEB_IRQ_STATUS 0xFD80 /* irq status */
#define ENEB_IRQ_STATUS_IR 0x20 /* IR irq */
/* fan as input settings */
#define ENE_FAN_AS_IN1 0xFE30 /* fan init reg 1 */
#define ENE_FAN_AS_IN1_EN 0xCD
#define ENE_FAN_AS_IN2 0xFE31 /* fan init reg 2 */
#define ENE_FAN_AS_IN2_EN 0x03
/* IRQ registers block (for revision C,D) */
#define ENE_IRQ 0xFE9B /* new irq settings register */
#define ENE_IRQ_MASK 0x0F /* irq number mask */
#define ENE_IRQ_UNK_EN 0x10 /* always enabled */
#define ENE_IRQ_STATUS 0x20 /* irq status and ACK */
/* CIR Config register #1 */
#define ENE_CIRCFG 0xFEC0
#define ENE_CIRCFG_RX_EN 0x01 /* RX enable */
#define ENE_CIRCFG_RX_IRQ 0x02 /* Enable hardware interrupt */
#define ENE_CIRCFG_REV_POL 0x04 /* Input polarity reversed */
#define ENE_CIRCFG_CARR_DEMOD 0x08 /* Enable carrier demodulator */
#define ENE_CIRCFG_TX_EN 0x10 /* TX enable */
#define ENE_CIRCFG_TX_IRQ 0x20 /* Send interrupt on TX done */
#define ENE_CIRCFG_TX_POL_REV 0x40 /* TX polarity reversed */
#define ENE_CIRCFG_TX_CARR 0x80 /* send TX carrier or not */
/* CIR config register #2 */
#define ENE_CIRCFG2 0xFEC1
#define ENE_CIRCFG2_RLC 0x00
#define ENE_CIRCFG2_RC5 0x01
#define ENE_CIRCFG2_RC6 0x02
#define ENE_CIRCFG2_NEC 0x03
#define ENE_CIRCFG2_CARR_DETECT 0x10 /* Enable carrier detection */
#define ENE_CIRCFG2_GPIO0A 0x20 /* Use GPIO0A instead of GPIO40 for input */
#define ENE_CIRCFG2_FAST_SAMPL1 0x40 /* Fast leading pulse detection for RC6 */
#define ENE_CIRCFG2_FAST_SAMPL2 0x80 /* Fast data detection for RC6 */
/* Knobs for protocol decoding - will document when/if will use them */
#define ENE_CIRPF 0xFEC2
#define ENE_CIRHIGH 0xFEC3
#define ENE_CIRBIT 0xFEC4
#define ENE_CIRSTART 0xFEC5
#define ENE_CIRSTART2 0xFEC6
/* Actual register which contains RLC RX data - read by firmware */
#define ENE_CIRDAT_IN 0xFEC7
/* RLC configuration - sample period (1us resulution) + idle mode */
#define ENE_CIRRLC_CFG 0xFEC8
#define ENE_CIRRLC_CFG_OVERFLOW 0x80 /* interrupt on overflows if set */
#define ENE_DEFAULT_SAMPLE_PERIOD 50
/* Two byte RLC TX buffer */
#define ENE_CIRRLC_OUT0 0xFEC9
#define ENE_CIRRLC_OUT1 0xFECA
#define ENE_CIRRLC_OUT_PULSE 0x80 /* Transmitted sample is pulse */
#define ENE_CIRRLC_OUT_MASK 0x7F
/* Carrier detect setting
* Low nibble - number of carrier pulses to average
* High nibble - number of initial carrier pulses to discard
*/
#define ENE_CIRCAR_PULS 0xFECB
/* detected RX carrier period (resolution: 500 ns) */
#define ENE_CIRCAR_PRD 0xFECC
#define ENE_CIRCAR_PRD_VALID 0x80 /* data valid content valid */
/* detected RX carrier pulse width (resolution: 500 ns) */
#define ENE_CIRCAR_HPRD 0xFECD
/* TX period (resolution: 500 ns, minimum 2)*/
#define ENE_CIRMOD_PRD 0xFECE
#define ENE_CIRMOD_PRD_POL 0x80 /* TX carrier polarity*/
#define ENE_CIRMOD_PRD_MAX 0x7F /* 15.87 kHz */
#define ENE_CIRMOD_PRD_MIN 0x02 /* 1 Mhz */
/* TX pulse width (resolution: 500 ns)*/
#define ENE_CIRMOD_HPRD 0xFECF
/* Hardware versions */
#define ENE_ECHV 0xFF00 /* hardware revision */
#define ENE_PLLFRH 0xFF16
#define ENE_PLLFRL 0xFF17
#define ENE_DEFAULT_PLL_FREQ 1000
#define ENE_ECSTS 0xFF1D
#define ENE_ECSTS_RSRVD 0x04
#define ENE_ECVER_MAJOR 0xFF1E /* chip version */
#define ENE_ECVER_MINOR 0xFF1F
#define ENE_HW_VER_OLD 0xFD00
/******************************************************************************/
#define ENE_DRIVER_NAME "ene_ir"
#define ENE_IRQ_RX 1
#define ENE_IRQ_TX 2
#define ENE_HW_B 1 /* 3926B */
#define ENE_HW_C 2 /* 3926C */
#define ENE_HW_D 3 /* 3926D or later */
#define ene_printk(level, text, ...) \
printk(level ENE_DRIVER_NAME ": " text "\n", ## __VA_ARGS__)
#define ene_notice(text, ...) ene_printk(KERN_NOTICE, text, ## __VA_ARGS__)
#define ene_warn(text, ...) ene_printk(KERN_WARNING, text, ## __VA_ARGS__)
#define __dbg(level, format, ...) \
do { \
if (debug >= level) \
printk(KERN_DEBUG ENE_DRIVER_NAME \
": " format "\n", ## __VA_ARGS__); \
} while (0)
#define dbg(format, ...) __dbg(1, format, ## __VA_ARGS__)
#define dbg_verbose(format, ...) __dbg(2, format, ## __VA_ARGS__)
#define dbg_regs(format, ...) __dbg(3, format, ## __VA_ARGS__)
#define MS_TO_NS(msec) ((msec) * 1000)
struct ene_device {
struct pnp_dev *pnp_dev;
struct input_dev *idev;
struct ir_dev_props *props;
/* hw IO settings */
long hw_io;
int irq;
spinlock_t hw_lock;
/* HW features */
int hw_revision; /* hardware revision */
bool hw_use_gpio_0a; /* gpio0a is demodulated input*/
bool hw_extra_buffer; /* hardware has 'extra buffer' */
bool hw_fan_input; /* fan input is IR data source */
bool hw_learning_and_tx_capable; /* learning & tx capable */
int pll_freq;
int buffer_len;
/* Extra RX buffer location */
int extra_buf1_address;
int extra_buf1_len;
int extra_buf2_address;
int extra_buf2_len;
/* HW state*/
int r_pointer; /* pointer to next sample to read */
int w_pointer; /* pointer to next sample hw will write */
bool rx_fan_input_inuse; /* is fan input in use for rx*/
int tx_reg; /* current reg used for TX */
u8 saved_conf1; /* saved FEC0 reg */
unsigned int tx_sample; /* current sample for TX */
bool tx_sample_pulse; /* current sample is pulse */
/* TX buffer */
int *tx_buffer; /* input samples buffer*/
int tx_pos; /* position in that bufer */
int tx_len; /* current len of tx buffer */
int tx_done; /* done transmitting */
/* one more sample pending*/
struct completion tx_complete; /* TX completion */
struct timer_list tx_sim_timer;
/* TX settings */
int tx_period;
int tx_duty_cycle;
int transmitter_mask;
/* RX settings */
bool learning_mode_enabled; /* learning input enabled */
bool carrier_detect_enabled; /* carrier detect enabled */
int rx_period_adjust;
bool rx_enabled;
};
static int ene_irq_status(struct ene_device *dev);
static void ene_rx_read_hw_pointer(struct ene_device *dev);

2465
drivers/media/rc/imon.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,203 @@
/*
* Remote Controller core raw events header
*
* Copyright (C) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _IR_RAW_EVENT
#define _IR_RAW_EVENT
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <media/ir-core.h>
struct ir_raw_handler {
struct list_head list;
u64 protocols; /* which are handled by this handler */
int (*decode)(struct input_dev *input_dev, struct ir_raw_event event);
/* These two should only be used by the lirc decoder */
int (*raw_register)(struct input_dev *input_dev);
int (*raw_unregister)(struct input_dev *input_dev);
};
struct ir_raw_event_ctrl {
struct list_head list; /* to keep track of raw clients */
struct task_struct *thread;
spinlock_t lock;
struct kfifo kfifo; /* fifo for the pulse/space durations */
ktime_t last_event; /* when last event occurred */
enum raw_event_type last_type; /* last event type */
struct input_dev *input_dev; /* pointer to the parent input_dev */
u64 enabled_protocols; /* enabled raw protocol decoders */
/* raw decoder state follows */
struct ir_raw_event prev_ev;
struct ir_raw_event this_ev;
struct nec_dec {
int state;
unsigned count;
u32 bits;
bool is_nec_x;
bool necx_repeat;
} nec;
struct rc5_dec {
int state;
u32 bits;
unsigned count;
unsigned wanted_bits;
} rc5;
struct rc6_dec {
int state;
u8 header;
u32 body;
bool toggle;
unsigned count;
unsigned wanted_bits;
} rc6;
struct sony_dec {
int state;
u32 bits;
unsigned count;
} sony;
struct jvc_dec {
int state;
u16 bits;
u16 old_bits;
unsigned count;
bool first;
bool toggle;
} jvc;
struct rc5_sz_dec {
int state;
u32 bits;
unsigned count;
unsigned wanted_bits;
} rc5_sz;
struct lirc_codec {
struct ir_input_dev *ir_dev;
struct lirc_driver *drv;
int carrier_low;
ktime_t gap_start;
u64 gap_duration;
bool gap;
bool send_timeout_reports;
} lirc;
};
/* macros for IR decoders */
static inline bool geq_margin(unsigned d1, unsigned d2, unsigned margin)
{
return d1 > (d2 - margin);
}
static inline bool eq_margin(unsigned d1, unsigned d2, unsigned margin)
{
return ((d1 > (d2 - margin)) && (d1 < (d2 + margin)));
}
static inline bool is_transition(struct ir_raw_event *x, struct ir_raw_event *y)
{
return x->pulse != y->pulse;
}
static inline void decrease_duration(struct ir_raw_event *ev, unsigned duration)
{
if (duration > ev->duration)
ev->duration = 0;
else
ev->duration -= duration;
}
/* Returns true if event is normal pulse/space event */
static inline bool is_timing_event(struct ir_raw_event ev)
{
return !ev.carrier_report && !ev.reset;
}
#define TO_US(duration) DIV_ROUND_CLOSEST((duration), 1000)
#define TO_STR(is_pulse) ((is_pulse) ? "pulse" : "space")
/*
* Routines from ir-sysfs.c - Meant to be called only internally inside
* ir-core
*/
int ir_register_input(struct input_dev *input_dev);
int ir_register_class(struct input_dev *input_dev);
void ir_unregister_class(struct input_dev *input_dev);
/*
* Routines from ir-raw-event.c to be used internally and by decoders
*/
u64 ir_raw_get_allowed_protocols(void);
int ir_raw_event_register(struct input_dev *input_dev);
void ir_raw_event_unregister(struct input_dev *input_dev);
int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler);
void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler);
void ir_raw_init(void);
int ir_rcmap_init(void);
void ir_rcmap_cleanup(void);
/*
* Decoder initialization code
*
* Those load logic are called during ir-core init, and automatically
* loads the compiled decoders for their usage with IR raw events
*/
/* from ir-nec-decoder.c */
#ifdef CONFIG_IR_NEC_DECODER_MODULE
#define load_nec_decode() request_module("ir-nec-decoder")
#else
#define load_nec_decode() 0
#endif
/* from ir-rc5-decoder.c */
#ifdef CONFIG_IR_RC5_DECODER_MODULE
#define load_rc5_decode() request_module("ir-rc5-decoder")
#else
#define load_rc5_decode() 0
#endif
/* from ir-rc6-decoder.c */
#ifdef CONFIG_IR_RC6_DECODER_MODULE
#define load_rc6_decode() request_module("ir-rc6-decoder")
#else
#define load_rc6_decode() 0
#endif
/* from ir-jvc-decoder.c */
#ifdef CONFIG_IR_JVC_DECODER_MODULE
#define load_jvc_decode() request_module("ir-jvc-decoder")
#else
#define load_jvc_decode() 0
#endif
/* from ir-sony-decoder.c */
#ifdef CONFIG_IR_SONY_DECODER_MODULE
#define load_sony_decode() request_module("ir-sony-decoder")
#else
#define load_sony_decode() 0
#endif
/* from ir-lirc-codec.c */
#ifdef CONFIG_IR_LIRC_CODEC_MODULE
#define load_lirc_codec() request_module("ir-lirc-codec")
#else
#define load_lirc_codec() 0
#endif
#endif /* _IR_RAW_EVENT */

View File

@@ -0,0 +1,120 @@
/*
* some common functions to handle infrared remote protocol decoding for
* drivers which have not yet been (or can't be) converted to use the
* regular protocol decoders...
*
* (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/module.h>
#include <linux/string.h>
#include <linux/jiffies.h>
#include <media/ir-common.h>
#include "ir-core-priv.h"
/* -------------------------------------------------------------------------- */
MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
MODULE_LICENSE("GPL");
/* RC5 decoding stuff, moved from bttv-input.c to share it with
* saa7134 */
/* decode raw bit pattern to RC5 code */
static u32 ir_rc5_decode(unsigned int code)
{
unsigned int org_code = code;
unsigned int pair;
unsigned int rc5 = 0;
int i;
for (i = 0; i < 14; ++i) {
pair = code & 0x3;
code >>= 2;
rc5 <<= 1;
switch (pair) {
case 0:
case 2:
break;
case 1:
rc5 |= 1;
break;
case 3:
IR_dprintk(1, "ir-common: ir_rc5_decode(%x) bad code\n", org_code);
return 0;
}
}
IR_dprintk(1, "ir-common: code=%x, rc5=%x, start=%x, toggle=%x, address=%x, "
"instr=%x\n", rc5, org_code, RC5_START(rc5),
RC5_TOGGLE(rc5), RC5_ADDR(rc5), RC5_INSTR(rc5));
return rc5;
}
void ir_rc5_timer_end(unsigned long data)
{
struct card_ir *ir = (struct card_ir *)data;
struct timeval tv;
unsigned long current_jiffies;
u32 gap;
u32 rc5 = 0;
/* get time */
current_jiffies = jiffies;
do_gettimeofday(&tv);
/* avoid overflow with gap >1s */
if (tv.tv_sec - ir->base_time.tv_sec > 1) {
gap = 200000;
} else {
gap = 1000000 * (tv.tv_sec - ir->base_time.tv_sec) +
tv.tv_usec - ir->base_time.tv_usec;
}
/* signal we're ready to start a new code */
ir->active = 0;
/* Allow some timer jitter (RC5 is ~24ms anyway so this is ok) */
if (gap < 28000) {
IR_dprintk(1, "ir-common: spurious timer_end\n");
return;
}
if (ir->last_bit < 20) {
/* ignore spurious codes (caused by light/other remotes) */
IR_dprintk(1, "ir-common: short code: %x\n", ir->code);
} else {
ir->code = (ir->code << ir->shift_by) | 1;
rc5 = ir_rc5_decode(ir->code);
/* two start bits? */
if (RC5_START(rc5) != ir->start) {
IR_dprintk(1, "ir-common: rc5 start bits invalid: %u\n", RC5_START(rc5));
/* right address? */
} else if (RC5_ADDR(rc5) == ir->addr) {
u32 toggle = RC5_TOGGLE(rc5);
u32 instr = RC5_INSTR(rc5);
/* Good code */
ir_keydown(ir->dev, instr, toggle);
IR_dprintk(1, "ir-common: instruction %x, toggle %x\n",
instr, toggle);
}
}
}
EXPORT_SYMBOL_GPL(ir_rc5_timer_end);

View File

@@ -0,0 +1,199 @@
/* ir-jvc-decoder.c - handle JVC IR Pulse/Space protocol
*
* Copyright (C) 2010 by David Härdeman <david@hardeman.nu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/bitrev.h>
#include "ir-core-priv.h"
#define JVC_NBITS 16 /* dev(8) + func(8) */
#define JVC_UNIT 525000 /* ns */
#define JVC_HEADER_PULSE (16 * JVC_UNIT) /* lack of header -> repeat */
#define JVC_HEADER_SPACE (8 * JVC_UNIT)
#define JVC_BIT_PULSE (1 * JVC_UNIT)
#define JVC_BIT_0_SPACE (1 * JVC_UNIT)
#define JVC_BIT_1_SPACE (3 * JVC_UNIT)
#define JVC_TRAILER_PULSE (1 * JVC_UNIT)
#define JVC_TRAILER_SPACE (35 * JVC_UNIT)
enum jvc_state {
STATE_INACTIVE,
STATE_HEADER_SPACE,
STATE_BIT_PULSE,
STATE_BIT_SPACE,
STATE_TRAILER_PULSE,
STATE_TRAILER_SPACE,
STATE_CHECK_REPEAT,
};
/**
* ir_jvc_decode() - Decode one JVC pulse or space
* @input_dev: the struct input_dev descriptor of the device
* @duration: the struct ir_raw_event descriptor of the pulse/space
*
* This function returns -EINVAL if the pulse violates the state machine
*/
static int ir_jvc_decode(struct input_dev *input_dev, struct ir_raw_event ev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
struct jvc_dec *data = &ir_dev->raw->jvc;
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_JVC))
return 0;
if (!is_timing_event(ev)) {
if (ev.reset)
data->state = STATE_INACTIVE;
return 0;
}
if (!geq_margin(ev.duration, JVC_UNIT, JVC_UNIT / 2))
goto out;
IR_dprintk(2, "JVC decode started at state %d (%uus %s)\n",
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
again:
switch (data->state) {
case STATE_INACTIVE:
if (!ev.pulse)
break;
if (!eq_margin(ev.duration, JVC_HEADER_PULSE, JVC_UNIT / 2))
break;
data->count = 0;
data->first = true;
data->toggle = !data->toggle;
data->state = STATE_HEADER_SPACE;
return 0;
case STATE_HEADER_SPACE:
if (ev.pulse)
break;
if (!eq_margin(ev.duration, JVC_HEADER_SPACE, JVC_UNIT / 2))
break;
data->state = STATE_BIT_PULSE;
return 0;
case STATE_BIT_PULSE:
if (!ev.pulse)
break;
if (!eq_margin(ev.duration, JVC_BIT_PULSE, JVC_UNIT / 2))
break;
data->state = STATE_BIT_SPACE;
return 0;
case STATE_BIT_SPACE:
if (ev.pulse)
break;
data->bits <<= 1;
if (eq_margin(ev.duration, JVC_BIT_1_SPACE, JVC_UNIT / 2)) {
data->bits |= 1;
decrease_duration(&ev, JVC_BIT_1_SPACE);
} else if (eq_margin(ev.duration, JVC_BIT_0_SPACE, JVC_UNIT / 2))
decrease_duration(&ev, JVC_BIT_0_SPACE);
else
break;
data->count++;
if (data->count == JVC_NBITS)
data->state = STATE_TRAILER_PULSE;
else
data->state = STATE_BIT_PULSE;
return 0;
case STATE_TRAILER_PULSE:
if (!ev.pulse)
break;
if (!eq_margin(ev.duration, JVC_TRAILER_PULSE, JVC_UNIT / 2))
break;
data->state = STATE_TRAILER_SPACE;
return 0;
case STATE_TRAILER_SPACE:
if (ev.pulse)
break;
if (!geq_margin(ev.duration, JVC_TRAILER_SPACE, JVC_UNIT / 2))
break;
if (data->first) {
u32 scancode;
scancode = (bitrev8((data->bits >> 8) & 0xff) << 8) |
(bitrev8((data->bits >> 0) & 0xff) << 0);
IR_dprintk(1, "JVC scancode 0x%04x\n", scancode);
ir_keydown(input_dev, scancode, data->toggle);
data->first = false;
data->old_bits = data->bits;
} else if (data->bits == data->old_bits) {
IR_dprintk(1, "JVC repeat\n");
ir_repeat(input_dev);
} else {
IR_dprintk(1, "JVC invalid repeat msg\n");
break;
}
data->count = 0;
data->state = STATE_CHECK_REPEAT;
return 0;
case STATE_CHECK_REPEAT:
if (!ev.pulse)
break;
if (eq_margin(ev.duration, JVC_HEADER_PULSE, JVC_UNIT / 2))
data->state = STATE_INACTIVE;
else
data->state = STATE_BIT_PULSE;
goto again;
}
out:
IR_dprintk(1, "JVC decode failed at state %d (%uus %s)\n",
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
data->state = STATE_INACTIVE;
return -EINVAL;
}
static struct ir_raw_handler jvc_handler = {
.protocols = IR_TYPE_JVC,
.decode = ir_jvc_decode,
};
static int __init ir_jvc_decode_init(void)
{
ir_raw_handler_register(&jvc_handler);
printk(KERN_INFO "IR JVC protocol handler initialized\n");
return 0;
}
static void __exit ir_jvc_decode_exit(void)
{
ir_raw_handler_unregister(&jvc_handler);
}
module_init(ir_jvc_decode_init);
module_exit(ir_jvc_decode_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Härdeman <david@hardeman.nu>");
MODULE_DESCRIPTION("JVC IR protocol decoder");

View File

@@ -0,0 +1,766 @@
/* ir-keytable.c - handle IR scancode->keycode tables
*
* Copyright (C) 2009 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/input.h>
#include <linux/slab.h>
#include "ir-core-priv.h"
/* Sizes are in bytes, 256 bytes allows for 32 entries on x64 */
#define IR_TAB_MIN_SIZE 256
#define IR_TAB_MAX_SIZE 8192
/* FIXME: IR_KEYPRESS_TIMEOUT should be protocol specific */
#define IR_KEYPRESS_TIMEOUT 250
/**
* ir_create_table() - initializes a scancode table
* @rc_tab: the ir_scancode_table to initialize
* @name: name to assign to the table
* @ir_type: ir type to assign to the new table
* @size: initial size of the table
* @return: zero on success or a negative error code
*
* This routine will initialize the ir_scancode_table and will allocate
* memory to hold at least the specified number elements.
*/
static int ir_create_table(struct ir_scancode_table *rc_tab,
const char *name, u64 ir_type, size_t size)
{
rc_tab->name = name;
rc_tab->ir_type = ir_type;
rc_tab->alloc = roundup_pow_of_two(size * sizeof(struct ir_scancode));
rc_tab->size = rc_tab->alloc / sizeof(struct ir_scancode);
rc_tab->scan = kmalloc(rc_tab->alloc, GFP_KERNEL);
if (!rc_tab->scan)
return -ENOMEM;
IR_dprintk(1, "Allocated space for %u keycode entries (%u bytes)\n",
rc_tab->size, rc_tab->alloc);
return 0;
}
/**
* ir_free_table() - frees memory allocated by a scancode table
* @rc_tab: the table whose mappings need to be freed
*
* This routine will free memory alloctaed for key mappings used by given
* scancode table.
*/
static void ir_free_table(struct ir_scancode_table *rc_tab)
{
rc_tab->size = 0;
kfree(rc_tab->scan);
rc_tab->scan = NULL;
}
/**
* ir_resize_table() - resizes a scancode table if necessary
* @rc_tab: the ir_scancode_table to resize
* @gfp_flags: gfp flags to use when allocating memory
* @return: zero on success or a negative error code
*
* This routine will shrink the ir_scancode_table if it has lots of
* unused entries and grow it if it is full.
*/
static int ir_resize_table(struct ir_scancode_table *rc_tab, gfp_t gfp_flags)
{
unsigned int oldalloc = rc_tab->alloc;
unsigned int newalloc = oldalloc;
struct ir_scancode *oldscan = rc_tab->scan;
struct ir_scancode *newscan;
if (rc_tab->size == rc_tab->len) {
/* All entries in use -> grow keytable */
if (rc_tab->alloc >= IR_TAB_MAX_SIZE)
return -ENOMEM;
newalloc *= 2;
IR_dprintk(1, "Growing table to %u bytes\n", newalloc);
}
if ((rc_tab->len * 3 < rc_tab->size) && (oldalloc > IR_TAB_MIN_SIZE)) {
/* Less than 1/3 of entries in use -> shrink keytable */
newalloc /= 2;
IR_dprintk(1, "Shrinking table to %u bytes\n", newalloc);
}
if (newalloc == oldalloc)
return 0;
newscan = kmalloc(newalloc, gfp_flags);
if (!newscan) {
IR_dprintk(1, "Failed to kmalloc %u bytes\n", newalloc);
return -ENOMEM;
}
memcpy(newscan, rc_tab->scan, rc_tab->len * sizeof(struct ir_scancode));
rc_tab->scan = newscan;
rc_tab->alloc = newalloc;
rc_tab->size = rc_tab->alloc / sizeof(struct ir_scancode);
kfree(oldscan);
return 0;
}
/**
* ir_update_mapping() - set a keycode in the scancode->keycode table
* @dev: the struct input_dev device descriptor
* @rc_tab: scancode table to be adjusted
* @index: index of the mapping that needs to be updated
* @keycode: the desired keycode
* @return: previous keycode assigned to the mapping
*
* This routine is used to update scancode->keycopde mapping at given
* position.
*/
static unsigned int ir_update_mapping(struct input_dev *dev,
struct ir_scancode_table *rc_tab,
unsigned int index,
unsigned int new_keycode)
{
int old_keycode = rc_tab->scan[index].keycode;
int i;
/* Did the user wish to remove the mapping? */
if (new_keycode == KEY_RESERVED || new_keycode == KEY_UNKNOWN) {
IR_dprintk(1, "#%d: Deleting scan 0x%04x\n",
index, rc_tab->scan[index].scancode);
rc_tab->len--;
memmove(&rc_tab->scan[index], &rc_tab->scan[index+ 1],
(rc_tab->len - index) * sizeof(struct ir_scancode));
} else {
IR_dprintk(1, "#%d: %s scan 0x%04x with key 0x%04x\n",
index,
old_keycode == KEY_RESERVED ? "New" : "Replacing",
rc_tab->scan[index].scancode, new_keycode);
rc_tab->scan[index].keycode = new_keycode;
__set_bit(new_keycode, dev->keybit);
}
if (old_keycode != KEY_RESERVED) {
/* A previous mapping was updated... */
__clear_bit(old_keycode, dev->keybit);
/* ... but another scancode might use the same keycode */
for (i = 0; i < rc_tab->len; i++) {
if (rc_tab->scan[i].keycode == old_keycode) {
__set_bit(old_keycode, dev->keybit);
break;
}
}
/* Possibly shrink the keytable, failure is not a problem */
ir_resize_table(rc_tab, GFP_ATOMIC);
}
return old_keycode;
}
/**
* ir_locate_scancode() - set a keycode in the scancode->keycode table
* @ir_dev: the struct ir_input_dev device descriptor
* @rc_tab: scancode table to be searched
* @scancode: the desired scancode
* @resize: controls whether we allowed to resize the table to
* accomodate not yet present scancodes
* @return: index of the mapping containing scancode in question
* or -1U in case of failure.
*
* This routine is used to locate given scancode in ir_scancode_table.
* If scancode is not yet present the routine will allocate a new slot
* for it.
*/
static unsigned int ir_establish_scancode(struct ir_input_dev *ir_dev,
struct ir_scancode_table *rc_tab,
unsigned int scancode,
bool resize)
{
unsigned int i;
/*
* Unfortunately, some hardware-based IR decoders don't provide
* all bits for the complete IR code. In general, they provide only
* the command part of the IR code. Yet, as it is possible to replace
* the provided IR with another one, it is needed to allow loading
* IR tables from other remotes. So,
*/
if (ir_dev->props && ir_dev->props->scanmask)
scancode &= ir_dev->props->scanmask;
/* First check if we already have a mapping for this ir command */
for (i = 0; i < rc_tab->len; i++) {
if (rc_tab->scan[i].scancode == scancode)
return i;
/* Keytable is sorted from lowest to highest scancode */
if (rc_tab->scan[i].scancode >= scancode)
break;
}
/* No previous mapping found, we might need to grow the table */
if (rc_tab->size == rc_tab->len) {
if (!resize || ir_resize_table(rc_tab, GFP_ATOMIC))
return -1U;
}
/* i is the proper index to insert our new keycode */
if (i < rc_tab->len)
memmove(&rc_tab->scan[i + 1], &rc_tab->scan[i],
(rc_tab->len - i) * sizeof(struct ir_scancode));
rc_tab->scan[i].scancode = scancode;
rc_tab->scan[i].keycode = KEY_RESERVED;
rc_tab->len++;
return i;
}
/**
* ir_setkeycode() - set a keycode in the scancode->keycode table
* @dev: the struct input_dev device descriptor
* @scancode: the desired scancode
* @keycode: result
* @return: -EINVAL if the keycode could not be inserted, otherwise zero.
*
* This routine is used to handle evdev EVIOCSKEY ioctl.
*/
static int ir_setkeycode(struct input_dev *dev,
const struct input_keymap_entry *ke,
unsigned int *old_keycode)
{
struct ir_input_dev *ir_dev = input_get_drvdata(dev);
struct ir_scancode_table *rc_tab = &ir_dev->rc_tab;
unsigned int index;
unsigned int scancode;
int retval;
unsigned long flags;
spin_lock_irqsave(&rc_tab->lock, flags);
if (ke->flags & INPUT_KEYMAP_BY_INDEX) {
index = ke->index;
if (index >= rc_tab->len) {
retval = -EINVAL;
goto out;
}
} else {
retval = input_scancode_to_scalar(ke, &scancode);
if (retval)
goto out;
index = ir_establish_scancode(ir_dev, rc_tab, scancode, true);
if (index >= rc_tab->len) {
retval = -ENOMEM;
goto out;
}
}
*old_keycode = ir_update_mapping(dev, rc_tab, index, ke->keycode);
out:
spin_unlock_irqrestore(&rc_tab->lock, flags);
return retval;
}
/**
* ir_setkeytable() - sets several entries in the scancode->keycode table
* @dev: the struct input_dev device descriptor
* @to: the struct ir_scancode_table to copy entries to
* @from: the struct ir_scancode_table to copy entries from
* @return: -ENOMEM if all keycodes could not be inserted, otherwise zero.
*
* This routine is used to handle table initialization.
*/
static int ir_setkeytable(struct ir_input_dev *ir_dev,
const struct ir_scancode_table *from)
{
struct ir_scancode_table *rc_tab = &ir_dev->rc_tab;
unsigned int i, index;
int rc;
rc = ir_create_table(&ir_dev->rc_tab,
from->name, from->ir_type, from->size);
if (rc)
return rc;
IR_dprintk(1, "Allocated space for %u keycode entries (%u bytes)\n",
rc_tab->size, rc_tab->alloc);
for (i = 0; i < from->size; i++) {
index = ir_establish_scancode(ir_dev, rc_tab,
from->scan[i].scancode, false);
if (index >= rc_tab->len) {
rc = -ENOMEM;
break;
}
ir_update_mapping(ir_dev->input_dev, rc_tab, index,
from->scan[i].keycode);
}
if (rc)
ir_free_table(rc_tab);
return rc;
}
/**
* ir_lookup_by_scancode() - locate mapping by scancode
* @rc_tab: the &struct ir_scancode_table to search
* @scancode: scancode to look for in the table
* @return: index in the table, -1U if not found
*
* This routine performs binary search in RC keykeymap table for
* given scancode.
*/
static unsigned int ir_lookup_by_scancode(const struct ir_scancode_table *rc_tab,
unsigned int scancode)
{
int start = 0;
int end = rc_tab->len - 1;
int mid;
while (start <= end) {
mid = (start + end) / 2;
if (rc_tab->scan[mid].scancode < scancode)
start = mid + 1;
else if (rc_tab->scan[mid].scancode > scancode)
end = mid - 1;
else
return mid;
}
return -1U;
}
/**
* ir_getkeycode() - get a keycode from the scancode->keycode table
* @dev: the struct input_dev device descriptor
* @scancode: the desired scancode
* @keycode: used to return the keycode, if found, or KEY_RESERVED
* @return: always returns zero.
*
* This routine is used to handle evdev EVIOCGKEY ioctl.
*/
static int ir_getkeycode(struct input_dev *dev,
struct input_keymap_entry *ke)
{
struct ir_input_dev *ir_dev = input_get_drvdata(dev);
struct ir_scancode_table *rc_tab = &ir_dev->rc_tab;
struct ir_scancode *entry;
unsigned long flags;
unsigned int index;
unsigned int scancode;
int retval;
spin_lock_irqsave(&rc_tab->lock, flags);
if (ke->flags & INPUT_KEYMAP_BY_INDEX) {
index = ke->index;
} else {
retval = input_scancode_to_scalar(ke, &scancode);
if (retval)
goto out;
index = ir_lookup_by_scancode(rc_tab, scancode);
}
if (index >= rc_tab->len) {
if (!(ke->flags & INPUT_KEYMAP_BY_INDEX))
IR_dprintk(1, "unknown key for scancode 0x%04x\n",
scancode);
retval = -EINVAL;
goto out;
}
entry = &rc_tab->scan[index];
ke->index = index;
ke->keycode = entry->keycode;
ke->len = sizeof(entry->scancode);
memcpy(ke->scancode, &entry->scancode, sizeof(entry->scancode));
retval = 0;
out:
spin_unlock_irqrestore(&rc_tab->lock, flags);
return retval;
}
/**
* ir_g_keycode_from_table() - gets the keycode that corresponds to a scancode
* @input_dev: the struct input_dev descriptor of the device
* @scancode: the scancode that we're seeking
*
* This routine is used by the input routines when a key is pressed at the
* IR. The scancode is received and needs to be converted into a keycode.
* If the key is not found, it returns KEY_RESERVED. Otherwise, returns the
* corresponding keycode from the table.
*/
u32 ir_g_keycode_from_table(struct input_dev *dev, u32 scancode)
{
struct ir_input_dev *ir_dev = input_get_drvdata(dev);
struct ir_scancode_table *rc_tab = &ir_dev->rc_tab;
unsigned int keycode;
unsigned int index;
unsigned long flags;
spin_lock_irqsave(&rc_tab->lock, flags);
index = ir_lookup_by_scancode(rc_tab, scancode);
keycode = index < rc_tab->len ?
rc_tab->scan[index].keycode : KEY_RESERVED;
spin_unlock_irqrestore(&rc_tab->lock, flags);
if (keycode != KEY_RESERVED)
IR_dprintk(1, "%s: scancode 0x%04x keycode 0x%02x\n",
dev->name, scancode, keycode);
return keycode;
}
EXPORT_SYMBOL_GPL(ir_g_keycode_from_table);
/**
* ir_do_keyup() - internal function to signal the release of a keypress
* @ir: the struct ir_input_dev descriptor of the device
*
* This function is used internally to release a keypress, it must be
* called with keylock held.
*/
static void ir_do_keyup(struct ir_input_dev *ir)
{
if (!ir->keypressed)
return;
IR_dprintk(1, "keyup key 0x%04x\n", ir->last_keycode);
input_report_key(ir->input_dev, ir->last_keycode, 0);
input_sync(ir->input_dev);
ir->keypressed = false;
}
/**
* ir_keyup() - generates input event to signal the release of a keypress
* @dev: the struct input_dev descriptor of the device
*
* This routine is used to signal that a key has been released on the
* remote control.
*/
void ir_keyup(struct input_dev *dev)
{
unsigned long flags;
struct ir_input_dev *ir = input_get_drvdata(dev);
spin_lock_irqsave(&ir->keylock, flags);
ir_do_keyup(ir);
spin_unlock_irqrestore(&ir->keylock, flags);
}
EXPORT_SYMBOL_GPL(ir_keyup);
/**
* ir_timer_keyup() - generates a keyup event after a timeout
* @cookie: a pointer to struct ir_input_dev passed to setup_timer()
*
* This routine will generate a keyup event some time after a keydown event
* is generated when no further activity has been detected.
*/
static void ir_timer_keyup(unsigned long cookie)
{
struct ir_input_dev *ir = (struct ir_input_dev *)cookie;
unsigned long flags;
/*
* ir->keyup_jiffies is used to prevent a race condition if a
* hardware interrupt occurs at this point and the keyup timer
* event is moved further into the future as a result.
*
* The timer will then be reactivated and this function called
* again in the future. We need to exit gracefully in that case
* to allow the input subsystem to do its auto-repeat magic or
* a keyup event might follow immediately after the keydown.
*/
spin_lock_irqsave(&ir->keylock, flags);
if (time_is_before_eq_jiffies(ir->keyup_jiffies))
ir_do_keyup(ir);
spin_unlock_irqrestore(&ir->keylock, flags);
}
/**
* ir_repeat() - notifies the IR core that a key is still pressed
* @dev: the struct input_dev descriptor of the device
*
* This routine is used by IR decoders when a repeat message which does
* not include the necessary bits to reproduce the scancode has been
* received.
*/
void ir_repeat(struct input_dev *dev)
{
unsigned long flags;
struct ir_input_dev *ir = input_get_drvdata(dev);
spin_lock_irqsave(&ir->keylock, flags);
input_event(dev, EV_MSC, MSC_SCAN, ir->last_scancode);
if (!ir->keypressed)
goto out;
ir->keyup_jiffies = jiffies + msecs_to_jiffies(IR_KEYPRESS_TIMEOUT);
mod_timer(&ir->timer_keyup, ir->keyup_jiffies);
out:
spin_unlock_irqrestore(&ir->keylock, flags);
}
EXPORT_SYMBOL_GPL(ir_repeat);
/**
* ir_do_keydown() - internal function to process a keypress
* @dev: the struct input_dev descriptor of the device
* @scancode: the scancode of the keypress
* @keycode: the keycode of the keypress
* @toggle: the toggle value of the keypress
*
* This function is used internally to register a keypress, it must be
* called with keylock held.
*/
static void ir_do_keydown(struct input_dev *dev, int scancode,
u32 keycode, u8 toggle)
{
struct ir_input_dev *ir = input_get_drvdata(dev);
input_event(dev, EV_MSC, MSC_SCAN, scancode);
/* Repeat event? */
if (ir->keypressed &&
ir->last_scancode == scancode &&
ir->last_toggle == toggle)
return;
/* Release old keypress */
ir_do_keyup(ir);
ir->last_scancode = scancode;
ir->last_toggle = toggle;
ir->last_keycode = keycode;
if (keycode == KEY_RESERVED)
return;
/* Register a keypress */
ir->keypressed = true;
IR_dprintk(1, "%s: key down event, key 0x%04x, scancode 0x%04x\n",
dev->name, keycode, scancode);
input_report_key(dev, ir->last_keycode, 1);
input_sync(dev);
}
/**
* ir_keydown() - generates input event for a key press
* @dev: the struct input_dev descriptor of the device
* @scancode: the scancode that we're seeking
* @toggle: the toggle value (protocol dependent, if the protocol doesn't
* support toggle values, this should be set to zero)
*
* This routine is used by the input routines when a key is pressed at the
* IR. It gets the keycode for a scancode and reports an input event via
* input_report_key().
*/
void ir_keydown(struct input_dev *dev, int scancode, u8 toggle)
{
unsigned long flags;
struct ir_input_dev *ir = input_get_drvdata(dev);
u32 keycode = ir_g_keycode_from_table(dev, scancode);
spin_lock_irqsave(&ir->keylock, flags);
ir_do_keydown(dev, scancode, keycode, toggle);
if (ir->keypressed) {
ir->keyup_jiffies = jiffies + msecs_to_jiffies(IR_KEYPRESS_TIMEOUT);
mod_timer(&ir->timer_keyup, ir->keyup_jiffies);
}
spin_unlock_irqrestore(&ir->keylock, flags);
}
EXPORT_SYMBOL_GPL(ir_keydown);
/**
* ir_keydown_notimeout() - generates input event for a key press without
* an automatic keyup event at a later time
* @dev: the struct input_dev descriptor of the device
* @scancode: the scancode that we're seeking
* @toggle: the toggle value (protocol dependent, if the protocol doesn't
* support toggle values, this should be set to zero)
*
* This routine is used by the input routines when a key is pressed at the
* IR. It gets the keycode for a scancode and reports an input event via
* input_report_key(). The driver must manually call ir_keyup() at a later
* stage.
*/
void ir_keydown_notimeout(struct input_dev *dev, int scancode, u8 toggle)
{
unsigned long flags;
struct ir_input_dev *ir = input_get_drvdata(dev);
u32 keycode = ir_g_keycode_from_table(dev, scancode);
spin_lock_irqsave(&ir->keylock, flags);
ir_do_keydown(dev, scancode, keycode, toggle);
spin_unlock_irqrestore(&ir->keylock, flags);
}
EXPORT_SYMBOL_GPL(ir_keydown_notimeout);
static int ir_open(struct input_dev *input_dev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
return ir_dev->props->open(ir_dev->props->priv);
}
static void ir_close(struct input_dev *input_dev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
ir_dev->props->close(ir_dev->props->priv);
}
/**
* __ir_input_register() - sets the IR keycode table and add the handlers
* for keymap table get/set
* @input_dev: the struct input_dev descriptor of the device
* @rc_tab: the struct ir_scancode_table table of scancode/keymap
*
* This routine is used to initialize the input infrastructure
* to work with an IR.
* It will register the input/evdev interface for the device and
* register the syfs code for IR class
*/
int __ir_input_register(struct input_dev *input_dev,
const struct ir_scancode_table *rc_tab,
struct ir_dev_props *props,
const char *driver_name)
{
struct ir_input_dev *ir_dev;
int rc;
if (rc_tab->scan == NULL || !rc_tab->size)
return -EINVAL;
ir_dev = kzalloc(sizeof(*ir_dev), GFP_KERNEL);
if (!ir_dev)
return -ENOMEM;
ir_dev->driver_name = kasprintf(GFP_KERNEL, "%s", driver_name);
if (!ir_dev->driver_name) {
rc = -ENOMEM;
goto out_dev;
}
input_dev->getkeycode_new = ir_getkeycode;
input_dev->setkeycode_new = ir_setkeycode;
input_set_drvdata(input_dev, ir_dev);
ir_dev->input_dev = input_dev;
spin_lock_init(&ir_dev->rc_tab.lock);
spin_lock_init(&ir_dev->keylock);
setup_timer(&ir_dev->timer_keyup, ir_timer_keyup, (unsigned long)ir_dev);
if (props) {
ir_dev->props = props;
if (props->open)
input_dev->open = ir_open;
if (props->close)
input_dev->close = ir_close;
}
set_bit(EV_KEY, input_dev->evbit);
set_bit(EV_REP, input_dev->evbit);
set_bit(EV_MSC, input_dev->evbit);
set_bit(MSC_SCAN, input_dev->mscbit);
rc = ir_setkeytable(ir_dev, rc_tab);
if (rc)
goto out_name;
rc = ir_register_class(input_dev);
if (rc < 0)
goto out_table;
if (ir_dev->props)
if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW) {
rc = ir_raw_event_register(input_dev);
if (rc < 0)
goto out_event;
}
rc = ir_register_input(input_dev);
if (rc < 0)
goto out_event;
IR_dprintk(1, "Registered input device on %s for %s remote%s.\n",
driver_name, rc_tab->name,
(ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_IR_RAW) ?
" in raw mode" : "");
/*
* Default delay of 250ms is too short for some protocols, expecially
* since the timeout is currently set to 250ms. Increase it to 500ms,
* to avoid wrong repetition of the keycodes.
*/
input_dev->rep[REP_DELAY] = 500;
return 0;
out_event:
ir_unregister_class(input_dev);
out_table:
ir_free_table(&ir_dev->rc_tab);
out_name:
kfree(ir_dev->driver_name);
out_dev:
kfree(ir_dev);
return rc;
}
EXPORT_SYMBOL_GPL(__ir_input_register);
/**
* ir_input_unregister() - unregisters IR and frees resources
* @input_dev: the struct input_dev descriptor of the device
* This routine is used to free memory and de-register interfaces.
*/
void ir_input_unregister(struct input_dev *input_dev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
if (!ir_dev)
return;
IR_dprintk(1, "Freed keycode table\n");
del_timer_sync(&ir_dev->timer_keyup);
if (ir_dev->props)
if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW)
ir_raw_event_unregister(input_dev);
ir_free_table(&ir_dev->rc_tab);
ir_unregister_class(input_dev);
kfree(ir_dev->driver_name);
kfree(ir_dev);
}
EXPORT_SYMBOL_GPL(ir_input_unregister);
int ir_core_debug; /* ir_debug level (0,1,2) */
EXPORT_SYMBOL_GPL(ir_core_debug);
module_param_named(debug, ir_core_debug, int, 0644);
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
MODULE_LICENSE("GPL");

View File

@@ -0,0 +1,410 @@
/* ir-lirc-codec.c - ir-core to classic lirc interface bridge
*
* Copyright (C) 2010 by Jarod Wilson <jarod@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/sched.h>
#include <linux/wait.h>
#include <media/lirc.h>
#include <media/lirc_dev.h>
#include <media/ir-core.h>
#include "ir-core-priv.h"
#define LIRCBUF_SIZE 256
/**
* ir_lirc_decode() - Send raw IR data to lirc_dev to be relayed to the
* lircd userspace daemon for decoding.
* @input_dev: the struct input_dev descriptor of the device
* @duration: the struct ir_raw_event descriptor of the pulse/space
*
* This function returns -EINVAL if the lirc interfaces aren't wired up.
*/
static int ir_lirc_decode(struct input_dev *input_dev, struct ir_raw_event ev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
struct lirc_codec *lirc = &ir_dev->raw->lirc;
int sample;
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_LIRC))
return 0;
if (!ir_dev->raw->lirc.drv || !ir_dev->raw->lirc.drv->rbuf)
return -EINVAL;
/* Packet start */
if (ev.reset)
return 0;
/* Carrier reports */
if (ev.carrier_report) {
sample = LIRC_FREQUENCY(ev.carrier);
/* Packet end */
} else if (ev.timeout) {
if (lirc->gap)
return 0;
lirc->gap_start = ktime_get();
lirc->gap = true;
lirc->gap_duration = ev.duration;
if (!lirc->send_timeout_reports)
return 0;
sample = LIRC_TIMEOUT(ev.duration / 1000);
/* Normal sample */
} else {
if (lirc->gap) {
int gap_sample;
lirc->gap_duration += ktime_to_ns(ktime_sub(ktime_get(),
lirc->gap_start));
/* Convert to ms and cap by LIRC_VALUE_MASK */
do_div(lirc->gap_duration, 1000);
lirc->gap_duration = min(lirc->gap_duration,
(u64)LIRC_VALUE_MASK);
gap_sample = LIRC_SPACE(lirc->gap_duration);
lirc_buffer_write(ir_dev->raw->lirc.drv->rbuf,
(unsigned char *) &gap_sample);
lirc->gap = false;
}
sample = ev.pulse ? LIRC_PULSE(ev.duration / 1000) :
LIRC_SPACE(ev.duration / 1000);
}
lirc_buffer_write(ir_dev->raw->lirc.drv->rbuf,
(unsigned char *) &sample);
wake_up(&ir_dev->raw->lirc.drv->rbuf->wait_poll);
return 0;
}
static ssize_t ir_lirc_transmit_ir(struct file *file, const char *buf,
size_t n, loff_t *ppos)
{
struct lirc_codec *lirc;
struct ir_input_dev *ir_dev;
int *txbuf; /* buffer with values to transmit */
int ret = 0, count;
lirc = lirc_get_pdata(file);
if (!lirc)
return -EFAULT;
if (n % sizeof(int))
return -EINVAL;
count = n / sizeof(int);
if (count > LIRCBUF_SIZE || count % 2 == 0)
return -EINVAL;
txbuf = memdup_user(buf, n);
if (IS_ERR(txbuf))
return PTR_ERR(txbuf);
ir_dev = lirc->ir_dev;
if (!ir_dev) {
ret = -EFAULT;
goto out;
}
if (ir_dev->props && ir_dev->props->tx_ir)
ret = ir_dev->props->tx_ir(ir_dev->props->priv, txbuf, (u32)n);
out:
kfree(txbuf);
return ret;
}
static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
unsigned long __user arg)
{
struct lirc_codec *lirc;
struct ir_input_dev *ir_dev;
int ret = 0;
void *drv_data;
__u32 val = 0, tmp;
lirc = lirc_get_pdata(filep);
if (!lirc)
return -EFAULT;
ir_dev = lirc->ir_dev;
if (!ir_dev || !ir_dev->props || !ir_dev->props->priv)
return -EFAULT;
drv_data = ir_dev->props->priv;
if (_IOC_DIR(cmd) & _IOC_WRITE) {
ret = get_user(val, (__u32 *)arg);
if (ret)
return ret;
}
switch (cmd) {
/* legacy support */
case LIRC_GET_SEND_MODE:
val = LIRC_CAN_SEND_PULSE & LIRC_CAN_SEND_MASK;
break;
case LIRC_SET_SEND_MODE:
if (val != (LIRC_MODE_PULSE & LIRC_CAN_SEND_MASK))
return -EINVAL;
return 0;
/* TX settings */
case LIRC_SET_TRANSMITTER_MASK:
if (!ir_dev->props->s_tx_mask)
return -EINVAL;
return ir_dev->props->s_tx_mask(drv_data, val);
case LIRC_SET_SEND_CARRIER:
if (!ir_dev->props->s_tx_carrier)
return -EINVAL;
return ir_dev->props->s_tx_carrier(drv_data, val);
case LIRC_SET_SEND_DUTY_CYCLE:
if (!ir_dev->props->s_tx_duty_cycle)
return -ENOSYS;
if (val <= 0 || val >= 100)
return -EINVAL;
return ir_dev->props->s_tx_duty_cycle(drv_data, val);
/* RX settings */
case LIRC_SET_REC_CARRIER:
if (!ir_dev->props->s_rx_carrier_range)
return -ENOSYS;
if (val <= 0)
return -EINVAL;
return ir_dev->props->s_rx_carrier_range(drv_data,
ir_dev->raw->lirc.carrier_low, val);
case LIRC_SET_REC_CARRIER_RANGE:
if (val <= 0)
return -EINVAL;
ir_dev->raw->lirc.carrier_low = val;
return 0;
case LIRC_GET_REC_RESOLUTION:
val = ir_dev->props->rx_resolution;
break;
case LIRC_SET_WIDEBAND_RECEIVER:
if (!ir_dev->props->s_learning_mode)
return -ENOSYS;
return ir_dev->props->s_learning_mode(drv_data, !!val);
case LIRC_SET_MEASURE_CARRIER_MODE:
if (!ir_dev->props->s_carrier_report)
return -ENOSYS;
return ir_dev->props->s_carrier_report(drv_data, !!val);
/* Generic timeout support */
case LIRC_GET_MIN_TIMEOUT:
if (!ir_dev->props->max_timeout)
return -ENOSYS;
val = ir_dev->props->min_timeout / 1000;
break;
case LIRC_GET_MAX_TIMEOUT:
if (!ir_dev->props->max_timeout)
return -ENOSYS;
val = ir_dev->props->max_timeout / 1000;
break;
case LIRC_SET_REC_TIMEOUT:
if (!ir_dev->props->max_timeout)
return -ENOSYS;
tmp = val * 1000;
if (tmp < ir_dev->props->min_timeout ||
tmp > ir_dev->props->max_timeout)
return -EINVAL;
ir_dev->props->timeout = tmp;
break;
case LIRC_SET_REC_TIMEOUT_REPORTS:
lirc->send_timeout_reports = !!val;
break;
default:
return lirc_dev_fop_ioctl(filep, cmd, arg);
}
if (_IOC_DIR(cmd) & _IOC_READ)
ret = put_user(val, (__u32 *)arg);
return ret;
}
static int ir_lirc_open(void *data)
{
return 0;
}
static void ir_lirc_close(void *data)
{
return;
}
static struct file_operations lirc_fops = {
.owner = THIS_MODULE,
.write = ir_lirc_transmit_ir,
.unlocked_ioctl = ir_lirc_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = ir_lirc_ioctl,
#endif
.read = lirc_dev_fop_read,
.poll = lirc_dev_fop_poll,
.open = lirc_dev_fop_open,
.release = lirc_dev_fop_close,
.llseek = no_llseek,
};
static int ir_lirc_register(struct input_dev *input_dev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
struct lirc_driver *drv;
struct lirc_buffer *rbuf;
int rc = -ENOMEM;
unsigned long features;
drv = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL);
if (!drv)
return rc;
rbuf = kzalloc(sizeof(struct lirc_buffer), GFP_KERNEL);
if (!rbuf)
goto rbuf_alloc_failed;
rc = lirc_buffer_init(rbuf, sizeof(int), LIRCBUF_SIZE);
if (rc)
goto rbuf_init_failed;
features = LIRC_CAN_REC_MODE2;
if (ir_dev->props->tx_ir) {
features |= LIRC_CAN_SEND_PULSE;
if (ir_dev->props->s_tx_mask)
features |= LIRC_CAN_SET_TRANSMITTER_MASK;
if (ir_dev->props->s_tx_carrier)
features |= LIRC_CAN_SET_SEND_CARRIER;
if (ir_dev->props->s_tx_duty_cycle)
features |= LIRC_CAN_SET_SEND_DUTY_CYCLE;
}
if (ir_dev->props->s_rx_carrier_range)
features |= LIRC_CAN_SET_REC_CARRIER |
LIRC_CAN_SET_REC_CARRIER_RANGE;
if (ir_dev->props->s_learning_mode)
features |= LIRC_CAN_USE_WIDEBAND_RECEIVER;
if (ir_dev->props->s_carrier_report)
features |= LIRC_CAN_MEASURE_CARRIER;
if (ir_dev->props->max_timeout)
features |= LIRC_CAN_SET_REC_TIMEOUT;
snprintf(drv->name, sizeof(drv->name), "ir-lirc-codec (%s)",
ir_dev->driver_name);
drv->minor = -1;
drv->features = features;
drv->data = &ir_dev->raw->lirc;
drv->rbuf = rbuf;
drv->set_use_inc = &ir_lirc_open;
drv->set_use_dec = &ir_lirc_close;
drv->code_length = sizeof(struct ir_raw_event) * 8;
drv->fops = &lirc_fops;
drv->dev = &ir_dev->dev;
drv->owner = THIS_MODULE;
drv->minor = lirc_register_driver(drv);
if (drv->minor < 0) {
rc = -ENODEV;
goto lirc_register_failed;
}
ir_dev->raw->lirc.drv = drv;
ir_dev->raw->lirc.ir_dev = ir_dev;
return 0;
lirc_register_failed:
rbuf_init_failed:
kfree(rbuf);
rbuf_alloc_failed:
kfree(drv);
return rc;
}
static int ir_lirc_unregister(struct input_dev *input_dev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
struct lirc_codec *lirc = &ir_dev->raw->lirc;
lirc_unregister_driver(lirc->drv->minor);
lirc_buffer_free(lirc->drv->rbuf);
kfree(lirc->drv);
return 0;
}
static struct ir_raw_handler lirc_handler = {
.protocols = IR_TYPE_LIRC,
.decode = ir_lirc_decode,
.raw_register = ir_lirc_register,
.raw_unregister = ir_lirc_unregister,
};
static int __init ir_lirc_codec_init(void)
{
ir_raw_handler_register(&lirc_handler);
printk(KERN_INFO "IR LIRC bridge handler initialized\n");
return 0;
}
static void __exit ir_lirc_codec_exit(void)
{
ir_raw_handler_unregister(&lirc_handler);
}
module_init(ir_lirc_codec_init);
module_exit(ir_lirc_codec_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
MODULE_AUTHOR("Red Hat Inc. (http://www.redhat.com)");
MODULE_DESCRIPTION("LIRC IR handler bridge");

View File

@@ -0,0 +1,217 @@
/* ir-nec-decoder.c - handle NEC IR Pulse/Space protocol
*
* Copyright (C) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/bitrev.h>
#include "ir-core-priv.h"
#define NEC_NBITS 32
#define NEC_UNIT 562500 /* ns */
#define NEC_HEADER_PULSE (16 * NEC_UNIT)
#define NECX_HEADER_PULSE (8 * NEC_UNIT) /* Less common NEC variant */
#define NEC_HEADER_SPACE (8 * NEC_UNIT)
#define NEC_REPEAT_SPACE (4 * NEC_UNIT)
#define NEC_BIT_PULSE (1 * NEC_UNIT)
#define NEC_BIT_0_SPACE (1 * NEC_UNIT)
#define NEC_BIT_1_SPACE (3 * NEC_UNIT)
#define NEC_TRAILER_PULSE (1 * NEC_UNIT)
#define NEC_TRAILER_SPACE (10 * NEC_UNIT) /* even longer in reality */
#define NECX_REPEAT_BITS 1
enum nec_state {
STATE_INACTIVE,
STATE_HEADER_SPACE,
STATE_BIT_PULSE,
STATE_BIT_SPACE,
STATE_TRAILER_PULSE,
STATE_TRAILER_SPACE,
};
/**
* ir_nec_decode() - Decode one NEC pulse or space
* @input_dev: the struct input_dev descriptor of the device
* @duration: the struct ir_raw_event descriptor of the pulse/space
*
* This function returns -EINVAL if the pulse violates the state machine
*/
static int ir_nec_decode(struct input_dev *input_dev, struct ir_raw_event ev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
struct nec_dec *data = &ir_dev->raw->nec;
u32 scancode;
u8 address, not_address, command, not_command;
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_NEC))
return 0;
if (!is_timing_event(ev)) {
if (ev.reset)
data->state = STATE_INACTIVE;
return 0;
}
IR_dprintk(2, "NEC decode started at state %d (%uus %s)\n",
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
switch (data->state) {
case STATE_INACTIVE:
if (!ev.pulse)
break;
if (eq_margin(ev.duration, NEC_HEADER_PULSE, NEC_UNIT / 2)) {
data->is_nec_x = false;
data->necx_repeat = false;
} else if (eq_margin(ev.duration, NECX_HEADER_PULSE, NEC_UNIT / 2))
data->is_nec_x = true;
else
break;
data->count = 0;
data->state = STATE_HEADER_SPACE;
return 0;
case STATE_HEADER_SPACE:
if (ev.pulse)
break;
if (eq_margin(ev.duration, NEC_HEADER_SPACE, NEC_UNIT / 2)) {
data->state = STATE_BIT_PULSE;
return 0;
} else if (eq_margin(ev.duration, NEC_REPEAT_SPACE, NEC_UNIT / 2)) {
ir_repeat(input_dev);
IR_dprintk(1, "Repeat last key\n");
data->state = STATE_TRAILER_PULSE;
return 0;
}
break;
case STATE_BIT_PULSE:
if (!ev.pulse)
break;
if (!eq_margin(ev.duration, NEC_BIT_PULSE, NEC_UNIT / 2))
break;
data->state = STATE_BIT_SPACE;
return 0;
case STATE_BIT_SPACE:
if (ev.pulse)
break;
if (data->necx_repeat && data->count == NECX_REPEAT_BITS &&
geq_margin(ev.duration,
NEC_TRAILER_SPACE, NEC_UNIT / 2)) {
IR_dprintk(1, "Repeat last key\n");
ir_repeat(input_dev);
data->state = STATE_INACTIVE;
return 0;
} else if (data->count > NECX_REPEAT_BITS)
data->necx_repeat = false;
data->bits <<= 1;
if (eq_margin(ev.duration, NEC_BIT_1_SPACE, NEC_UNIT / 2))
data->bits |= 1;
else if (!eq_margin(ev.duration, NEC_BIT_0_SPACE, NEC_UNIT / 2))
break;
data->count++;
if (data->count == NEC_NBITS)
data->state = STATE_TRAILER_PULSE;
else
data->state = STATE_BIT_PULSE;
return 0;
case STATE_TRAILER_PULSE:
if (!ev.pulse)
break;
if (!eq_margin(ev.duration, NEC_TRAILER_PULSE, NEC_UNIT / 2))
break;
data->state = STATE_TRAILER_SPACE;
return 0;
case STATE_TRAILER_SPACE:
if (ev.pulse)
break;
if (!geq_margin(ev.duration, NEC_TRAILER_SPACE, NEC_UNIT / 2))
break;
address = bitrev8((data->bits >> 24) & 0xff);
not_address = bitrev8((data->bits >> 16) & 0xff);
command = bitrev8((data->bits >> 8) & 0xff);
not_command = bitrev8((data->bits >> 0) & 0xff);
if ((command ^ not_command) != 0xff) {
IR_dprintk(1, "NEC checksum error: received 0x%08x\n",
data->bits);
break;
}
if ((address ^ not_address) != 0xff) {
/* Extended NEC */
scancode = address << 16 |
not_address << 8 |
command;
IR_dprintk(1, "NEC (Ext) scancode 0x%06x\n", scancode);
} else {
/* Normal NEC */
scancode = address << 8 | command;
IR_dprintk(1, "NEC scancode 0x%04x\n", scancode);
}
if (data->is_nec_x)
data->necx_repeat = true;
ir_keydown(input_dev, scancode, 0);
data->state = STATE_INACTIVE;
return 0;
}
IR_dprintk(1, "NEC decode failed at state %d (%uus %s)\n",
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
data->state = STATE_INACTIVE;
return -EINVAL;
}
static struct ir_raw_handler nec_handler = {
.protocols = IR_TYPE_NEC,
.decode = ir_nec_decode,
};
static int __init ir_nec_decode_init(void)
{
ir_raw_handler_register(&nec_handler);
printk(KERN_INFO "IR NEC protocol handler initialized\n");
return 0;
}
static void __exit ir_nec_decode_exit(void)
{
ir_raw_handler_unregister(&nec_handler);
}
module_init(ir_nec_decode_init);
module_exit(ir_nec_decode_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
MODULE_AUTHOR("Red Hat Inc. (http://www.redhat.com)");
MODULE_DESCRIPTION("NEC IR protocol decoder");

View File

@@ -0,0 +1,382 @@
/* ir-raw-event.c - handle IR Pulse/Space event
*
* Copyright (C) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/kthread.h>
#include <linux/mutex.h>
#include <linux/sched.h>
#include <linux/freezer.h>
#include "ir-core-priv.h"
/* Define the max number of pulse/space transitions to buffer */
#define MAX_IR_EVENT_SIZE 512
/* Used to keep track of IR raw clients, protected by ir_raw_handler_lock */
static LIST_HEAD(ir_raw_client_list);
/* Used to handle IR raw handler extensions */
static DEFINE_MUTEX(ir_raw_handler_lock);
static LIST_HEAD(ir_raw_handler_list);
static u64 available_protocols;
#ifdef MODULE
/* Used to load the decoders */
static struct work_struct wq_load;
#endif
static int ir_raw_event_thread(void *data)
{
struct ir_raw_event ev;
struct ir_raw_handler *handler;
struct ir_raw_event_ctrl *raw = (struct ir_raw_event_ctrl *)data;
int retval;
while (!kthread_should_stop()) {
spin_lock_irq(&raw->lock);
retval = kfifo_out(&raw->kfifo, &ev, sizeof(ev));
if (!retval) {
set_current_state(TASK_INTERRUPTIBLE);
if (kthread_should_stop())
set_current_state(TASK_RUNNING);
spin_unlock_irq(&raw->lock);
schedule();
continue;
}
spin_unlock_irq(&raw->lock);
BUG_ON(retval != sizeof(ev));
mutex_lock(&ir_raw_handler_lock);
list_for_each_entry(handler, &ir_raw_handler_list, list)
handler->decode(raw->input_dev, ev);
raw->prev_ev = ev;
mutex_unlock(&ir_raw_handler_lock);
}
return 0;
}
/**
* ir_raw_event_store() - pass a pulse/space duration to the raw ir decoders
* @input_dev: the struct input_dev device descriptor
* @ev: the struct ir_raw_event descriptor of the pulse/space
*
* This routine (which may be called from an interrupt context) stores a
* pulse/space duration for the raw ir decoding state machines. Pulses are
* signalled as positive values and spaces as negative values. A zero value
* will reset the decoding state machines.
*/
int ir_raw_event_store(struct input_dev *input_dev, struct ir_raw_event *ev)
{
struct ir_input_dev *ir = input_get_drvdata(input_dev);
if (!ir->raw)
return -EINVAL;
IR_dprintk(2, "sample: (%05dus %s)\n",
TO_US(ev->duration), TO_STR(ev->pulse));
if (kfifo_in(&ir->raw->kfifo, ev, sizeof(*ev)) != sizeof(*ev))
return -ENOMEM;
return 0;
}
EXPORT_SYMBOL_GPL(ir_raw_event_store);
/**
* ir_raw_event_store_edge() - notify raw ir decoders of the start of a pulse/space
* @input_dev: the struct input_dev device descriptor
* @type: the type of the event that has occurred
*
* This routine (which may be called from an interrupt context) is used to
* store the beginning of an ir pulse or space (or the start/end of ir
* reception) for the raw ir decoding state machines. This is used by
* hardware which does not provide durations directly but only interrupts
* (or similar events) on state change.
*/
int ir_raw_event_store_edge(struct input_dev *input_dev, enum raw_event_type type)
{
struct ir_input_dev *ir = input_get_drvdata(input_dev);
ktime_t now;
s64 delta; /* ns */
struct ir_raw_event ev;
int rc = 0;
if (!ir->raw)
return -EINVAL;
now = ktime_get();
delta = ktime_to_ns(ktime_sub(now, ir->raw->last_event));
/* Check for a long duration since last event or if we're
* being called for the first time, note that delta can't
* possibly be negative.
*/
ev.duration = 0;
if (delta > IR_MAX_DURATION || !ir->raw->last_type)
type |= IR_START_EVENT;
else
ev.duration = delta;
if (type & IR_START_EVENT)
ir_raw_event_reset(input_dev);
else if (ir->raw->last_type & IR_SPACE) {
ev.pulse = false;
rc = ir_raw_event_store(input_dev, &ev);
} else if (ir->raw->last_type & IR_PULSE) {
ev.pulse = true;
rc = ir_raw_event_store(input_dev, &ev);
} else
return 0;
ir->raw->last_event = now;
ir->raw->last_type = type;
return rc;
}
EXPORT_SYMBOL_GPL(ir_raw_event_store_edge);
/**
* ir_raw_event_store_with_filter() - pass next pulse/space to decoders with some processing
* @input_dev: the struct input_dev device descriptor
* @type: the type of the event that has occurred
*
* This routine (which may be called from an interrupt context) works
* in similiar manner to ir_raw_event_store_edge.
* This routine is intended for devices with limited internal buffer
* It automerges samples of same type, and handles timeouts
*/
int ir_raw_event_store_with_filter(struct input_dev *input_dev,
struct ir_raw_event *ev)
{
struct ir_input_dev *ir = input_get_drvdata(input_dev);
struct ir_raw_event_ctrl *raw = ir->raw;
if (!raw || !ir->props)
return -EINVAL;
/* Ignore spaces in idle mode */
if (ir->idle && !ev->pulse)
return 0;
else if (ir->idle)
ir_raw_event_set_idle(input_dev, false);
if (!raw->this_ev.duration) {
raw->this_ev = *ev;
} else if (ev->pulse == raw->this_ev.pulse) {
raw->this_ev.duration += ev->duration;
} else {
ir_raw_event_store(input_dev, &raw->this_ev);
raw->this_ev = *ev;
}
/* Enter idle mode if nessesary */
if (!ev->pulse && ir->props->timeout &&
raw->this_ev.duration >= ir->props->timeout) {
ir_raw_event_set_idle(input_dev, true);
}
return 0;
}
EXPORT_SYMBOL_GPL(ir_raw_event_store_with_filter);
/**
* ir_raw_event_set_idle() - hint the ir core if device is receiving
* IR data or not
* @input_dev: the struct input_dev device descriptor
* @idle: the hint value
*/
void ir_raw_event_set_idle(struct input_dev *input_dev, bool idle)
{
struct ir_input_dev *ir = input_get_drvdata(input_dev);
struct ir_raw_event_ctrl *raw = ir->raw;
if (!ir->props || !ir->raw)
return;
IR_dprintk(2, "%s idle mode\n", idle ? "enter" : "leave");
if (idle) {
raw->this_ev.timeout = true;
ir_raw_event_store(input_dev, &raw->this_ev);
init_ir_raw_event(&raw->this_ev);
}
if (ir->props->s_idle)
ir->props->s_idle(ir->props->priv, idle);
ir->idle = idle;
}
EXPORT_SYMBOL_GPL(ir_raw_event_set_idle);
/**
* ir_raw_event_handle() - schedules the decoding of stored ir data
* @input_dev: the struct input_dev device descriptor
*
* This routine will signal the workqueue to start decoding stored ir data.
*/
void ir_raw_event_handle(struct input_dev *input_dev)
{
struct ir_input_dev *ir = input_get_drvdata(input_dev);
unsigned long flags;
if (!ir->raw)
return;
spin_lock_irqsave(&ir->raw->lock, flags);
wake_up_process(ir->raw->thread);
spin_unlock_irqrestore(&ir->raw->lock, flags);
}
EXPORT_SYMBOL_GPL(ir_raw_event_handle);
/* used internally by the sysfs interface */
u64
ir_raw_get_allowed_protocols()
{
u64 protocols;
mutex_lock(&ir_raw_handler_lock);
protocols = available_protocols;
mutex_unlock(&ir_raw_handler_lock);
return protocols;
}
/*
* Used to (un)register raw event clients
*/
int ir_raw_event_register(struct input_dev *input_dev)
{
struct ir_input_dev *ir = input_get_drvdata(input_dev);
int rc;
struct ir_raw_handler *handler;
ir->raw = kzalloc(sizeof(*ir->raw), GFP_KERNEL);
if (!ir->raw)
return -ENOMEM;
ir->raw->input_dev = input_dev;
ir->raw->enabled_protocols = ~0;
rc = kfifo_alloc(&ir->raw->kfifo, sizeof(s64) * MAX_IR_EVENT_SIZE,
GFP_KERNEL);
if (rc < 0) {
kfree(ir->raw);
ir->raw = NULL;
return rc;
}
spin_lock_init(&ir->raw->lock);
ir->raw->thread = kthread_run(ir_raw_event_thread, ir->raw,
"rc%u", (unsigned int)ir->devno);
if (IS_ERR(ir->raw->thread)) {
int ret = PTR_ERR(ir->raw->thread);
kfree(ir->raw);
ir->raw = NULL;
return ret;
}
mutex_lock(&ir_raw_handler_lock);
list_add_tail(&ir->raw->list, &ir_raw_client_list);
list_for_each_entry(handler, &ir_raw_handler_list, list)
if (handler->raw_register)
handler->raw_register(ir->raw->input_dev);
mutex_unlock(&ir_raw_handler_lock);
return 0;
}
void ir_raw_event_unregister(struct input_dev *input_dev)
{
struct ir_input_dev *ir = input_get_drvdata(input_dev);
struct ir_raw_handler *handler;
if (!ir->raw)
return;
kthread_stop(ir->raw->thread);
mutex_lock(&ir_raw_handler_lock);
list_del(&ir->raw->list);
list_for_each_entry(handler, &ir_raw_handler_list, list)
if (handler->raw_unregister)
handler->raw_unregister(ir->raw->input_dev);
mutex_unlock(&ir_raw_handler_lock);
kfifo_free(&ir->raw->kfifo);
kfree(ir->raw);
ir->raw = NULL;
}
/*
* Extension interface - used to register the IR decoders
*/
int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler)
{
struct ir_raw_event_ctrl *raw;
mutex_lock(&ir_raw_handler_lock);
list_add_tail(&ir_raw_handler->list, &ir_raw_handler_list);
if (ir_raw_handler->raw_register)
list_for_each_entry(raw, &ir_raw_client_list, list)
ir_raw_handler->raw_register(raw->input_dev);
available_protocols |= ir_raw_handler->protocols;
mutex_unlock(&ir_raw_handler_lock);
return 0;
}
EXPORT_SYMBOL(ir_raw_handler_register);
void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler)
{
struct ir_raw_event_ctrl *raw;
mutex_lock(&ir_raw_handler_lock);
list_del(&ir_raw_handler->list);
if (ir_raw_handler->raw_unregister)
list_for_each_entry(raw, &ir_raw_client_list, list)
ir_raw_handler->raw_unregister(raw->input_dev);
available_protocols &= ~ir_raw_handler->protocols;
mutex_unlock(&ir_raw_handler_lock);
}
EXPORT_SYMBOL(ir_raw_handler_unregister);
#ifdef MODULE
static void init_decoders(struct work_struct *work)
{
/* Load the decoder modules */
load_nec_decode();
load_rc5_decode();
load_rc6_decode();
load_jvc_decode();
load_sony_decode();
load_lirc_codec();
/* If needed, we may later add some init code. In this case,
it is needed to change the CONFIG_MODULE test at ir-core.h
*/
}
#endif
void ir_raw_init(void)
{
#ifdef MODULE
INIT_WORK(&wq_load, init_decoders);
schedule_work(&wq_load);
#endif
}

View File

@@ -0,0 +1,190 @@
/* ir-rc5-decoder.c - handle RC5(x) IR Pulse/Space protocol
*
* Copyright (C) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/*
* This code handles 14 bits RC5 protocols and 20 bits RC5x protocols.
* There are other variants that use a different number of bits.
* This is currently unsupported.
* It considers a carrier of 36 kHz, with a total of 14/20 bits, where
* the first two bits are start bits, and a third one is a filing bit
*/
#include "ir-core-priv.h"
#define RC5_NBITS 14
#define RC5X_NBITS 20
#define CHECK_RC5X_NBITS 8
#define RC5_UNIT 888888 /* ns */
#define RC5_BIT_START (1 * RC5_UNIT)
#define RC5_BIT_END (1 * RC5_UNIT)
#define RC5X_SPACE (4 * RC5_UNIT)
enum rc5_state {
STATE_INACTIVE,
STATE_BIT_START,
STATE_BIT_END,
STATE_CHECK_RC5X,
STATE_FINISHED,
};
/**
* ir_rc5_decode() - Decode one RC-5 pulse or space
* @input_dev: the struct input_dev descriptor of the device
* @ev: the struct ir_raw_event descriptor of the pulse/space
*
* This function returns -EINVAL if the pulse violates the state machine
*/
static int ir_rc5_decode(struct input_dev *input_dev, struct ir_raw_event ev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
struct rc5_dec *data = &ir_dev->raw->rc5;
u8 toggle;
u32 scancode;
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_RC5))
return 0;
if (!is_timing_event(ev)) {
if (ev.reset)
data->state = STATE_INACTIVE;
return 0;
}
if (!geq_margin(ev.duration, RC5_UNIT, RC5_UNIT / 2))
goto out;
again:
IR_dprintk(2, "RC5(x) decode started at state %i (%uus %s)\n",
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
if (!geq_margin(ev.duration, RC5_UNIT, RC5_UNIT / 2))
return 0;
switch (data->state) {
case STATE_INACTIVE:
if (!ev.pulse)
break;
data->state = STATE_BIT_START;
data->count = 1;
/* We just need enough bits to get to STATE_CHECK_RC5X */
data->wanted_bits = RC5X_NBITS;
decrease_duration(&ev, RC5_BIT_START);
goto again;
case STATE_BIT_START:
if (!eq_margin(ev.duration, RC5_BIT_START, RC5_UNIT / 2))
break;
data->bits <<= 1;
if (!ev.pulse)
data->bits |= 1;
data->count++;
data->state = STATE_BIT_END;
return 0;
case STATE_BIT_END:
if (!is_transition(&ev, &ir_dev->raw->prev_ev))
break;
if (data->count == data->wanted_bits)
data->state = STATE_FINISHED;
else if (data->count == CHECK_RC5X_NBITS)
data->state = STATE_CHECK_RC5X;
else
data->state = STATE_BIT_START;
decrease_duration(&ev, RC5_BIT_END);
goto again;
case STATE_CHECK_RC5X:
if (!ev.pulse && geq_margin(ev.duration, RC5X_SPACE, RC5_UNIT / 2)) {
/* RC5X */
data->wanted_bits = RC5X_NBITS;
decrease_duration(&ev, RC5X_SPACE);
} else {
/* RC5 */
data->wanted_bits = RC5_NBITS;
}
data->state = STATE_BIT_START;
goto again;
case STATE_FINISHED:
if (ev.pulse)
break;
if (data->wanted_bits == RC5X_NBITS) {
/* RC5X */
u8 xdata, command, system;
xdata = (data->bits & 0x0003F) >> 0;
command = (data->bits & 0x00FC0) >> 6;
system = (data->bits & 0x1F000) >> 12;
toggle = (data->bits & 0x20000) ? 1 : 0;
command += (data->bits & 0x01000) ? 0 : 0x40;
scancode = system << 16 | command << 8 | xdata;
IR_dprintk(1, "RC5X scancode 0x%06x (toggle: %u)\n",
scancode, toggle);
} else {
/* RC5 */
u8 command, system;
command = (data->bits & 0x0003F) >> 0;
system = (data->bits & 0x007C0) >> 6;
toggle = (data->bits & 0x00800) ? 1 : 0;
command += (data->bits & 0x01000) ? 0 : 0x40;
scancode = system << 8 | command;
IR_dprintk(1, "RC5 scancode 0x%04x (toggle: %u)\n",
scancode, toggle);
}
ir_keydown(input_dev, scancode, toggle);
data->state = STATE_INACTIVE;
return 0;
}
out:
IR_dprintk(1, "RC5(x) decode failed at state %i (%uus %s)\n",
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
data->state = STATE_INACTIVE;
return -EINVAL;
}
static struct ir_raw_handler rc5_handler = {
.protocols = IR_TYPE_RC5,
.decode = ir_rc5_decode,
};
static int __init ir_rc5_decode_init(void)
{
ir_raw_handler_register(&rc5_handler);
printk(KERN_INFO "IR RC5(x) protocol handler initialized\n");
return 0;
}
static void __exit ir_rc5_decode_exit(void)
{
ir_raw_handler_unregister(&rc5_handler);
}
module_init(ir_rc5_decode_init);
module_exit(ir_rc5_decode_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
MODULE_AUTHOR("Red Hat Inc. (http://www.redhat.com)");
MODULE_DESCRIPTION("RC5(x) IR protocol decoder");

View File

@@ -0,0 +1,154 @@
/* ir-rc5-sz-decoder.c - handle RC5 Streamzap IR Pulse/Space protocol
*
* Copyright (C) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
* Copyright (C) 2010 by Jarod Wilson <jarod@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/*
* This code handles the 15 bit RC5-ish protocol used by the Streamzap
* PC Remote.
* It considers a carrier of 36 kHz, with a total of 15 bits, where
* the first two bits are start bits, and a third one is a filing bit
*/
#include "ir-core-priv.h"
#define RC5_SZ_NBITS 15
#define RC5_UNIT 888888 /* ns */
#define RC5_BIT_START (1 * RC5_UNIT)
#define RC5_BIT_END (1 * RC5_UNIT)
enum rc5_sz_state {
STATE_INACTIVE,
STATE_BIT_START,
STATE_BIT_END,
STATE_FINISHED,
};
/**
* ir_rc5_sz_decode() - Decode one RC-5 Streamzap pulse or space
* @input_dev: the struct input_dev descriptor of the device
* @ev: the struct ir_raw_event descriptor of the pulse/space
*
* This function returns -EINVAL if the pulse violates the state machine
*/
static int ir_rc5_sz_decode(struct input_dev *input_dev, struct ir_raw_event ev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
struct rc5_sz_dec *data = &ir_dev->raw->rc5_sz;
u8 toggle, command, system;
u32 scancode;
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_RC5_SZ))
return 0;
if (!is_timing_event(ev)) {
if (ev.reset)
data->state = STATE_INACTIVE;
return 0;
}
if (!geq_margin(ev.duration, RC5_UNIT, RC5_UNIT / 2))
goto out;
again:
IR_dprintk(2, "RC5-sz decode started at state %i (%uus %s)\n",
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
if (!geq_margin(ev.duration, RC5_UNIT, RC5_UNIT / 2))
return 0;
switch (data->state) {
case STATE_INACTIVE:
if (!ev.pulse)
break;
data->state = STATE_BIT_START;
data->count = 1;
data->wanted_bits = RC5_SZ_NBITS;
decrease_duration(&ev, RC5_BIT_START);
goto again;
case STATE_BIT_START:
if (!eq_margin(ev.duration, RC5_BIT_START, RC5_UNIT / 2))
break;
data->bits <<= 1;
if (!ev.pulse)
data->bits |= 1;
data->count++;
data->state = STATE_BIT_END;
return 0;
case STATE_BIT_END:
if (!is_transition(&ev, &ir_dev->raw->prev_ev))
break;
if (data->count == data->wanted_bits)
data->state = STATE_FINISHED;
else
data->state = STATE_BIT_START;
decrease_duration(&ev, RC5_BIT_END);
goto again;
case STATE_FINISHED:
if (ev.pulse)
break;
/* RC5-sz */
command = (data->bits & 0x0003F) >> 0;
system = (data->bits & 0x02FC0) >> 6;
toggle = (data->bits & 0x01000) ? 1 : 0;
scancode = system << 6 | command;
IR_dprintk(1, "RC5-sz scancode 0x%04x (toggle: %u)\n",
scancode, toggle);
ir_keydown(input_dev, scancode, toggle);
data->state = STATE_INACTIVE;
return 0;
}
out:
IR_dprintk(1, "RC5-sz decode failed at state %i (%uus %s)\n",
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
data->state = STATE_INACTIVE;
return -EINVAL;
}
static struct ir_raw_handler rc5_sz_handler = {
.protocols = IR_TYPE_RC5_SZ,
.decode = ir_rc5_sz_decode,
};
static int __init ir_rc5_sz_decode_init(void)
{
ir_raw_handler_register(&rc5_sz_handler);
printk(KERN_INFO "IR RC5 (streamzap) protocol handler initialized\n");
return 0;
}
static void __exit ir_rc5_sz_decode_exit(void)
{
ir_raw_handler_unregister(&rc5_sz_handler);
}
module_init(ir_rc5_sz_decode_init);
module_exit(ir_rc5_sz_decode_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
MODULE_AUTHOR("Red Hat Inc. (http://www.redhat.com)");
MODULE_DESCRIPTION("RC5 (streamzap) IR protocol decoder");

View File

@@ -0,0 +1,281 @@
/* ir-rc6-decoder.c - A decoder for the RC6 IR protocol
*
* Copyright (C) 2010 by David Härdeman <david@hardeman.nu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include "ir-core-priv.h"
/*
* This decoder currently supports:
* RC6-0-16 (standard toggle bit in header)
* RC6-6A-24 (no toggle bit)
* RC6-6A-32 (MCE version with toggle bit in body)
*/
#define RC6_UNIT 444444 /* us */
#define RC6_HEADER_NBITS 4 /* not including toggle bit */
#define RC6_0_NBITS 16
#define RC6_6A_SMALL_NBITS 24
#define RC6_6A_LARGE_NBITS 32
#define RC6_PREFIX_PULSE (6 * RC6_UNIT)
#define RC6_PREFIX_SPACE (2 * RC6_UNIT)
#define RC6_BIT_START (1 * RC6_UNIT)
#define RC6_BIT_END (1 * RC6_UNIT)
#define RC6_TOGGLE_START (2 * RC6_UNIT)
#define RC6_TOGGLE_END (2 * RC6_UNIT)
#define RC6_MODE_MASK 0x07 /* for the header bits */
#define RC6_STARTBIT_MASK 0x08 /* for the header bits */
#define RC6_6A_MCE_TOGGLE_MASK 0x8000 /* for the body bits */
enum rc6_mode {
RC6_MODE_0,
RC6_MODE_6A,
RC6_MODE_UNKNOWN,
};
enum rc6_state {
STATE_INACTIVE,
STATE_PREFIX_SPACE,
STATE_HEADER_BIT_START,
STATE_HEADER_BIT_END,
STATE_TOGGLE_START,
STATE_TOGGLE_END,
STATE_BODY_BIT_START,
STATE_BODY_BIT_END,
STATE_FINISHED,
};
static enum rc6_mode rc6_mode(struct rc6_dec *data)
{
switch (data->header & RC6_MODE_MASK) {
case 0:
return RC6_MODE_0;
case 6:
if (!data->toggle)
return RC6_MODE_6A;
/* fall through */
default:
return RC6_MODE_UNKNOWN;
}
}
/**
* ir_rc6_decode() - Decode one RC6 pulse or space
* @input_dev: the struct input_dev descriptor of the device
* @ev: the struct ir_raw_event descriptor of the pulse/space
*
* This function returns -EINVAL if the pulse violates the state machine
*/
static int ir_rc6_decode(struct input_dev *input_dev, struct ir_raw_event ev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
struct rc6_dec *data = &ir_dev->raw->rc6;
u32 scancode;
u8 toggle;
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_RC6))
return 0;
if (!is_timing_event(ev)) {
if (ev.reset)
data->state = STATE_INACTIVE;
return 0;
}
if (!geq_margin(ev.duration, RC6_UNIT, RC6_UNIT / 2))
goto out;
again:
IR_dprintk(2, "RC6 decode started at state %i (%uus %s)\n",
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
if (!geq_margin(ev.duration, RC6_UNIT, RC6_UNIT / 2))
return 0;
switch (data->state) {
case STATE_INACTIVE:
if (!ev.pulse)
break;
/* Note: larger margin on first pulse since each RC6_UNIT
is quite short and some hardware takes some time to
adjust to the signal */
if (!eq_margin(ev.duration, RC6_PREFIX_PULSE, RC6_UNIT))
break;
data->state = STATE_PREFIX_SPACE;
data->count = 0;
return 0;
case STATE_PREFIX_SPACE:
if (ev.pulse)
break;
if (!eq_margin(ev.duration, RC6_PREFIX_SPACE, RC6_UNIT / 2))
break;
data->state = STATE_HEADER_BIT_START;
return 0;
case STATE_HEADER_BIT_START:
if (!eq_margin(ev.duration, RC6_BIT_START, RC6_UNIT / 2))
break;
data->header <<= 1;
if (ev.pulse)
data->header |= 1;
data->count++;
data->state = STATE_HEADER_BIT_END;
return 0;
case STATE_HEADER_BIT_END:
if (!is_transition(&ev, &ir_dev->raw->prev_ev))
break;
if (data->count == RC6_HEADER_NBITS)
data->state = STATE_TOGGLE_START;
else
data->state = STATE_HEADER_BIT_START;
decrease_duration(&ev, RC6_BIT_END);
goto again;
case STATE_TOGGLE_START:
if (!eq_margin(ev.duration, RC6_TOGGLE_START, RC6_UNIT / 2))
break;
data->toggle = ev.pulse;
data->state = STATE_TOGGLE_END;
return 0;
case STATE_TOGGLE_END:
if (!is_transition(&ev, &ir_dev->raw->prev_ev) ||
!geq_margin(ev.duration, RC6_TOGGLE_END, RC6_UNIT / 2))
break;
if (!(data->header & RC6_STARTBIT_MASK)) {
IR_dprintk(1, "RC6 invalid start bit\n");
break;
}
data->state = STATE_BODY_BIT_START;
decrease_duration(&ev, RC6_TOGGLE_END);
data->count = 0;
switch (rc6_mode(data)) {
case RC6_MODE_0:
data->wanted_bits = RC6_0_NBITS;
break;
case RC6_MODE_6A:
/* This might look weird, but we basically
check the value of the first body bit to
determine the number of bits in mode 6A */
if ((!ev.pulse && !geq_margin(ev.duration, RC6_UNIT, RC6_UNIT / 2)) ||
geq_margin(ev.duration, RC6_UNIT, RC6_UNIT / 2))
data->wanted_bits = RC6_6A_LARGE_NBITS;
else
data->wanted_bits = RC6_6A_SMALL_NBITS;
break;
default:
IR_dprintk(1, "RC6 unknown mode\n");
goto out;
}
goto again;
case STATE_BODY_BIT_START:
if (!eq_margin(ev.duration, RC6_BIT_START, RC6_UNIT / 2))
break;
data->body <<= 1;
if (ev.pulse)
data->body |= 1;
data->count++;
data->state = STATE_BODY_BIT_END;
return 0;
case STATE_BODY_BIT_END:
if (!is_transition(&ev, &ir_dev->raw->prev_ev))
break;
if (data->count == data->wanted_bits)
data->state = STATE_FINISHED;
else
data->state = STATE_BODY_BIT_START;
decrease_duration(&ev, RC6_BIT_END);
goto again;
case STATE_FINISHED:
if (ev.pulse)
break;
switch (rc6_mode(data)) {
case RC6_MODE_0:
scancode = data->body & 0xffff;
toggle = data->toggle;
IR_dprintk(1, "RC6(0) scancode 0x%04x (toggle: %u)\n",
scancode, toggle);
break;
case RC6_MODE_6A:
if (data->wanted_bits == RC6_6A_LARGE_NBITS) {
toggle = data->body & RC6_6A_MCE_TOGGLE_MASK ? 1 : 0;
scancode = data->body & ~RC6_6A_MCE_TOGGLE_MASK;
} else {
toggle = 0;
scancode = data->body & 0xffffff;
}
IR_dprintk(1, "RC6(6A) scancode 0x%08x (toggle: %u)\n",
scancode, toggle);
break;
default:
IR_dprintk(1, "RC6 unknown mode\n");
goto out;
}
ir_keydown(input_dev, scancode, toggle);
data->state = STATE_INACTIVE;
return 0;
}
out:
IR_dprintk(1, "RC6 decode failed at state %i (%uus %s)\n",
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
data->state = STATE_INACTIVE;
return -EINVAL;
}
static struct ir_raw_handler rc6_handler = {
.protocols = IR_TYPE_RC6,
.decode = ir_rc6_decode,
};
static int __init ir_rc6_decode_init(void)
{
ir_raw_handler_register(&rc6_handler);
printk(KERN_INFO "IR RC6 protocol handler initialized\n");
return 0;
}
static void __exit ir_rc6_decode_exit(void)
{
ir_raw_handler_unregister(&rc6_handler);
}
module_init(ir_rc6_decode_init);
module_exit(ir_rc6_decode_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Härdeman <david@hardeman.nu>");
MODULE_DESCRIPTION("RC6 IR protocol decoder");

View File

@@ -0,0 +1,182 @@
/* ir-sony-decoder.c - handle Sony IR Pulse/Space protocol
*
* Copyright (C) 2010 by David Härdeman <david@hardeman.nu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/bitrev.h>
#include "ir-core-priv.h"
#define SONY_UNIT 600000 /* ns */
#define SONY_HEADER_PULSE (4 * SONY_UNIT)
#define SONY_HEADER_SPACE (1 * SONY_UNIT)
#define SONY_BIT_0_PULSE (1 * SONY_UNIT)
#define SONY_BIT_1_PULSE (2 * SONY_UNIT)
#define SONY_BIT_SPACE (1 * SONY_UNIT)
#define SONY_TRAILER_SPACE (10 * SONY_UNIT) /* minimum */
enum sony_state {
STATE_INACTIVE,
STATE_HEADER_SPACE,
STATE_BIT_PULSE,
STATE_BIT_SPACE,
STATE_FINISHED,
};
/**
* ir_sony_decode() - Decode one Sony pulse or space
* @input_dev: the struct input_dev descriptor of the device
* @ev: the struct ir_raw_event descriptor of the pulse/space
*
* This function returns -EINVAL if the pulse violates the state machine
*/
static int ir_sony_decode(struct input_dev *input_dev, struct ir_raw_event ev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
struct sony_dec *data = &ir_dev->raw->sony;
u32 scancode;
u8 device, subdevice, function;
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_SONY))
return 0;
if (!is_timing_event(ev)) {
if (ev.reset)
data->state = STATE_INACTIVE;
return 0;
}
if (!geq_margin(ev.duration, SONY_UNIT, SONY_UNIT / 2))
goto out;
IR_dprintk(2, "Sony decode started at state %d (%uus %s)\n",
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
switch (data->state) {
case STATE_INACTIVE:
if (!ev.pulse)
break;
if (!eq_margin(ev.duration, SONY_HEADER_PULSE, SONY_UNIT / 2))
break;
data->count = 0;
data->state = STATE_HEADER_SPACE;
return 0;
case STATE_HEADER_SPACE:
if (ev.pulse)
break;
if (!eq_margin(ev.duration, SONY_HEADER_SPACE, SONY_UNIT / 2))
break;
data->state = STATE_BIT_PULSE;
return 0;
case STATE_BIT_PULSE:
if (!ev.pulse)
break;
data->bits <<= 1;
if (eq_margin(ev.duration, SONY_BIT_1_PULSE, SONY_UNIT / 2))
data->bits |= 1;
else if (!eq_margin(ev.duration, SONY_BIT_0_PULSE, SONY_UNIT / 2))
break;
data->count++;
data->state = STATE_BIT_SPACE;
return 0;
case STATE_BIT_SPACE:
if (ev.pulse)
break;
if (!geq_margin(ev.duration, SONY_BIT_SPACE, SONY_UNIT / 2))
break;
decrease_duration(&ev, SONY_BIT_SPACE);
if (!geq_margin(ev.duration, SONY_UNIT, SONY_UNIT / 2)) {
data->state = STATE_BIT_PULSE;
return 0;
}
data->state = STATE_FINISHED;
/* Fall through */
case STATE_FINISHED:
if (ev.pulse)
break;
if (!geq_margin(ev.duration, SONY_TRAILER_SPACE, SONY_UNIT / 2))
break;
switch (data->count) {
case 12:
device = bitrev8((data->bits << 3) & 0xF8);
subdevice = 0;
function = bitrev8((data->bits >> 4) & 0xFE);
break;
case 15:
device = bitrev8((data->bits >> 0) & 0xFF);
subdevice = 0;
function = bitrev8((data->bits >> 7) & 0xFD);
break;
case 20:
device = bitrev8((data->bits >> 5) & 0xF8);
subdevice = bitrev8((data->bits >> 0) & 0xFF);
function = bitrev8((data->bits >> 12) & 0xFE);
break;
default:
IR_dprintk(1, "Sony invalid bitcount %u\n", data->count);
goto out;
}
scancode = device << 16 | subdevice << 8 | function;
IR_dprintk(1, "Sony(%u) scancode 0x%05x\n", data->count, scancode);
ir_keydown(input_dev, scancode, 0);
data->state = STATE_INACTIVE;
return 0;
}
out:
IR_dprintk(1, "Sony decode failed at state %d (%uus %s)\n",
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
data->state = STATE_INACTIVE;
return -EINVAL;
}
static struct ir_raw_handler sony_handler = {
.protocols = IR_TYPE_SONY,
.decode = ir_sony_decode,
};
static int __init ir_sony_decode_init(void)
{
ir_raw_handler_register(&sony_handler);
printk(KERN_INFO "IR Sony protocol handler initialized\n");
return 0;
}
static void __exit ir_sony_decode_exit(void)
{
ir_raw_handler_unregister(&sony_handler);
}
module_init(ir_sony_decode_init);
module_exit(ir_sony_decode_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Härdeman <david@hardeman.nu>");
MODULE_DESCRIPTION("Sony IR protocol decoder");

362
drivers/media/rc/ir-sysfs.c Normal file
View File

@@ -0,0 +1,362 @@
/* ir-sysfs.c - sysfs interface for RC devices (/sys/class/rc)
*
* Copyright (C) 2009-2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/device.h>
#include "ir-core-priv.h"
#define IRRCV_NUM_DEVICES 256
/* bit array to represent IR sysfs device number */
static unsigned long ir_core_dev_number;
/* class for /sys/class/rc */
static char *ir_devnode(struct device *dev, mode_t *mode)
{
return kasprintf(GFP_KERNEL, "rc/%s", dev_name(dev));
}
static struct class ir_input_class = {
.name = "rc",
.devnode = ir_devnode,
};
static struct {
u64 type;
char *name;
} proto_names[] = {
{ IR_TYPE_UNKNOWN, "unknown" },
{ IR_TYPE_RC5, "rc-5" },
{ IR_TYPE_NEC, "nec" },
{ IR_TYPE_RC6, "rc-6" },
{ IR_TYPE_JVC, "jvc" },
{ IR_TYPE_SONY, "sony" },
{ IR_TYPE_RC5_SZ, "rc-5-sz" },
{ IR_TYPE_LIRC, "lirc" },
};
#define PROTO_NONE "none"
/**
* show_protocols() - shows the current IR protocol(s)
* @d: the device descriptor
* @mattr: the device attribute struct (unused)
* @buf: a pointer to the output buffer
*
* This routine is a callback routine for input read the IR protocol type(s).
* it is trigged by reading /sys/class/rc/rc?/protocols.
* It returns the protocol names of supported protocols.
* Enabled protocols are printed in brackets.
*/
static ssize_t show_protocols(struct device *d,
struct device_attribute *mattr, char *buf)
{
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
u64 allowed, enabled;
char *tmp = buf;
int i;
/* Device is being removed */
if (!ir_dev)
return -EINVAL;
if (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_SCANCODE) {
enabled = ir_dev->rc_tab.ir_type;
allowed = ir_dev->props->allowed_protos;
} else if (ir_dev->raw) {
enabled = ir_dev->raw->enabled_protocols;
allowed = ir_raw_get_allowed_protocols();
} else
return sprintf(tmp, "[builtin]\n");
IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n",
(long long)allowed,
(long long)enabled);
for (i = 0; i < ARRAY_SIZE(proto_names); i++) {
if (allowed & enabled & proto_names[i].type)
tmp += sprintf(tmp, "[%s] ", proto_names[i].name);
else if (allowed & proto_names[i].type)
tmp += sprintf(tmp, "%s ", proto_names[i].name);
}
if (tmp != buf)
tmp--;
*tmp = '\n';
return tmp + 1 - buf;
}
/**
* store_protocols() - changes the current IR protocol(s)
* @d: the device descriptor
* @mattr: the device attribute struct (unused)
* @buf: a pointer to the input buffer
* @len: length of the input buffer
*
* This routine is a callback routine for changing the IR protocol type.
* It is trigged by writing to /sys/class/rc/rc?/protocols.
* Writing "+proto" will add a protocol to the list of enabled protocols.
* Writing "-proto" will remove a protocol from the list of enabled protocols.
* Writing "proto" will enable only "proto".
* Writing "none" will disable all protocols.
* Returns -EINVAL if an invalid protocol combination or unknown protocol name
* is used, otherwise @len.
*/
static ssize_t store_protocols(struct device *d,
struct device_attribute *mattr,
const char *data,
size_t len)
{
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
bool enable, disable;
const char *tmp;
u64 type;
u64 mask;
int rc, i, count = 0;
unsigned long flags;
/* Device is being removed */
if (!ir_dev)
return -EINVAL;
if (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_SCANCODE)
type = ir_dev->rc_tab.ir_type;
else if (ir_dev->raw)
type = ir_dev->raw->enabled_protocols;
else {
IR_dprintk(1, "Protocol switching not supported\n");
return -EINVAL;
}
while ((tmp = strsep((char **) &data, " \n")) != NULL) {
if (!*tmp)
break;
if (*tmp == '+') {
enable = true;
disable = false;
tmp++;
} else if (*tmp == '-') {
enable = false;
disable = true;
tmp++;
} else {
enable = false;
disable = false;
}
if (!enable && !disable && !strncasecmp(tmp, PROTO_NONE, sizeof(PROTO_NONE))) {
tmp += sizeof(PROTO_NONE);
mask = 0;
count++;
} else {
for (i = 0; i < ARRAY_SIZE(proto_names); i++) {
if (!strncasecmp(tmp, proto_names[i].name, strlen(proto_names[i].name))) {
tmp += strlen(proto_names[i].name);
mask = proto_names[i].type;
break;
}
}
if (i == ARRAY_SIZE(proto_names)) {
IR_dprintk(1, "Unknown protocol: '%s'\n", tmp);
return -EINVAL;
}
count++;
}
if (enable)
type |= mask;
else if (disable)
type &= ~mask;
else
type = mask;
}
if (!count) {
IR_dprintk(1, "Protocol not specified\n");
return -EINVAL;
}
if (ir_dev->props && ir_dev->props->change_protocol) {
rc = ir_dev->props->change_protocol(ir_dev->props->priv,
type);
if (rc < 0) {
IR_dprintk(1, "Error setting protocols to 0x%llx\n",
(long long)type);
return -EINVAL;
}
}
if (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_SCANCODE) {
spin_lock_irqsave(&ir_dev->rc_tab.lock, flags);
ir_dev->rc_tab.ir_type = type;
spin_unlock_irqrestore(&ir_dev->rc_tab.lock, flags);
} else {
ir_dev->raw->enabled_protocols = type;
}
IR_dprintk(1, "Current protocol(s): 0x%llx\n",
(long long)type);
return len;
}
#define ADD_HOTPLUG_VAR(fmt, val...) \
do { \
int err = add_uevent_var(env, fmt, val); \
if (err) \
return err; \
} while (0)
static int rc_dev_uevent(struct device *device, struct kobj_uevent_env *env)
{
struct ir_input_dev *ir_dev = dev_get_drvdata(device);
if (ir_dev->rc_tab.name)
ADD_HOTPLUG_VAR("NAME=%s", ir_dev->rc_tab.name);
if (ir_dev->driver_name)
ADD_HOTPLUG_VAR("DRV_NAME=%s", ir_dev->driver_name);
return 0;
}
/*
* Static device attribute struct with the sysfs attributes for IR's
*/
static DEVICE_ATTR(protocols, S_IRUGO | S_IWUSR,
show_protocols, store_protocols);
static struct attribute *rc_dev_attrs[] = {
&dev_attr_protocols.attr,
NULL,
};
static struct attribute_group rc_dev_attr_grp = {
.attrs = rc_dev_attrs,
};
static const struct attribute_group *rc_dev_attr_groups[] = {
&rc_dev_attr_grp,
NULL
};
static struct device_type rc_dev_type = {
.groups = rc_dev_attr_groups,
.uevent = rc_dev_uevent,
};
/**
* ir_register_class() - creates the sysfs for /sys/class/rc/rc?
* @input_dev: the struct input_dev descriptor of the device
*
* This routine is used to register the syfs code for IR class
*/
int ir_register_class(struct input_dev *input_dev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
int devno = find_first_zero_bit(&ir_core_dev_number,
IRRCV_NUM_DEVICES);
if (unlikely(devno < 0))
return devno;
ir_dev->dev.type = &rc_dev_type;
ir_dev->devno = devno;
ir_dev->dev.class = &ir_input_class;
ir_dev->dev.parent = input_dev->dev.parent;
input_dev->dev.parent = &ir_dev->dev;
dev_set_name(&ir_dev->dev, "rc%d", devno);
dev_set_drvdata(&ir_dev->dev, ir_dev);
return device_register(&ir_dev->dev);
};
/**
* ir_register_input - registers ir input device with input subsystem
* @input_dev: the struct input_dev descriptor of the device
*/
int ir_register_input(struct input_dev *input_dev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
int rc;
const char *path;
rc = input_register_device(input_dev);
if (rc < 0) {
device_del(&ir_dev->dev);
return rc;
}
__module_get(THIS_MODULE);
path = kobject_get_path(&ir_dev->dev.kobj, GFP_KERNEL);
printk(KERN_INFO "%s: %s as %s\n",
dev_name(&ir_dev->dev),
input_dev->name ? input_dev->name : "Unspecified device",
path ? path : "N/A");
kfree(path);
set_bit(ir_dev->devno, &ir_core_dev_number);
return 0;
}
/**
* ir_unregister_class() - removes the sysfs for sysfs for
* /sys/class/rc/rc?
* @input_dev: the struct input_dev descriptor of the device
*
* This routine is used to unregister the syfs code for IR class
*/
void ir_unregister_class(struct input_dev *input_dev)
{
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
input_set_drvdata(input_dev, NULL);
clear_bit(ir_dev->devno, &ir_core_dev_number);
input_unregister_device(input_dev);
device_del(&ir_dev->dev);
module_put(THIS_MODULE);
}
/*
* Init/exit code for the module. Basically, creates/removes /sys/class/rc
*/
static int __init ir_core_init(void)
{
int rc = class_register(&ir_input_class);
if (rc) {
printk(KERN_ERR "ir_core: unable to register rc class\n");
return rc;
}
/* Initialize/load the decoders/keymap code that will be used */
ir_raw_init();
ir_rcmap_init();
return 0;
}
static void __exit ir_core_exit(void)
{
class_unregister(&ir_input_class);
ir_rcmap_cleanup();
}
module_init(ir_core_init);
module_exit(ir_core_exit);

View File

@@ -0,0 +1,15 @@
config RC_MAP
tristate "Compile Remote Controller keymap modules"
depends on IR_CORE
default y
---help---
This option enables the compilation of lots of Remote
Controller tables. They are short tables, but if you
don't use a remote controller, or prefer to load the
tables on userspace, you should disable it.
The ir-keytable program, available at v4l-utils package
provide the tool and the same RC maps for load from
userspace. Its available at
http://git.linuxtv.org/v4l-utils

View File

@@ -0,0 +1,86 @@
obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-alink-dtu-m.o \
rc-anysee.o \
rc-apac-viewcomp.o \
rc-asus-pc39.o \
rc-ati-tv-wonder-hd-600.o \
rc-avermedia-a16d.o \
rc-avermedia.o \
rc-avermedia-cardbus.o \
rc-avermedia-dvbt.o \
rc-avermedia-m135a.o \
rc-avermedia-m733a-rm-k6.o \
rc-avermedia-rm-ks.o \
rc-avertv-303.o \
rc-azurewave-ad-tu700.o \
rc-behold.o \
rc-behold-columbus.o \
rc-budget-ci-old.o \
rc-cinergy-1400.o \
rc-cinergy.o \
rc-dib0700-nec.o \
rc-dib0700-rc5.o \
rc-digitalnow-tinytwin.o \
rc-digittrade.o \
rc-dm1105-nec.o \
rc-dntv-live-dvb-t.o \
rc-dntv-live-dvbt-pro.o \
rc-em-terratec.o \
rc-encore-enltv2.o \
rc-encore-enltv.o \
rc-encore-enltv-fm53.o \
rc-evga-indtube.o \
rc-eztv.o \
rc-flydvb.o \
rc-flyvideo.o \
rc-fusionhdtv-mce.o \
rc-gadmei-rm008z.o \
rc-genius-tvgo-a11mce.o \
rc-gotview7135.o \
rc-hauppauge-new.o \
rc-imon-mce.o \
rc-imon-pad.o \
rc-iodata-bctv7e.o \
rc-kaiomy.o \
rc-kworld-315u.o \
rc-kworld-plus-tv-analog.o \
rc-leadtek-y04g0051.o \
rc-lirc.o \
rc-lme2510.o \
rc-manli.o \
rc-msi-digivox-ii.o \
rc-msi-digivox-iii.o \
rc-msi-tvanywhere.o \
rc-msi-tvanywhere-plus.o \
rc-nebula.o \
rc-nec-terratec-cinergy-xs.o \
rc-norwood.o \
rc-npgtech.o \
rc-pctv-sedna.o \
rc-pinnacle-color.o \
rc-pinnacle-grey.o \
rc-pinnacle-pctv-hd.o \
rc-pixelview.o \
rc-pixelview-mk12.o \
rc-pixelview-new.o \
rc-powercolor-real-angel.o \
rc-proteus-2309.o \
rc-purpletv.o \
rc-pv951.o \
rc-rc5-hauppauge-new.o \
rc-rc5-tv.o \
rc-rc6-mce.o \
rc-real-audio-220-32-keys.o \
rc-streamzap.o \
rc-tbs-nec.o \
rc-terratec-cinergy-xs.o \
rc-terratec-slim.o \
rc-tevii-nec.o \
rc-total-media-in-hand.o \
rc-trekstor.o \
rc-tt-1500.o \
rc-twinhan1027.o \
rc-videomate-s350.o \
rc-videomate-tv-pvr.o \
rc-winfast.o \
rc-winfast-usbii-deluxe.o

View File

@@ -0,0 +1,89 @@
/* adstech-dvb-t-pci.h - Keytable for adstech_dvb_t_pci Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* ADS Tech Instant TV DVB-T PCI Remote */
static struct ir_scancode adstech_dvb_t_pci[] = {
/* Keys 0 to 9 */
{ 0x4d, KEY_0 },
{ 0x57, KEY_1 },
{ 0x4f, KEY_2 },
{ 0x53, KEY_3 },
{ 0x56, KEY_4 },
{ 0x4e, KEY_5 },
{ 0x5e, KEY_6 },
{ 0x54, KEY_7 },
{ 0x4c, KEY_8 },
{ 0x5c, KEY_9 },
{ 0x5b, KEY_POWER },
{ 0x5f, KEY_MUTE },
{ 0x55, KEY_GOTO },
{ 0x5d, KEY_SEARCH },
{ 0x17, KEY_EPG }, /* Guide */
{ 0x1f, KEY_MENU },
{ 0x0f, KEY_UP },
{ 0x46, KEY_DOWN },
{ 0x16, KEY_LEFT },
{ 0x1e, KEY_RIGHT },
{ 0x0e, KEY_SELECT }, /* Enter */
{ 0x5a, KEY_INFO },
{ 0x52, KEY_EXIT },
{ 0x59, KEY_PREVIOUS },
{ 0x51, KEY_NEXT },
{ 0x58, KEY_REWIND },
{ 0x50, KEY_FORWARD },
{ 0x44, KEY_PLAYPAUSE },
{ 0x07, KEY_STOP },
{ 0x1b, KEY_RECORD },
{ 0x13, KEY_TUNER }, /* Live */
{ 0x0a, KEY_A },
{ 0x12, KEY_B },
{ 0x03, KEY_PROG1 }, /* 1 */
{ 0x01, KEY_PROG2 }, /* 2 */
{ 0x00, KEY_PROG3 }, /* 3 */
{ 0x06, KEY_DVD },
{ 0x48, KEY_AUX }, /* Photo */
{ 0x40, KEY_VIDEO },
{ 0x19, KEY_AUDIO }, /* Music */
{ 0x0b, KEY_CHANNELUP },
{ 0x08, KEY_CHANNELDOWN },
{ 0x15, KEY_VOLUMEUP },
{ 0x1c, KEY_VOLUMEDOWN },
};
static struct rc_keymap adstech_dvb_t_pci_map = {
.map = {
.scan = adstech_dvb_t_pci,
.size = ARRAY_SIZE(adstech_dvb_t_pci),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_ADSTECH_DVB_T_PCI,
}
};
static int __init init_rc_map_adstech_dvb_t_pci(void)
{
return ir_register_map(&adstech_dvb_t_pci_map);
}
static void __exit exit_rc_map_adstech_dvb_t_pci(void)
{
ir_unregister_map(&adstech_dvb_t_pci_map);
}
module_init(init_rc_map_adstech_dvb_t_pci)
module_exit(exit_rc_map_adstech_dvb_t_pci)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,68 @@
/*
* A-Link DTU(m) remote controller keytable
*
* Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <media/rc-map.h>
/* A-Link DTU(m) slim remote, 6 rows, 3 columns. */
static struct ir_scancode alink_dtu_m[] = {
{ 0x0800, KEY_VOLUMEUP },
{ 0x0801, KEY_1 },
{ 0x0802, KEY_3 },
{ 0x0803, KEY_7 },
{ 0x0804, KEY_9 },
{ 0x0805, KEY_NEW }, /* symbol: PIP */
{ 0x0806, KEY_0 },
{ 0x0807, KEY_CHANNEL }, /* JUMP */
{ 0x080d, KEY_5 },
{ 0x080f, KEY_2 },
{ 0x0812, KEY_POWER2 },
{ 0x0814, KEY_CHANNELUP },
{ 0x0816, KEY_VOLUMEDOWN },
{ 0x0818, KEY_6 },
{ 0x081a, KEY_MUTE },
{ 0x081b, KEY_8 },
{ 0x081c, KEY_4 },
{ 0x081d, KEY_CHANNELDOWN },
};
static struct rc_keymap alink_dtu_m_map = {
.map = {
.scan = alink_dtu_m,
.size = ARRAY_SIZE(alink_dtu_m),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_ALINK_DTU_M,
}
};
static int __init init_rc_map_alink_dtu_m(void)
{
return ir_register_map(&alink_dtu_m_map);
}
static void __exit exit_rc_map_alink_dtu_m(void)
{
ir_unregister_map(&alink_dtu_m_map);
}
module_init(init_rc_map_alink_dtu_m)
module_exit(exit_rc_map_alink_dtu_m)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");

View File

@@ -0,0 +1,93 @@
/*
* Anysee remote controller keytable
*
* Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <media/rc-map.h>
static struct ir_scancode anysee[] = {
{ 0x0800, KEY_0 },
{ 0x0801, KEY_1 },
{ 0x0802, KEY_2 },
{ 0x0803, KEY_3 },
{ 0x0804, KEY_4 },
{ 0x0805, KEY_5 },
{ 0x0806, KEY_6 },
{ 0x0807, KEY_7 },
{ 0x0808, KEY_8 },
{ 0x0809, KEY_9 },
{ 0x080a, KEY_POWER2 }, /* [red power button] */
{ 0x080b, KEY_VIDEO }, /* [*] MODE */
{ 0x080c, KEY_CHANNEL }, /* [symbol counterclockwise arrow] */
{ 0x080d, KEY_NEXT }, /* [>>|] */
{ 0x080e, KEY_MENU }, /* MENU */
{ 0x080f, KEY_EPG }, /* [EPG] */
{ 0x0810, KEY_CLEAR }, /* EXIT */
{ 0x0811, KEY_CHANNELUP },
{ 0x0812, KEY_VOLUMEDOWN },
{ 0x0813, KEY_VOLUMEUP },
{ 0x0814, KEY_CHANNELDOWN },
{ 0x0815, KEY_OK },
{ 0x0816, KEY_RADIO }, /* [symbol TV/radio] */
{ 0x0817, KEY_INFO }, /* [i] */
{ 0x0818, KEY_PREVIOUS }, /* [|<<] */
{ 0x0819, KEY_FAVORITES }, /* FAV. */
{ 0x081a, KEY_SUBTITLE }, /* Subtitle */
{ 0x081b, KEY_CAMERA }, /* [symbol camera] */
{ 0x081c, KEY_YELLOW },
{ 0x081d, KEY_RED },
{ 0x081e, KEY_LANGUAGE }, /* [symbol Second Audio Program] */
{ 0x081f, KEY_GREEN },
{ 0x0820, KEY_SLEEP }, /* Sleep */
{ 0x0821, KEY_SCREEN }, /* 16:9 / 4:3 */
{ 0x0822, KEY_ZOOM }, /* SIZE */
{ 0x0824, KEY_FN }, /* [F1] */
{ 0x0825, KEY_FN }, /* [F2] */
{ 0x0842, KEY_MUTE }, /* symbol mute */
{ 0x0844, KEY_BLUE },
{ 0x0847, KEY_TEXT }, /* TEXT */
{ 0x0848, KEY_STOP },
{ 0x0849, KEY_RECORD },
{ 0x0850, KEY_PLAY },
{ 0x0851, KEY_PAUSE },
};
static struct rc_keymap anysee_map = {
.map = {
.scan = anysee,
.size = ARRAY_SIZE(anysee),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_ANYSEE,
}
};
static int __init init_rc_map_anysee(void)
{
return ir_register_map(&anysee_map);
}
static void __exit exit_rc_map_anysee(void)
{
ir_unregister_map(&anysee_map);
}
module_init(init_rc_map_anysee)
module_exit(exit_rc_map_anysee)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");

View File

@@ -0,0 +1,80 @@
/* apac-viewcomp.h - Keytable for apac_viewcomp Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Attila Kondoros <attila.kondoros@chello.hu> */
static struct ir_scancode apac_viewcomp[] = {
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
{ 0x00, KEY_0 },
{ 0x17, KEY_LAST }, /* +100 */
{ 0x0a, KEY_LIST }, /* recall */
{ 0x1c, KEY_TUNER }, /* TV/FM */
{ 0x15, KEY_SEARCH }, /* scan */
{ 0x12, KEY_POWER }, /* power */
{ 0x1f, KEY_VOLUMEDOWN }, /* vol up */
{ 0x1b, KEY_VOLUMEUP }, /* vol down */
{ 0x1e, KEY_CHANNELDOWN }, /* chn up */
{ 0x1a, KEY_CHANNELUP }, /* chn down */
{ 0x11, KEY_VIDEO }, /* video */
{ 0x0f, KEY_ZOOM }, /* full screen */
{ 0x13, KEY_MUTE }, /* mute/unmute */
{ 0x10, KEY_TEXT }, /* min */
{ 0x0d, KEY_STOP }, /* freeze */
{ 0x0e, KEY_RECORD }, /* record */
{ 0x1d, KEY_PLAYPAUSE }, /* stop */
{ 0x19, KEY_PLAY }, /* play */
{ 0x16, KEY_GOTO }, /* osd */
{ 0x14, KEY_REFRESH }, /* default */
{ 0x0c, KEY_KPPLUS }, /* fine tune >>>> */
{ 0x18, KEY_KPMINUS }, /* fine tune <<<< */
};
static struct rc_keymap apac_viewcomp_map = {
.map = {
.scan = apac_viewcomp,
.size = ARRAY_SIZE(apac_viewcomp),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_APAC_VIEWCOMP,
}
};
static int __init init_rc_map_apac_viewcomp(void)
{
return ir_register_map(&apac_viewcomp_map);
}
static void __exit exit_rc_map_apac_viewcomp(void)
{
ir_unregister_map(&apac_viewcomp_map);
}
module_init(init_rc_map_apac_viewcomp)
module_exit(exit_rc_map_apac_viewcomp)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,91 @@
/* asus-pc39.h - Keytable for asus_pc39 Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/*
* Marc Fargas <telenieko@telenieko.com>
* this is the remote control that comes with the asus p7131
* which has a label saying is "Model PC-39"
*/
static struct ir_scancode asus_pc39[] = {
/* Keys 0 to 9 */
{ 0x082a, KEY_0 },
{ 0x0816, KEY_1 },
{ 0x0812, KEY_2 },
{ 0x0814, KEY_3 },
{ 0x0836, KEY_4 },
{ 0x0832, KEY_5 },
{ 0x0834, KEY_6 },
{ 0x080e, KEY_7 },
{ 0x080a, KEY_8 },
{ 0x080c, KEY_9 },
{ 0x0801, KEY_RADIO }, /* radio */
{ 0x083c, KEY_MENU }, /* dvd/menu */
{ 0x0815, KEY_VOLUMEUP },
{ 0x0826, KEY_VOLUMEDOWN },
{ 0x0808, KEY_UP },
{ 0x0804, KEY_DOWN },
{ 0x0818, KEY_LEFT },
{ 0x0810, KEY_RIGHT },
{ 0x081a, KEY_VIDEO }, /* video */
{ 0x0806, KEY_AUDIO }, /* music */
{ 0x081e, KEY_TV }, /* tv */
{ 0x0822, KEY_EXIT }, /* back */
{ 0x0835, KEY_CHANNELUP }, /* channel / program + */
{ 0x0824, KEY_CHANNELDOWN }, /* channel / program - */
{ 0x0825, KEY_ENTER }, /* enter */
{ 0x0839, KEY_PAUSE }, /* play/pause */
{ 0x0821, KEY_PREVIOUS }, /* rew */
{ 0x0819, KEY_NEXT }, /* forward */
{ 0x0831, KEY_REWIND }, /* backward << */
{ 0x0805, KEY_FASTFORWARD }, /* forward >> */
{ 0x0809, KEY_STOP },
{ 0x0811, KEY_RECORD }, /* recording */
{ 0x0829, KEY_POWER }, /* the button that reads "close" */
{ 0x082e, KEY_ZOOM }, /* full screen */
{ 0x082c, KEY_MACRO }, /* recall */
{ 0x081c, KEY_HOME }, /* home */
{ 0x083a, KEY_PVR }, /* picture */
{ 0x0802, KEY_MUTE }, /* mute */
{ 0x083e, KEY_DVD }, /* dvd */
};
static struct rc_keymap asus_pc39_map = {
.map = {
.scan = asus_pc39,
.size = ARRAY_SIZE(asus_pc39),
.ir_type = IR_TYPE_RC5,
.name = RC_MAP_ASUS_PC39,
}
};
static int __init init_rc_map_asus_pc39(void)
{
return ir_register_map(&asus_pc39_map);
}
static void __exit exit_rc_map_asus_pc39(void)
{
ir_unregister_map(&asus_pc39_map);
}
module_init(init_rc_map_asus_pc39)
module_exit(exit_rc_map_asus_pc39)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,69 @@
/* ati-tv-wonder-hd-600.h - Keytable for ati_tv_wonder_hd_600 Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* ATI TV Wonder HD 600 USB
Devin Heitmueller <devin.heitmueller@gmail.com>
*/
static struct ir_scancode ati_tv_wonder_hd_600[] = {
{ 0x00, KEY_RECORD}, /* Row 1 */
{ 0x01, KEY_PLAYPAUSE},
{ 0x02, KEY_STOP},
{ 0x03, KEY_POWER},
{ 0x04, KEY_PREVIOUS}, /* Row 2 */
{ 0x05, KEY_REWIND},
{ 0x06, KEY_FORWARD},
{ 0x07, KEY_NEXT},
{ 0x08, KEY_EPG}, /* Row 3 */
{ 0x09, KEY_HOME},
{ 0x0a, KEY_MENU},
{ 0x0b, KEY_CHANNELUP},
{ 0x0c, KEY_BACK}, /* Row 4 */
{ 0x0d, KEY_UP},
{ 0x0e, KEY_INFO},
{ 0x0f, KEY_CHANNELDOWN},
{ 0x10, KEY_LEFT}, /* Row 5 */
{ 0x11, KEY_SELECT},
{ 0x12, KEY_RIGHT},
{ 0x13, KEY_VOLUMEUP},
{ 0x14, KEY_LAST}, /* Row 6 */
{ 0x15, KEY_DOWN},
{ 0x16, KEY_MUTE},
{ 0x17, KEY_VOLUMEDOWN},
};
static struct rc_keymap ati_tv_wonder_hd_600_map = {
.map = {
.scan = ati_tv_wonder_hd_600,
.size = ARRAY_SIZE(ati_tv_wonder_hd_600),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_ATI_TV_WONDER_HD_600,
}
};
static int __init init_rc_map_ati_tv_wonder_hd_600(void)
{
return ir_register_map(&ati_tv_wonder_hd_600_map);
}
static void __exit exit_rc_map_ati_tv_wonder_hd_600(void)
{
ir_unregister_map(&ati_tv_wonder_hd_600_map);
}
module_init(init_rc_map_ati_tv_wonder_hd_600)
module_exit(exit_rc_map_ati_tv_wonder_hd_600)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,75 @@
/* avermedia-a16d.h - Keytable for avermedia_a16d Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode avermedia_a16d[] = {
{ 0x20, KEY_LIST},
{ 0x00, KEY_POWER},
{ 0x28, KEY_1},
{ 0x18, KEY_2},
{ 0x38, KEY_3},
{ 0x24, KEY_4},
{ 0x14, KEY_5},
{ 0x34, KEY_6},
{ 0x2c, KEY_7},
{ 0x1c, KEY_8},
{ 0x3c, KEY_9},
{ 0x12, KEY_SUBTITLE},
{ 0x22, KEY_0},
{ 0x32, KEY_REWIND},
{ 0x3a, KEY_SHUFFLE},
{ 0x02, KEY_PRINT},
{ 0x11, KEY_CHANNELDOWN},
{ 0x31, KEY_CHANNELUP},
{ 0x0c, KEY_ZOOM},
{ 0x1e, KEY_VOLUMEDOWN},
{ 0x3e, KEY_VOLUMEUP},
{ 0x0a, KEY_MUTE},
{ 0x04, KEY_AUDIO},
{ 0x26, KEY_RECORD},
{ 0x06, KEY_PLAY},
{ 0x36, KEY_STOP},
{ 0x16, KEY_PAUSE},
{ 0x2e, KEY_REWIND},
{ 0x0e, KEY_FASTFORWARD},
{ 0x30, KEY_TEXT},
{ 0x21, KEY_GREEN},
{ 0x01, KEY_BLUE},
{ 0x08, KEY_EPG},
{ 0x2a, KEY_MENU},
};
static struct rc_keymap avermedia_a16d_map = {
.map = {
.scan = avermedia_a16d,
.size = ARRAY_SIZE(avermedia_a16d),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_AVERMEDIA_A16D,
}
};
static int __init init_rc_map_avermedia_a16d(void)
{
return ir_register_map(&avermedia_a16d_map);
}
static void __exit exit_rc_map_avermedia_a16d(void)
{
ir_unregister_map(&avermedia_a16d_map);
}
module_init(init_rc_map_avermedia_a16d)
module_exit(exit_rc_map_avermedia_a16d)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,97 @@
/* avermedia-cardbus.h - Keytable for avermedia_cardbus Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Oldrich Jedlicka <oldium.pro@seznam.cz> */
static struct ir_scancode avermedia_cardbus[] = {
{ 0x00, KEY_POWER },
{ 0x01, KEY_TUNER }, /* TV/FM */
{ 0x03, KEY_TEXT }, /* Teletext */
{ 0x04, KEY_EPG },
{ 0x05, KEY_1 },
{ 0x06, KEY_2 },
{ 0x07, KEY_3 },
{ 0x08, KEY_AUDIO },
{ 0x09, KEY_4 },
{ 0x0a, KEY_5 },
{ 0x0b, KEY_6 },
{ 0x0c, KEY_ZOOM }, /* Full screen */
{ 0x0d, KEY_7 },
{ 0x0e, KEY_8 },
{ 0x0f, KEY_9 },
{ 0x10, KEY_PAGEUP }, /* 16-CH PREV */
{ 0x11, KEY_0 },
{ 0x12, KEY_INFO },
{ 0x13, KEY_AGAIN }, /* CH RTN - channel return */
{ 0x14, KEY_MUTE },
{ 0x15, KEY_EDIT }, /* Autoscan */
{ 0x17, KEY_SAVE }, /* Screenshot */
{ 0x18, KEY_PLAYPAUSE },
{ 0x19, KEY_RECORD },
{ 0x1a, KEY_PLAY },
{ 0x1b, KEY_STOP },
{ 0x1c, KEY_FASTFORWARD },
{ 0x1d, KEY_REWIND },
{ 0x1e, KEY_VOLUMEDOWN },
{ 0x1f, KEY_VOLUMEUP },
{ 0x22, KEY_SLEEP }, /* Sleep */
{ 0x23, KEY_ZOOM }, /* Aspect */
{ 0x26, KEY_SCREEN }, /* Pos */
{ 0x27, KEY_ANGLE }, /* Size */
{ 0x28, KEY_SELECT }, /* Select */
{ 0x29, KEY_BLUE }, /* Blue/Picture */
{ 0x2a, KEY_BACKSPACE }, /* Back */
{ 0x2b, KEY_MEDIA }, /* PIP (Picture-in-picture) */
{ 0x2c, KEY_DOWN },
{ 0x2e, KEY_DOT },
{ 0x2f, KEY_TV }, /* Live TV */
{ 0x32, KEY_LEFT },
{ 0x33, KEY_CLEAR }, /* Clear */
{ 0x35, KEY_RED }, /* Red/TV */
{ 0x36, KEY_UP },
{ 0x37, KEY_HOME }, /* Home */
{ 0x39, KEY_GREEN }, /* Green/Video */
{ 0x3d, KEY_YELLOW }, /* Yellow/Music */
{ 0x3e, KEY_OK }, /* Ok */
{ 0x3f, KEY_RIGHT },
{ 0x40, KEY_NEXT }, /* Next */
{ 0x41, KEY_PREVIOUS }, /* Previous */
{ 0x42, KEY_CHANNELDOWN }, /* Channel down */
{ 0x43, KEY_CHANNELUP }, /* Channel up */
};
static struct rc_keymap avermedia_cardbus_map = {
.map = {
.scan = avermedia_cardbus,
.size = ARRAY_SIZE(avermedia_cardbus),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_AVERMEDIA_CARDBUS,
}
};
static int __init init_rc_map_avermedia_cardbus(void)
{
return ir_register_map(&avermedia_cardbus_map);
}
static void __exit exit_rc_map_avermedia_cardbus(void)
{
ir_unregister_map(&avermedia_cardbus_map);
}
module_init(init_rc_map_avermedia_cardbus)
module_exit(exit_rc_map_avermedia_cardbus)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,78 @@
/* avermedia-dvbt.h - Keytable for avermedia_dvbt Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Matt Jesson <dvb@jesson.eclipse.co.uk */
static struct ir_scancode avermedia_dvbt[] = {
{ 0x28, KEY_0 }, /* '0' / 'enter' */
{ 0x22, KEY_1 }, /* '1' */
{ 0x12, KEY_2 }, /* '2' / 'up arrow' */
{ 0x32, KEY_3 }, /* '3' */
{ 0x24, KEY_4 }, /* '4' / 'left arrow' */
{ 0x14, KEY_5 }, /* '5' */
{ 0x34, KEY_6 }, /* '6' / 'right arrow' */
{ 0x26, KEY_7 }, /* '7' */
{ 0x16, KEY_8 }, /* '8' / 'down arrow' */
{ 0x36, KEY_9 }, /* '9' */
{ 0x20, KEY_LIST }, /* 'source' */
{ 0x10, KEY_TEXT }, /* 'teletext' */
{ 0x00, KEY_POWER }, /* 'power' */
{ 0x04, KEY_AUDIO }, /* 'audio' */
{ 0x06, KEY_ZOOM }, /* 'full screen' */
{ 0x18, KEY_VIDEO }, /* 'display' */
{ 0x38, KEY_SEARCH }, /* 'loop' */
{ 0x08, KEY_INFO }, /* 'preview' */
{ 0x2a, KEY_REWIND }, /* 'backward <<' */
{ 0x1a, KEY_FASTFORWARD }, /* 'forward >>' */
{ 0x3a, KEY_RECORD }, /* 'capture' */
{ 0x0a, KEY_MUTE }, /* 'mute' */
{ 0x2c, KEY_RECORD }, /* 'record' */
{ 0x1c, KEY_PAUSE }, /* 'pause' */
{ 0x3c, KEY_STOP }, /* 'stop' */
{ 0x0c, KEY_PLAY }, /* 'play' */
{ 0x2e, KEY_RED }, /* 'red' */
{ 0x01, KEY_BLUE }, /* 'blue' / 'cancel' */
{ 0x0e, KEY_YELLOW }, /* 'yellow' / 'ok' */
{ 0x21, KEY_GREEN }, /* 'green' */
{ 0x11, KEY_CHANNELDOWN }, /* 'channel -' */
{ 0x31, KEY_CHANNELUP }, /* 'channel +' */
{ 0x1e, KEY_VOLUMEDOWN }, /* 'volume -' */
{ 0x3e, KEY_VOLUMEUP }, /* 'volume +' */
};
static struct rc_keymap avermedia_dvbt_map = {
.map = {
.scan = avermedia_dvbt,
.size = ARRAY_SIZE(avermedia_dvbt),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_AVERMEDIA_DVBT,
}
};
static int __init init_rc_map_avermedia_dvbt(void)
{
return ir_register_map(&avermedia_dvbt_map);
}
static void __exit exit_rc_map_avermedia_dvbt(void)
{
ir_unregister_map(&avermedia_dvbt_map);
}
module_init(init_rc_map_avermedia_dvbt)
module_exit(exit_rc_map_avermedia_dvbt)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,147 @@
/* avermedia-m135a.c - Keytable for Avermedia M135A Remote Controllers
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
* Copyright (c) 2010 by Herton Ronaldo Krzesinski <herton@mandriva.com.br>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/*
* Avermedia M135A with RM-JX and RM-K6 remote controls
*
* On Avermedia M135A with IR model RM-JX, the same codes exist on both
* Positivo (BR) and original IR, initial version and remote control codes
* added by Mauro Carvalho Chehab <mchehab@infradead.org>
*
* Positivo also ships Avermedia M135A with model RM-K6, extra control
* codes added by Herton Ronaldo Krzesinski <herton@mandriva.com.br>
*/
static struct ir_scancode avermedia_m135a[] = {
/* RM-JX */
{ 0x0200, KEY_POWER2 },
{ 0x022e, KEY_DOT }, /* '.' */
{ 0x0201, KEY_MODE }, /* TV/FM or SOURCE */
{ 0x0205, KEY_1 },
{ 0x0206, KEY_2 },
{ 0x0207, KEY_3 },
{ 0x0209, KEY_4 },
{ 0x020a, KEY_5 },
{ 0x020b, KEY_6 },
{ 0x020d, KEY_7 },
{ 0x020e, KEY_8 },
{ 0x020f, KEY_9 },
{ 0x0211, KEY_0 },
{ 0x0213, KEY_RIGHT }, /* -> or L */
{ 0x0212, KEY_LEFT }, /* <- or R */
{ 0x0217, KEY_SLEEP }, /* Capturar Imagem or Snapshot */
{ 0x0210, KEY_SHUFFLE }, /* Amostra or 16 chan prev */
{ 0x0303, KEY_CHANNELUP },
{ 0x0302, KEY_CHANNELDOWN },
{ 0x021f, KEY_VOLUMEUP },
{ 0x021e, KEY_VOLUMEDOWN },
{ 0x020c, KEY_ENTER }, /* Full Screen */
{ 0x0214, KEY_MUTE },
{ 0x0208, KEY_AUDIO },
{ 0x0203, KEY_TEXT }, /* Teletext */
{ 0x0204, KEY_EPG },
{ 0x022b, KEY_TV2 }, /* TV2 or PIP */
{ 0x021d, KEY_RED },
{ 0x021c, KEY_YELLOW },
{ 0x0301, KEY_GREEN },
{ 0x0300, KEY_BLUE },
{ 0x021a, KEY_PLAYPAUSE },
{ 0x0219, KEY_RECORD },
{ 0x0218, KEY_PLAY },
{ 0x021b, KEY_STOP },
/* RM-K6 */
{ 0x0401, KEY_POWER2 },
{ 0x0406, KEY_MUTE },
{ 0x0408, KEY_MODE }, /* TV/FM */
{ 0x0409, KEY_1 },
{ 0x040a, KEY_2 },
{ 0x040b, KEY_3 },
{ 0x040c, KEY_4 },
{ 0x040d, KEY_5 },
{ 0x040e, KEY_6 },
{ 0x040f, KEY_7 },
{ 0x0410, KEY_8 },
{ 0x0411, KEY_9 },
{ 0x044c, KEY_DOT }, /* '.' */
{ 0x0412, KEY_0 },
{ 0x0407, KEY_REFRESH }, /* Refresh/Reload */
{ 0x0413, KEY_AUDIO },
{ 0x0440, KEY_SCREEN }, /* Full Screen toggle */
{ 0x0441, KEY_HOME },
{ 0x0442, KEY_BACK },
{ 0x0447, KEY_UP },
{ 0x0448, KEY_DOWN },
{ 0x0449, KEY_LEFT },
{ 0x044a, KEY_RIGHT },
{ 0x044b, KEY_OK },
{ 0x0404, KEY_VOLUMEUP },
{ 0x0405, KEY_VOLUMEDOWN },
{ 0x0402, KEY_CHANNELUP },
{ 0x0403, KEY_CHANNELDOWN },
{ 0x0443, KEY_RED },
{ 0x0444, KEY_GREEN },
{ 0x0445, KEY_YELLOW },
{ 0x0446, KEY_BLUE },
{ 0x0414, KEY_TEXT },
{ 0x0415, KEY_EPG },
{ 0x041a, KEY_TV2 }, /* PIP */
{ 0x041b, KEY_MHP }, /* Snapshot */
{ 0x0417, KEY_RECORD },
{ 0x0416, KEY_PLAYPAUSE },
{ 0x0418, KEY_STOP },
{ 0x0419, KEY_PAUSE },
{ 0x041f, KEY_PREVIOUS },
{ 0x041c, KEY_REWIND },
{ 0x041d, KEY_FORWARD },
{ 0x041e, KEY_NEXT },
};
static struct rc_keymap avermedia_m135a_map = {
.map = {
.scan = avermedia_m135a,
.size = ARRAY_SIZE(avermedia_m135a),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_AVERMEDIA_M135A,
}
};
static int __init init_rc_map_avermedia_m135a(void)
{
return ir_register_map(&avermedia_m135a_map);
}
static void __exit exit_rc_map_avermedia_m135a(void)
{
ir_unregister_map(&avermedia_m135a_map);
}
module_init(init_rc_map_avermedia_m135a)
module_exit(exit_rc_map_avermedia_m135a)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,95 @@
/* avermedia-m733a-rm-k6.h - Keytable for avermedia_m733a_rm_k6 Remote Controller
*
* Copyright (c) 2010 by Herton Ronaldo Krzesinski <herton@mandriva.com.br>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/*
* Avermedia M733A with IR model RM-K6
* This is the stock remote controller used with Positivo machines with M733A
* Herton Ronaldo Krzesinski <herton@mandriva.com.br>
*/
static struct ir_scancode avermedia_m733a_rm_k6[] = {
{ 0x0401, KEY_POWER2 },
{ 0x0406, KEY_MUTE },
{ 0x0408, KEY_MODE }, /* TV/FM */
{ 0x0409, KEY_1 },
{ 0x040a, KEY_2 },
{ 0x040b, KEY_3 },
{ 0x040c, KEY_4 },
{ 0x040d, KEY_5 },
{ 0x040e, KEY_6 },
{ 0x040f, KEY_7 },
{ 0x0410, KEY_8 },
{ 0x0411, KEY_9 },
{ 0x044c, KEY_DOT }, /* '.' */
{ 0x0412, KEY_0 },
{ 0x0407, KEY_REFRESH }, /* Refresh/Reload */
{ 0x0413, KEY_AUDIO },
{ 0x0440, KEY_SCREEN }, /* Full Screen toggle */
{ 0x0441, KEY_HOME },
{ 0x0442, KEY_BACK },
{ 0x0447, KEY_UP },
{ 0x0448, KEY_DOWN },
{ 0x0449, KEY_LEFT },
{ 0x044a, KEY_RIGHT },
{ 0x044b, KEY_OK },
{ 0x0404, KEY_VOLUMEUP },
{ 0x0405, KEY_VOLUMEDOWN },
{ 0x0402, KEY_CHANNELUP },
{ 0x0403, KEY_CHANNELDOWN },
{ 0x0443, KEY_RED },
{ 0x0444, KEY_GREEN },
{ 0x0445, KEY_YELLOW },
{ 0x0446, KEY_BLUE },
{ 0x0414, KEY_TEXT },
{ 0x0415, KEY_EPG },
{ 0x041a, KEY_TV2 }, /* PIP */
{ 0x041b, KEY_MHP }, /* Snapshot */
{ 0x0417, KEY_RECORD },
{ 0x0416, KEY_PLAYPAUSE },
{ 0x0418, KEY_STOP },
{ 0x0419, KEY_PAUSE },
{ 0x041f, KEY_PREVIOUS },
{ 0x041c, KEY_REWIND },
{ 0x041d, KEY_FORWARD },
{ 0x041e, KEY_NEXT },
};
static struct rc_keymap avermedia_m733a_rm_k6_map = {
.map = {
.scan = avermedia_m733a_rm_k6,
.size = ARRAY_SIZE(avermedia_m733a_rm_k6),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_AVERMEDIA_M733A_RM_K6,
}
};
static int __init init_rc_map_avermedia_m733a_rm_k6(void)
{
return ir_register_map(&avermedia_m733a_rm_k6_map);
}
static void __exit exit_rc_map_avermedia_m733a_rm_k6(void)
{
ir_unregister_map(&avermedia_m733a_rm_k6_map);
}
module_init(init_rc_map_avermedia_m733a_rm_k6)
module_exit(exit_rc_map_avermedia_m733a_rm_k6)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,79 @@
/*
* AverMedia RM-KS remote controller keytable
*
* Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <media/rc-map.h>
/* Initial keytable is from Jose Alberto Reguero <jareguero@telefonica.net>
and Felipe Morales Moreno <felipe.morales.moreno@gmail.com> */
/* FIXME: mappings are not 100% correct? */
static struct ir_scancode avermedia_rm_ks[] = {
{ 0x0501, KEY_POWER2 },
{ 0x0502, KEY_CHANNELUP },
{ 0x0503, KEY_CHANNELDOWN },
{ 0x0504, KEY_VOLUMEUP },
{ 0x0505, KEY_VOLUMEDOWN },
{ 0x0506, KEY_MUTE },
{ 0x0507, KEY_RIGHT },
{ 0x0508, KEY_PROG1 },
{ 0x0509, KEY_1 },
{ 0x050a, KEY_2 },
{ 0x050b, KEY_3 },
{ 0x050c, KEY_4 },
{ 0x050d, KEY_5 },
{ 0x050e, KEY_6 },
{ 0x050f, KEY_7 },
{ 0x0510, KEY_8 },
{ 0x0511, KEY_9 },
{ 0x0512, KEY_0 },
{ 0x0513, KEY_AUDIO },
{ 0x0515, KEY_EPG },
{ 0x0516, KEY_PLAY },
{ 0x0517, KEY_RECORD },
{ 0x0518, KEY_STOP },
{ 0x051c, KEY_BACK },
{ 0x051d, KEY_FORWARD },
{ 0x054d, KEY_LEFT },
{ 0x0556, KEY_ZOOM },
};
static struct rc_keymap avermedia_rm_ks_map = {
.map = {
.scan = avermedia_rm_ks,
.size = ARRAY_SIZE(avermedia_rm_ks),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_AVERMEDIA_RM_KS,
}
};
static int __init init_rc_map_avermedia_rm_ks(void)
{
return ir_register_map(&avermedia_rm_ks_map);
}
static void __exit exit_rc_map_avermedia_rm_ks(void)
{
ir_unregister_map(&avermedia_rm_ks_map);
}
module_init(init_rc_map_avermedia_rm_ks)
module_exit(exit_rc_map_avermedia_rm_ks)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");

View File

@@ -0,0 +1,86 @@
/* avermedia.h - Keytable for avermedia Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Alex Hermann <gaaf@gmx.net> */
static struct ir_scancode avermedia[] = {
{ 0x28, KEY_1 },
{ 0x18, KEY_2 },
{ 0x38, KEY_3 },
{ 0x24, KEY_4 },
{ 0x14, KEY_5 },
{ 0x34, KEY_6 },
{ 0x2c, KEY_7 },
{ 0x1c, KEY_8 },
{ 0x3c, KEY_9 },
{ 0x22, KEY_0 },
{ 0x20, KEY_TV }, /* TV/FM */
{ 0x10, KEY_CD }, /* CD */
{ 0x30, KEY_TEXT }, /* TELETEXT */
{ 0x00, KEY_POWER }, /* POWER */
{ 0x08, KEY_VIDEO }, /* VIDEO */
{ 0x04, KEY_AUDIO }, /* AUDIO */
{ 0x0c, KEY_ZOOM }, /* FULL SCREEN */
{ 0x12, KEY_SUBTITLE }, /* DISPLAY */
{ 0x32, KEY_REWIND }, /* LOOP */
{ 0x02, KEY_PRINT }, /* PREVIEW */
{ 0x2a, KEY_SEARCH }, /* AUTOSCAN */
{ 0x1a, KEY_SLEEP }, /* FREEZE */
{ 0x3a, KEY_CAMERA }, /* SNAPSHOT */
{ 0x0a, KEY_MUTE }, /* MUTE */
{ 0x26, KEY_RECORD }, /* RECORD */
{ 0x16, KEY_PAUSE }, /* PAUSE */
{ 0x36, KEY_STOP }, /* STOP */
{ 0x06, KEY_PLAY }, /* PLAY */
{ 0x2e, KEY_RED }, /* RED */
{ 0x21, KEY_GREEN }, /* GREEN */
{ 0x0e, KEY_YELLOW }, /* YELLOW */
{ 0x01, KEY_BLUE }, /* BLUE */
{ 0x1e, KEY_VOLUMEDOWN }, /* VOLUME- */
{ 0x3e, KEY_VOLUMEUP }, /* VOLUME+ */
{ 0x11, KEY_CHANNELDOWN }, /* CHANNEL/PAGE- */
{ 0x31, KEY_CHANNELUP } /* CHANNEL/PAGE+ */
};
static struct rc_keymap avermedia_map = {
.map = {
.scan = avermedia,
.size = ARRAY_SIZE(avermedia),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_AVERMEDIA,
}
};
static int __init init_rc_map_avermedia(void)
{
return ir_register_map(&avermedia_map);
}
static void __exit exit_rc_map_avermedia(void)
{
ir_unregister_map(&avermedia_map);
}
module_init(init_rc_map_avermedia)
module_exit(exit_rc_map_avermedia)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,85 @@
/* avertv-303.h - Keytable for avertv_303 Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* AVERTV STUDIO 303 Remote */
static struct ir_scancode avertv_303[] = {
{ 0x2a, KEY_1 },
{ 0x32, KEY_2 },
{ 0x3a, KEY_3 },
{ 0x4a, KEY_4 },
{ 0x52, KEY_5 },
{ 0x5a, KEY_6 },
{ 0x6a, KEY_7 },
{ 0x72, KEY_8 },
{ 0x7a, KEY_9 },
{ 0x0e, KEY_0 },
{ 0x02, KEY_POWER },
{ 0x22, KEY_VIDEO },
{ 0x42, KEY_AUDIO },
{ 0x62, KEY_ZOOM },
{ 0x0a, KEY_TV },
{ 0x12, KEY_CD },
{ 0x1a, KEY_TEXT },
{ 0x16, KEY_SUBTITLE },
{ 0x1e, KEY_REWIND },
{ 0x06, KEY_PRINT },
{ 0x2e, KEY_SEARCH },
{ 0x36, KEY_SLEEP },
{ 0x3e, KEY_SHUFFLE },
{ 0x26, KEY_MUTE },
{ 0x4e, KEY_RECORD },
{ 0x56, KEY_PAUSE },
{ 0x5e, KEY_STOP },
{ 0x46, KEY_PLAY },
{ 0x6e, KEY_RED },
{ 0x0b, KEY_GREEN },
{ 0x66, KEY_YELLOW },
{ 0x03, KEY_BLUE },
{ 0x76, KEY_LEFT },
{ 0x7e, KEY_RIGHT },
{ 0x13, KEY_DOWN },
{ 0x1b, KEY_UP },
};
static struct rc_keymap avertv_303_map = {
.map = {
.scan = avertv_303,
.size = ARRAY_SIZE(avertv_303),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_AVERTV_303,
}
};
static int __init init_rc_map_avertv_303(void)
{
return ir_register_map(&avertv_303_map);
}
static void __exit exit_rc_map_avertv_303(void)
{
ir_unregister_map(&avertv_303_map);
}
module_init(init_rc_map_avertv_303)
module_exit(exit_rc_map_avertv_303)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,102 @@
/*
* TwinHan AzureWave AD-TU700(704J) remote controller keytable
*
* Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <media/rc-map.h>
static struct ir_scancode azurewave_ad_tu700[] = {
{ 0x0000, KEY_TAB }, /* Tab */
{ 0x0001, KEY_2 },
{ 0x0002, KEY_CHANNELDOWN },
{ 0x0003, KEY_1 },
{ 0x0004, KEY_MENU }, /* Record List */
{ 0x0005, KEY_CHANNELUP },
{ 0x0006, KEY_3 },
{ 0x0007, KEY_SLEEP }, /* Hibernate */
{ 0x0008, KEY_VIDEO }, /* A/V */
{ 0x0009, KEY_4 },
{ 0x000a, KEY_VOLUMEDOWN },
{ 0x000c, KEY_CANCEL }, /* Cancel */
{ 0x000d, KEY_7 },
{ 0x000e, KEY_AGAIN }, /* Recall */
{ 0x000f, KEY_TEXT }, /* Teletext */
{ 0x0010, KEY_MUTE },
{ 0x0011, KEY_RECORD },
{ 0x0012, KEY_FASTFORWARD }, /* FF >> */
{ 0x0013, KEY_BACK }, /* Back */
{ 0x0014, KEY_PLAY },
{ 0x0015, KEY_0 },
{ 0x0016, KEY_POWER2 }, /* [red power button] */
{ 0x0017, KEY_FAVORITES }, /* Favorite List */
{ 0x0018, KEY_RED },
{ 0x0019, KEY_8 },
{ 0x001a, KEY_STOP },
{ 0x001b, KEY_9 },
{ 0x001c, KEY_EPG }, /* Info/EPG */
{ 0x001d, KEY_5 },
{ 0x001e, KEY_VOLUMEUP },
{ 0x001f, KEY_6 },
{ 0x0040, KEY_REWIND }, /* FR << */
{ 0x0041, KEY_PREVIOUS }, /* Replay */
{ 0x0042, KEY_NEXT }, /* Skip */
{ 0x0043, KEY_SUBTITLE }, /* Subtitle / CC */
{ 0x0045, KEY_KPPLUS }, /* Zoom+ */
{ 0x0046, KEY_KPMINUS }, /* Zoom- */
{ 0x0047, KEY_NEW }, /* PIP */
{ 0x0048, KEY_INFO }, /* Preview */
{ 0x0049, KEY_MODE }, /* L/R */
{ 0x004a, KEY_CLEAR }, /* Clear */
{ 0x004b, KEY_UP }, /* up arrow */
{ 0x004c, KEY_PAUSE },
{ 0x004d, KEY_ZOOM }, /* Full Screen */
{ 0x004e, KEY_LEFT }, /* left arrow */
{ 0x004f, KEY_OK }, /* Enter / ok */
{ 0x0050, KEY_LANGUAGE }, /* SAP */
{ 0x0051, KEY_DOWN }, /* down arrow */
{ 0x0052, KEY_RIGHT }, /* right arrow */
{ 0x0053, KEY_GREEN },
{ 0x0054, KEY_CAMERA }, /* Capture */
{ 0x005e, KEY_YELLOW },
{ 0x005f, KEY_BLUE },
};
static struct rc_keymap azurewave_ad_tu700_map = {
.map = {
.scan = azurewave_ad_tu700,
.size = ARRAY_SIZE(azurewave_ad_tu700),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_AZUREWAVE_AD_TU700,
}
};
static int __init init_rc_map_azurewave_ad_tu700(void)
{
return ir_register_map(&azurewave_ad_tu700_map);
}
static void __exit exit_rc_map_azurewave_ad_tu700(void)
{
ir_unregister_map(&azurewave_ad_tu700_map);
}
module_init(init_rc_map_azurewave_ad_tu700)
module_exit(exit_rc_map_azurewave_ad_tu700)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");

View File

@@ -0,0 +1,108 @@
/* behold-columbus.h - Keytable for behold_columbus Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Beholder Intl. Ltd. 2008
* Dmitry Belimov d.belimov@google.com
* Keytable is used by BeholdTV Columbus
* The "ascii-art picture" below (in comments, first row
* is the keycode in hex, and subsequent row(s) shows
* the button labels (several variants when appropriate)
* helps to descide which keycodes to assign to the buttons.
*/
static struct ir_scancode behold_columbus[] = {
/* 0x13 0x11 0x1C 0x12 *
* Mute Source TV/FM Power *
* */
{ 0x13, KEY_MUTE },
{ 0x11, KEY_PROPS },
{ 0x1C, KEY_TUNER }, /* KEY_TV/KEY_RADIO */
{ 0x12, KEY_POWER },
/* 0x01 0x02 0x03 0x0D *
* 1 2 3 Stereo *
* *
* 0x04 0x05 0x06 0x19 *
* 4 5 6 Snapshot *
* *
* 0x07 0x08 0x09 0x10 *
* 7 8 9 Zoom *
* */
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x0D, KEY_SETUP }, /* Setup key */
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x19, KEY_CAMERA }, /* Snapshot key */
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
{ 0x10, KEY_ZOOM },
/* 0x0A 0x00 0x0B 0x0C *
* RECALL 0 ChannelUp VolumeUp *
* */
{ 0x0A, KEY_AGAIN },
{ 0x00, KEY_0 },
{ 0x0B, KEY_CHANNELUP },
{ 0x0C, KEY_VOLUMEUP },
/* 0x1B 0x1D 0x15 0x18 *
* Timeshift Record ChannelDown VolumeDown *
* */
{ 0x1B, KEY_TIME },
{ 0x1D, KEY_RECORD },
{ 0x15, KEY_CHANNELDOWN },
{ 0x18, KEY_VOLUMEDOWN },
/* 0x0E 0x1E 0x0F 0x1A *
* Stop Pause Previouse Next *
* */
{ 0x0E, KEY_STOP },
{ 0x1E, KEY_PAUSE },
{ 0x0F, KEY_PREVIOUS },
{ 0x1A, KEY_NEXT },
};
static struct rc_keymap behold_columbus_map = {
.map = {
.scan = behold_columbus,
.size = ARRAY_SIZE(behold_columbus),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_BEHOLD_COLUMBUS,
}
};
static int __init init_rc_map_behold_columbus(void)
{
return ir_register_map(&behold_columbus_map);
}
static void __exit exit_rc_map_behold_columbus(void)
{
ir_unregister_map(&behold_columbus_map);
}
module_init(init_rc_map_behold_columbus)
module_exit(exit_rc_map_behold_columbus)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,141 @@
/* behold.h - Keytable for behold Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/*
* Igor Kuznetsov <igk72@ya.ru>
* Andrey J. Melnikov <temnota@kmv.ru>
*
* Keytable is used by BeholdTV 60x series, M6 series at
* least, and probably other cards too.
* The "ascii-art picture" below (in comments, first row
* is the keycode in hex, and subsequent row(s) shows
* the button labels (several variants when appropriate)
* helps to descide which keycodes to assign to the buttons.
*/
static struct ir_scancode behold[] = {
/* 0x1c 0x12 *
* TV/FM POWER *
* */
{ 0x1c, KEY_TUNER }, /* XXX KEY_TV / KEY_RADIO */
{ 0x12, KEY_POWER },
/* 0x01 0x02 0x03 *
* 1 2 3 *
* *
* 0x04 0x05 0x06 *
* 4 5 6 *
* *
* 0x07 0x08 0x09 *
* 7 8 9 *
* */
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
/* 0x0a 0x00 0x17 *
* RECALL 0 MODE *
* */
{ 0x0a, KEY_AGAIN },
{ 0x00, KEY_0 },
{ 0x17, KEY_MODE },
/* 0x14 0x10 *
* ASPECT FULLSCREEN *
* */
{ 0x14, KEY_SCREEN },
{ 0x10, KEY_ZOOM },
/* 0x0b *
* Up *
* *
* 0x18 0x16 0x0c *
* Left Ok Right *
* *
* 0x015 *
* Down *
* */
{ 0x0b, KEY_CHANNELUP },
{ 0x18, KEY_VOLUMEDOWN },
{ 0x16, KEY_OK }, /* XXX KEY_ENTER */
{ 0x0c, KEY_VOLUMEUP },
{ 0x15, KEY_CHANNELDOWN },
/* 0x11 0x0d *
* MUTE INFO *
* */
{ 0x11, KEY_MUTE },
{ 0x0d, KEY_INFO },
/* 0x0f 0x1b 0x1a *
* RECORD PLAY/PAUSE STOP *
* *
* 0x0e 0x1f 0x1e *
*TELETEXT AUDIO SOURCE *
* RED YELLOW *
* */
{ 0x0f, KEY_RECORD },
{ 0x1b, KEY_PLAYPAUSE },
{ 0x1a, KEY_STOP },
{ 0x0e, KEY_TEXT },
{ 0x1f, KEY_RED }, /*XXX KEY_AUDIO */
{ 0x1e, KEY_YELLOW }, /*XXX KEY_SOURCE */
/* 0x1d 0x13 0x19 *
* SLEEP PREVIEW DVB *
* GREEN BLUE *
* */
{ 0x1d, KEY_SLEEP },
{ 0x13, KEY_GREEN },
{ 0x19, KEY_BLUE }, /* XXX KEY_SAT */
/* 0x58 0x5c *
* FREEZE SNAPSHOT *
* */
{ 0x58, KEY_SLOW },
{ 0x5c, KEY_CAMERA },
};
static struct rc_keymap behold_map = {
.map = {
.scan = behold,
.size = ARRAY_SIZE(behold),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_BEHOLD,
}
};
static int __init init_rc_map_behold(void)
{
return ir_register_map(&behold_map);
}
static void __exit exit_rc_map_behold(void)
{
ir_unregister_map(&behold_map);
}
module_init(init_rc_map_behold)
module_exit(exit_rc_map_behold)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,92 @@
/* budget-ci-old.h - Keytable for budget_ci_old Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* From reading the following remotes:
* Zenith Universal 7 / TV Mode 807 / VCR Mode 837
* Hauppauge (from NOVA-CI-s box product)
* This is a "middle of the road" approach, differences are noted
*/
static struct ir_scancode budget_ci_old[] = {
{ 0x00, KEY_0 },
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
{ 0x0a, KEY_ENTER },
{ 0x0b, KEY_RED },
{ 0x0c, KEY_POWER }, /* RADIO on Hauppauge */
{ 0x0d, KEY_MUTE },
{ 0x0f, KEY_A }, /* TV on Hauppauge */
{ 0x10, KEY_VOLUMEUP },
{ 0x11, KEY_VOLUMEDOWN },
{ 0x14, KEY_B },
{ 0x1c, KEY_UP },
{ 0x1d, KEY_DOWN },
{ 0x1e, KEY_OPTION }, /* RESERVED on Hauppauge */
{ 0x1f, KEY_BREAK },
{ 0x20, KEY_CHANNELUP },
{ 0x21, KEY_CHANNELDOWN },
{ 0x22, KEY_PREVIOUS }, /* Prev Ch on Zenith, SOURCE on Hauppauge */
{ 0x24, KEY_RESTART },
{ 0x25, KEY_OK },
{ 0x26, KEY_CYCLEWINDOWS }, /* MINIMIZE on Hauppauge */
{ 0x28, KEY_ENTER }, /* VCR mode on Zenith */
{ 0x29, KEY_PAUSE },
{ 0x2b, KEY_RIGHT },
{ 0x2c, KEY_LEFT },
{ 0x2e, KEY_MENU }, /* FULL SCREEN on Hauppauge */
{ 0x30, KEY_SLOW },
{ 0x31, KEY_PREVIOUS }, /* VCR mode on Zenith */
{ 0x32, KEY_REWIND },
{ 0x34, KEY_FASTFORWARD },
{ 0x35, KEY_PLAY },
{ 0x36, KEY_STOP },
{ 0x37, KEY_RECORD },
{ 0x38, KEY_TUNER }, /* TV/VCR on Zenith */
{ 0x3a, KEY_C },
{ 0x3c, KEY_EXIT },
{ 0x3d, KEY_POWER2 },
{ 0x3e, KEY_TUNER },
};
static struct rc_keymap budget_ci_old_map = {
.map = {
.scan = budget_ci_old,
.size = ARRAY_SIZE(budget_ci_old),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_BUDGET_CI_OLD,
}
};
static int __init init_rc_map_budget_ci_old(void)
{
return ir_register_map(&budget_ci_old_map);
}
static void __exit exit_rc_map_budget_ci_old(void)
{
ir_unregister_map(&budget_ci_old_map);
}
module_init(init_rc_map_budget_ci_old)
module_exit(exit_rc_map_budget_ci_old)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,84 @@
/* cinergy-1400.h - Keytable for cinergy_1400 Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Cinergy 1400 DVB-T */
static struct ir_scancode cinergy_1400[] = {
{ 0x01, KEY_POWER },
{ 0x02, KEY_1 },
{ 0x03, KEY_2 },
{ 0x04, KEY_3 },
{ 0x05, KEY_4 },
{ 0x06, KEY_5 },
{ 0x07, KEY_6 },
{ 0x08, KEY_7 },
{ 0x09, KEY_8 },
{ 0x0a, KEY_9 },
{ 0x0c, KEY_0 },
{ 0x0b, KEY_VIDEO },
{ 0x0d, KEY_REFRESH },
{ 0x0e, KEY_SELECT },
{ 0x0f, KEY_EPG },
{ 0x10, KEY_UP },
{ 0x11, KEY_LEFT },
{ 0x12, KEY_OK },
{ 0x13, KEY_RIGHT },
{ 0x14, KEY_DOWN },
{ 0x15, KEY_TEXT },
{ 0x16, KEY_INFO },
{ 0x17, KEY_RED },
{ 0x18, KEY_GREEN },
{ 0x19, KEY_YELLOW },
{ 0x1a, KEY_BLUE },
{ 0x1b, KEY_CHANNELUP },
{ 0x1c, KEY_VOLUMEUP },
{ 0x1d, KEY_MUTE },
{ 0x1e, KEY_VOLUMEDOWN },
{ 0x1f, KEY_CHANNELDOWN },
{ 0x40, KEY_PAUSE },
{ 0x4c, KEY_PLAY },
{ 0x58, KEY_RECORD },
{ 0x54, KEY_PREVIOUS },
{ 0x48, KEY_STOP },
{ 0x5c, KEY_NEXT },
};
static struct rc_keymap cinergy_1400_map = {
.map = {
.scan = cinergy_1400,
.size = ARRAY_SIZE(cinergy_1400),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_CINERGY_1400,
}
};
static int __init init_rc_map_cinergy_1400(void)
{
return ir_register_map(&cinergy_1400_map);
}
static void __exit exit_rc_map_cinergy_1400(void)
{
ir_unregister_map(&cinergy_1400_map);
}
module_init(init_rc_map_cinergy_1400)
module_exit(exit_rc_map_cinergy_1400)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,78 @@
/* cinergy.h - Keytable for cinergy Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode cinergy[] = {
{ 0x00, KEY_0 },
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
{ 0x0a, KEY_POWER },
{ 0x0b, KEY_PROG1 }, /* app */
{ 0x0c, KEY_ZOOM }, /* zoom/fullscreen */
{ 0x0d, KEY_CHANNELUP }, /* channel */
{ 0x0e, KEY_CHANNELDOWN }, /* channel- */
{ 0x0f, KEY_VOLUMEUP },
{ 0x10, KEY_VOLUMEDOWN },
{ 0x11, KEY_TUNER }, /* AV */
{ 0x12, KEY_NUMLOCK }, /* -/-- */
{ 0x13, KEY_AUDIO }, /* audio */
{ 0x14, KEY_MUTE },
{ 0x15, KEY_UP },
{ 0x16, KEY_DOWN },
{ 0x17, KEY_LEFT },
{ 0x18, KEY_RIGHT },
{ 0x19, BTN_LEFT, },
{ 0x1a, BTN_RIGHT, },
{ 0x1b, KEY_WWW }, /* text */
{ 0x1c, KEY_REWIND },
{ 0x1d, KEY_FORWARD },
{ 0x1e, KEY_RECORD },
{ 0x1f, KEY_PLAY },
{ 0x20, KEY_PREVIOUSSONG },
{ 0x21, KEY_NEXTSONG },
{ 0x22, KEY_PAUSE },
{ 0x23, KEY_STOP },
};
static struct rc_keymap cinergy_map = {
.map = {
.scan = cinergy,
.size = ARRAY_SIZE(cinergy),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_CINERGY,
}
};
static int __init init_rc_map_cinergy(void)
{
return ir_register_map(&cinergy_map);
}
static void __exit exit_rc_map_cinergy(void)
{
ir_unregister_map(&cinergy_map);
}
module_init(init_rc_map_cinergy)
module_exit(exit_rc_map_cinergy)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,124 @@
/* rc-dvb0700-big.c - Keytable for devices in dvb0700
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* TODO: This table is a real mess, as it merges RC codes from several
* devices into a big table. It also has both RC-5 and NEC codes inside.
* It should be broken into small tables, and the protocols should properly
* be indentificated.
*
* The table were imported from dib0700_devices.c.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode dib0700_nec_table[] = {
/* Key codes for the Pixelview SBTVD remote */
{ 0x8613, KEY_MUTE },
{ 0x8612, KEY_POWER },
{ 0x8601, KEY_1 },
{ 0x8602, KEY_2 },
{ 0x8603, KEY_3 },
{ 0x8604, KEY_4 },
{ 0x8605, KEY_5 },
{ 0x8606, KEY_6 },
{ 0x8607, KEY_7 },
{ 0x8608, KEY_8 },
{ 0x8609, KEY_9 },
{ 0x8600, KEY_0 },
{ 0x860d, KEY_CHANNELUP },
{ 0x8619, KEY_CHANNELDOWN },
{ 0x8610, KEY_VOLUMEUP },
{ 0x860c, KEY_VOLUMEDOWN },
{ 0x860a, KEY_CAMERA },
{ 0x860b, KEY_ZOOM },
{ 0x861b, KEY_BACKSPACE },
{ 0x8615, KEY_ENTER },
{ 0x861d, KEY_UP },
{ 0x861e, KEY_DOWN },
{ 0x860e, KEY_LEFT },
{ 0x860f, KEY_RIGHT },
{ 0x8618, KEY_RECORD },
{ 0x861a, KEY_STOP },
/* Key codes for the EvolutePC TVWay+ remote */
{ 0x7a00, KEY_MENU },
{ 0x7a01, KEY_RECORD },
{ 0x7a02, KEY_PLAY },
{ 0x7a03, KEY_STOP },
{ 0x7a10, KEY_CHANNELUP },
{ 0x7a11, KEY_CHANNELDOWN },
{ 0x7a12, KEY_VOLUMEUP },
{ 0x7a13, KEY_VOLUMEDOWN },
{ 0x7a40, KEY_POWER },
{ 0x7a41, KEY_MUTE },
/* Key codes for the Elgato EyeTV Diversity silver remote */
{ 0x4501, KEY_POWER },
{ 0x4502, KEY_MUTE },
{ 0x4503, KEY_1 },
{ 0x4504, KEY_2 },
{ 0x4505, KEY_3 },
{ 0x4506, KEY_4 },
{ 0x4507, KEY_5 },
{ 0x4508, KEY_6 },
{ 0x4509, KEY_7 },
{ 0x450a, KEY_8 },
{ 0x450b, KEY_9 },
{ 0x450c, KEY_LAST },
{ 0x450d, KEY_0 },
{ 0x450e, KEY_ENTER },
{ 0x450f, KEY_RED },
{ 0x4510, KEY_CHANNELUP },
{ 0x4511, KEY_GREEN },
{ 0x4512, KEY_VOLUMEDOWN },
{ 0x4513, KEY_OK },
{ 0x4514, KEY_VOLUMEUP },
{ 0x4515, KEY_YELLOW },
{ 0x4516, KEY_CHANNELDOWN },
{ 0x4517, KEY_BLUE },
{ 0x4518, KEY_LEFT }, /* Skip backwards */
{ 0x4519, KEY_PLAYPAUSE },
{ 0x451a, KEY_RIGHT }, /* Skip forward */
{ 0x451b, KEY_REWIND },
{ 0x451c, KEY_L }, /* Live */
{ 0x451d, KEY_FASTFORWARD },
{ 0x451e, KEY_STOP }, /* 'Reveal' for Teletext */
{ 0x451f, KEY_MENU }, /* KEY_TEXT for Teletext */
{ 0x4540, KEY_RECORD }, /* Font 'Size' for Teletext */
{ 0x4541, KEY_SCREEN }, /* Full screen toggle, 'Hold' for Teletext */
{ 0x4542, KEY_SELECT }, /* Select video input, 'Select' for Teletext */
};
static struct rc_keymap dib0700_nec_map = {
.map = {
.scan = dib0700_nec_table,
.size = ARRAY_SIZE(dib0700_nec_table),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_DIB0700_NEC_TABLE,
}
};
static int __init init_rc_map(void)
{
return ir_register_map(&dib0700_nec_map);
}
static void __exit exit_rc_map(void)
{
ir_unregister_map(&dib0700_nec_map);
}
module_init(init_rc_map)
module_exit(exit_rc_map)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,235 @@
/* rc-dvb0700-big.c - Keytable for devices in dvb0700
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* TODO: This table is a real mess, as it merges RC codes from several
* devices into a big table. It also has both RC-5 and NEC codes inside.
* It should be broken into small tables, and the protocols should properly
* be indentificated.
*
* The table were imported from dib0700_devices.c.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode dib0700_rc5_table[] = {
/* Key codes for the tiny Pinnacle remote*/
{ 0x0700, KEY_MUTE },
{ 0x0701, KEY_MENU }, /* Pinnacle logo */
{ 0x0739, KEY_POWER },
{ 0x0703, KEY_VOLUMEUP },
{ 0x0709, KEY_VOLUMEDOWN },
{ 0x0706, KEY_CHANNELUP },
{ 0x070c, KEY_CHANNELDOWN },
{ 0x070f, KEY_1 },
{ 0x0715, KEY_2 },
{ 0x0710, KEY_3 },
{ 0x0718, KEY_4 },
{ 0x071b, KEY_5 },
{ 0x071e, KEY_6 },
{ 0x0711, KEY_7 },
{ 0x0721, KEY_8 },
{ 0x0712, KEY_9 },
{ 0x0727, KEY_0 },
{ 0x0724, KEY_SCREEN }, /* 'Square' key */
{ 0x072a, KEY_TEXT }, /* 'T' key */
{ 0x072d, KEY_REWIND },
{ 0x0730, KEY_PLAY },
{ 0x0733, KEY_FASTFORWARD },
{ 0x0736, KEY_RECORD },
{ 0x073c, KEY_STOP },
{ 0x073f, KEY_CANCEL }, /* '?' key */
/* Key codes for the Terratec Cinergy DT XS Diversity, similar to cinergyT2.c */
{ 0xeb01, KEY_POWER },
{ 0xeb02, KEY_1 },
{ 0xeb03, KEY_2 },
{ 0xeb04, KEY_3 },
{ 0xeb05, KEY_4 },
{ 0xeb06, KEY_5 },
{ 0xeb07, KEY_6 },
{ 0xeb08, KEY_7 },
{ 0xeb09, KEY_8 },
{ 0xeb0a, KEY_9 },
{ 0xeb0b, KEY_VIDEO },
{ 0xeb0c, KEY_0 },
{ 0xeb0d, KEY_REFRESH },
{ 0xeb0f, KEY_EPG },
{ 0xeb10, KEY_UP },
{ 0xeb11, KEY_LEFT },
{ 0xeb12, KEY_OK },
{ 0xeb13, KEY_RIGHT },
{ 0xeb14, KEY_DOWN },
{ 0xeb16, KEY_INFO },
{ 0xeb17, KEY_RED },
{ 0xeb18, KEY_GREEN },
{ 0xeb19, KEY_YELLOW },
{ 0xeb1a, KEY_BLUE },
{ 0xeb1b, KEY_CHANNELUP },
{ 0xeb1c, KEY_VOLUMEUP },
{ 0xeb1d, KEY_MUTE },
{ 0xeb1e, KEY_VOLUMEDOWN },
{ 0xeb1f, KEY_CHANNELDOWN },
{ 0xeb40, KEY_PAUSE },
{ 0xeb41, KEY_HOME },
{ 0xeb42, KEY_MENU }, /* DVD Menu */
{ 0xeb43, KEY_SUBTITLE },
{ 0xeb44, KEY_TEXT }, /* Teletext */
{ 0xeb45, KEY_DELETE },
{ 0xeb46, KEY_TV },
{ 0xeb47, KEY_DVD },
{ 0xeb48, KEY_STOP },
{ 0xeb49, KEY_VIDEO },
{ 0xeb4a, KEY_AUDIO }, /* Music */
{ 0xeb4b, KEY_SCREEN }, /* Pic */
{ 0xeb4c, KEY_PLAY },
{ 0xeb4d, KEY_BACK },
{ 0xeb4e, KEY_REWIND },
{ 0xeb4f, KEY_FASTFORWARD },
{ 0xeb54, KEY_PREVIOUS },
{ 0xeb58, KEY_RECORD },
{ 0xeb5c, KEY_NEXT },
/* Key codes for the Haupauge WinTV Nova-TD, copied from nova-t-usb2.c (Nova-T USB2) */
{ 0x1e00, KEY_0 },
{ 0x1e01, KEY_1 },
{ 0x1e02, KEY_2 },
{ 0x1e03, KEY_3 },
{ 0x1e04, KEY_4 },
{ 0x1e05, KEY_5 },
{ 0x1e06, KEY_6 },
{ 0x1e07, KEY_7 },
{ 0x1e08, KEY_8 },
{ 0x1e09, KEY_9 },
{ 0x1e0a, KEY_KPASTERISK },
{ 0x1e0b, KEY_RED },
{ 0x1e0c, KEY_RADIO },
{ 0x1e0d, KEY_MENU },
{ 0x1e0e, KEY_GRAVE }, /* # */
{ 0x1e0f, KEY_MUTE },
{ 0x1e10, KEY_VOLUMEUP },
{ 0x1e11, KEY_VOLUMEDOWN },
{ 0x1e12, KEY_CHANNEL },
{ 0x1e14, KEY_UP },
{ 0x1e15, KEY_DOWN },
{ 0x1e16, KEY_LEFT },
{ 0x1e17, KEY_RIGHT },
{ 0x1e18, KEY_VIDEO },
{ 0x1e19, KEY_AUDIO },
{ 0x1e1a, KEY_MEDIA },
{ 0x1e1b, KEY_EPG },
{ 0x1e1c, KEY_TV },
{ 0x1e1e, KEY_NEXT },
{ 0x1e1f, KEY_BACK },
{ 0x1e20, KEY_CHANNELUP },
{ 0x1e21, KEY_CHANNELDOWN },
{ 0x1e24, KEY_LAST }, /* Skip backwards */
{ 0x1e25, KEY_OK },
{ 0x1e29, KEY_BLUE},
{ 0x1e2e, KEY_GREEN },
{ 0x1e30, KEY_PAUSE },
{ 0x1e32, KEY_REWIND },
{ 0x1e34, KEY_FASTFORWARD },
{ 0x1e35, KEY_PLAY },
{ 0x1e36, KEY_STOP },
{ 0x1e37, KEY_RECORD },
{ 0x1e38, KEY_YELLOW },
{ 0x1e3b, KEY_GOTO },
{ 0x1e3d, KEY_POWER },
/* Key codes for the Leadtek Winfast DTV Dongle */
{ 0x0042, KEY_POWER },
{ 0x077c, KEY_TUNER },
{ 0x0f4e, KEY_PRINT }, /* PREVIEW */
{ 0x0840, KEY_SCREEN }, /* full screen toggle*/
{ 0x0f71, KEY_DOT }, /* frequency */
{ 0x0743, KEY_0 },
{ 0x0c41, KEY_1 },
{ 0x0443, KEY_2 },
{ 0x0b7f, KEY_3 },
{ 0x0e41, KEY_4 },
{ 0x0643, KEY_5 },
{ 0x097f, KEY_6 },
{ 0x0d7e, KEY_7 },
{ 0x057c, KEY_8 },
{ 0x0a40, KEY_9 },
{ 0x0e4e, KEY_CLEAR },
{ 0x047c, KEY_CHANNEL }, /* show channel number */
{ 0x0f41, KEY_LAST }, /* recall */
{ 0x0342, KEY_MUTE },
{ 0x064c, KEY_RESERVED }, /* PIP button*/
{ 0x0172, KEY_SHUFFLE }, /* SNAPSHOT */
{ 0x0c4e, KEY_PLAYPAUSE }, /* TIMESHIFT */
{ 0x0b70, KEY_RECORD },
{ 0x037d, KEY_VOLUMEUP },
{ 0x017d, KEY_VOLUMEDOWN },
{ 0x0242, KEY_CHANNELUP },
{ 0x007d, KEY_CHANNELDOWN },
/* Key codes for Nova-TD "credit card" remote control. */
{ 0x1d00, KEY_0 },
{ 0x1d01, KEY_1 },
{ 0x1d02, KEY_2 },
{ 0x1d03, KEY_3 },
{ 0x1d04, KEY_4 },
{ 0x1d05, KEY_5 },
{ 0x1d06, KEY_6 },
{ 0x1d07, KEY_7 },
{ 0x1d08, KEY_8 },
{ 0x1d09, KEY_9 },
{ 0x1d0a, KEY_TEXT },
{ 0x1d0d, KEY_MENU },
{ 0x1d0f, KEY_MUTE },
{ 0x1d10, KEY_VOLUMEUP },
{ 0x1d11, KEY_VOLUMEDOWN },
{ 0x1d12, KEY_CHANNEL },
{ 0x1d14, KEY_UP },
{ 0x1d15, KEY_DOWN },
{ 0x1d16, KEY_LEFT },
{ 0x1d17, KEY_RIGHT },
{ 0x1d1c, KEY_TV },
{ 0x1d1e, KEY_NEXT },
{ 0x1d1f, KEY_BACK },
{ 0x1d20, KEY_CHANNELUP },
{ 0x1d21, KEY_CHANNELDOWN },
{ 0x1d24, KEY_LAST },
{ 0x1d25, KEY_OK },
{ 0x1d30, KEY_PAUSE },
{ 0x1d32, KEY_REWIND },
{ 0x1d34, KEY_FASTFORWARD },
{ 0x1d35, KEY_PLAY },
{ 0x1d36, KEY_STOP },
{ 0x1d37, KEY_RECORD },
{ 0x1d3b, KEY_GOTO },
{ 0x1d3d, KEY_POWER },
};
static struct rc_keymap dib0700_rc5_map = {
.map = {
.scan = dib0700_rc5_table,
.size = ARRAY_SIZE(dib0700_rc5_table),
.ir_type = IR_TYPE_RC5,
.name = RC_MAP_DIB0700_RC5_TABLE,
}
};
static int __init init_rc_map(void)
{
return ir_register_map(&dib0700_rc5_map);
}
static void __exit exit_rc_map(void)
{
ir_unregister_map(&dib0700_rc5_map);
}
module_init(init_rc_map)
module_exit(exit_rc_map)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,98 @@
/*
* DigitalNow TinyTwin remote controller keytable
*
* Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <media/rc-map.h>
static struct ir_scancode digitalnow_tinytwin[] = {
{ 0x0000, KEY_MUTE }, /* [symbol speaker] */
{ 0x0001, KEY_VOLUMEUP },
{ 0x0002, KEY_POWER2 }, /* TV [power button] */
{ 0x0003, KEY_2 },
{ 0x0004, KEY_3 },
{ 0x0005, KEY_4 },
{ 0x0006, KEY_6 },
{ 0x0007, KEY_7 },
{ 0x0008, KEY_8 },
{ 0x0009, KEY_NUMERIC_STAR }, /* [*] */
{ 0x000a, KEY_0 },
{ 0x000b, KEY_NUMERIC_POUND }, /* [#] */
{ 0x000c, KEY_RIGHT }, /* [right arrow] */
{ 0x000d, KEY_HOMEPAGE }, /* [symbol home] Start */
{ 0x000e, KEY_RED }, /* [red] Videos */
{ 0x0010, KEY_POWER }, /* PC [power button] */
{ 0x0011, KEY_YELLOW }, /* [yellow] Pictures */
{ 0x0012, KEY_DOWN }, /* [down arrow] */
{ 0x0013, KEY_GREEN }, /* [green] Music */
{ 0x0014, KEY_CYCLEWINDOWS }, /* BACK */
{ 0x0015, KEY_FAVORITES }, /* MORE */
{ 0x0016, KEY_UP }, /* [up arrow] */
{ 0x0017, KEY_LEFT }, /* [left arrow] */
{ 0x0018, KEY_OK }, /* OK */
{ 0x0019, KEY_BLUE }, /* [blue] MyTV */
{ 0x001a, KEY_REWIND }, /* REW [<<] */
{ 0x001b, KEY_PLAY }, /* PLAY */
{ 0x001c, KEY_5 },
{ 0x001d, KEY_9 },
{ 0x001e, KEY_VOLUMEDOWN },
{ 0x001f, KEY_1 },
{ 0x0040, KEY_STOP }, /* STOP */
{ 0x0042, KEY_PAUSE }, /* PAUSE */
{ 0x0043, KEY_SCREEN }, /* Aspect */
{ 0x0044, KEY_FORWARD }, /* FWD [>>] */
{ 0x0045, KEY_NEXT }, /* SKIP */
{ 0x0048, KEY_RECORD }, /* RECORD */
{ 0x0049, KEY_VIDEO }, /* RTV */
{ 0x004a, KEY_EPG }, /* Guide */
{ 0x004b, KEY_CHANNELUP },
{ 0x004c, KEY_HELP }, /* Help */
{ 0x004d, KEY_RADIO }, /* Radio */
{ 0x004f, KEY_CHANNELDOWN },
{ 0x0050, KEY_DVD }, /* DVD */
{ 0x0051, KEY_AUDIO }, /* Audio */
{ 0x0052, KEY_TITLE }, /* Title */
{ 0x0053, KEY_NEW }, /* [symbol PIP?] */
{ 0x0057, KEY_MENU }, /* Mouse */
{ 0x005a, KEY_PREVIOUS }, /* REPLAY */
};
static struct rc_keymap digitalnow_tinytwin_map = {
.map = {
.scan = digitalnow_tinytwin,
.size = ARRAY_SIZE(digitalnow_tinytwin),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_DIGITALNOW_TINYTWIN,
}
};
static int __init init_rc_map_digitalnow_tinytwin(void)
{
return ir_register_map(&digitalnow_tinytwin_map);
}
static void __exit exit_rc_map_digitalnow_tinytwin(void)
{
ir_unregister_map(&digitalnow_tinytwin_map);
}
module_init(init_rc_map_digitalnow_tinytwin)
module_exit(exit_rc_map_digitalnow_tinytwin)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");

View File

@@ -0,0 +1,82 @@
/*
* Digittrade DVB-T USB Stick remote controller keytable
*
* Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <media/rc-map.h>
/* Digittrade DVB-T USB Stick remote controller. */
/* Imported from af9015.h.
Initial keytable was from Alain Kalker <miki@dds.nl> */
/* Digittrade DVB-T USB Stick */
static struct ir_scancode digittrade[] = {
{ 0x0000, KEY_9 },
{ 0x0001, KEY_EPG }, /* EPG */
{ 0x0002, KEY_VOLUMEDOWN }, /* Vol Dn */
{ 0x0003, KEY_TEXT }, /* TELETEXT */
{ 0x0004, KEY_8 },
{ 0x0005, KEY_MUTE }, /* MUTE */
{ 0x0006, KEY_POWER2 }, /* POWER */
{ 0x0009, KEY_ZOOM }, /* FULLSCREEN */
{ 0x000a, KEY_RECORD }, /* RECORD */
{ 0x000d, KEY_SUBTITLE }, /* SUBTITLE */
{ 0x000e, KEY_STOP }, /* STOP */
{ 0x0010, KEY_OK }, /* RETURN */
{ 0x0011, KEY_2 },
{ 0x0012, KEY_4 },
{ 0x0015, KEY_3 },
{ 0x0016, KEY_5 },
{ 0x0017, KEY_CHANNELDOWN }, /* Ch Dn */
{ 0x0019, KEY_CHANNELUP }, /* CH Up */
{ 0x001a, KEY_PAUSE }, /* PAUSE */
{ 0x001b, KEY_1 },
{ 0x001d, KEY_AUDIO }, /* DUAL SOUND */
{ 0x001e, KEY_PLAY }, /* PLAY */
{ 0x001f, KEY_CAMERA }, /* SNAPSHOT */
{ 0x0040, KEY_VOLUMEUP }, /* Vol Up */
{ 0x0048, KEY_7 },
{ 0x004c, KEY_6 },
{ 0x004d, KEY_PLAYPAUSE }, /* TIMESHIFT */
{ 0x0054, KEY_0 },
};
static struct rc_keymap digittrade_map = {
.map = {
.scan = digittrade,
.size = ARRAY_SIZE(digittrade),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_DIGITTRADE,
}
};
static int __init init_rc_map_digittrade(void)
{
return ir_register_map(&digittrade_map);
}
static void __exit exit_rc_map_digittrade(void)
{
ir_unregister_map(&digittrade_map);
}
module_init(init_rc_map_digittrade)
module_exit(exit_rc_map_digittrade)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");

View File

@@ -0,0 +1,76 @@
/* dm1105-nec.h - Keytable for dm1105_nec Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* DVBWorld remotes
Igor M. Liplianin <liplianin@me.by>
*/
static struct ir_scancode dm1105_nec[] = {
{ 0x0a, KEY_POWER2}, /* power */
{ 0x0c, KEY_MUTE}, /* mute */
{ 0x11, KEY_1},
{ 0x12, KEY_2},
{ 0x13, KEY_3},
{ 0x14, KEY_4},
{ 0x15, KEY_5},
{ 0x16, KEY_6},
{ 0x17, KEY_7},
{ 0x18, KEY_8},
{ 0x19, KEY_9},
{ 0x10, KEY_0},
{ 0x1c, KEY_CHANNELUP}, /* ch+ */
{ 0x0f, KEY_CHANNELDOWN}, /* ch- */
{ 0x1a, KEY_VOLUMEUP}, /* vol+ */
{ 0x0e, KEY_VOLUMEDOWN}, /* vol- */
{ 0x04, KEY_RECORD}, /* rec */
{ 0x09, KEY_CHANNEL}, /* fav */
{ 0x08, KEY_BACKSPACE}, /* rewind */
{ 0x07, KEY_FASTFORWARD}, /* fast */
{ 0x0b, KEY_PAUSE}, /* pause */
{ 0x02, KEY_ESC}, /* cancel */
{ 0x03, KEY_TAB}, /* tab */
{ 0x00, KEY_UP}, /* up */
{ 0x1f, KEY_ENTER}, /* ok */
{ 0x01, KEY_DOWN}, /* down */
{ 0x05, KEY_RECORD}, /* cap */
{ 0x06, KEY_STOP}, /* stop */
{ 0x40, KEY_ZOOM}, /* full */
{ 0x1e, KEY_TV}, /* tvmode */
{ 0x1b, KEY_B}, /* recall */
};
static struct rc_keymap dm1105_nec_map = {
.map = {
.scan = dm1105_nec,
.size = ARRAY_SIZE(dm1105_nec),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_DM1105_NEC,
}
};
static int __init init_rc_map_dm1105_nec(void)
{
return ir_register_map(&dm1105_nec_map);
}
static void __exit exit_rc_map_dm1105_nec(void)
{
ir_unregister_map(&dm1105_nec_map);
}
module_init(init_rc_map_dm1105_nec)
module_exit(exit_rc_map_dm1105_nec)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,78 @@
/* dntv-live-dvb-t.h - Keytable for dntv_live_dvb_t Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* DigitalNow DNTV Live DVB-T Remote */
static struct ir_scancode dntv_live_dvb_t[] = {
{ 0x00, KEY_ESC }, /* 'go up a level?' */
/* Keys 0 to 9 */
{ 0x0a, KEY_0 },
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
{ 0x0b, KEY_TUNER }, /* tv/fm */
{ 0x0c, KEY_SEARCH }, /* scan */
{ 0x0d, KEY_STOP },
{ 0x0e, KEY_PAUSE },
{ 0x0f, KEY_LIST }, /* source */
{ 0x10, KEY_MUTE },
{ 0x11, KEY_REWIND }, /* backward << */
{ 0x12, KEY_POWER },
{ 0x13, KEY_CAMERA }, /* snap */
{ 0x14, KEY_AUDIO }, /* stereo */
{ 0x15, KEY_CLEAR }, /* reset */
{ 0x16, KEY_PLAY },
{ 0x17, KEY_ENTER },
{ 0x18, KEY_ZOOM }, /* full screen */
{ 0x19, KEY_FASTFORWARD }, /* forward >> */
{ 0x1a, KEY_CHANNELUP },
{ 0x1b, KEY_VOLUMEUP },
{ 0x1c, KEY_INFO }, /* preview */
{ 0x1d, KEY_RECORD }, /* record */
{ 0x1e, KEY_CHANNELDOWN },
{ 0x1f, KEY_VOLUMEDOWN },
};
static struct rc_keymap dntv_live_dvb_t_map = {
.map = {
.scan = dntv_live_dvb_t,
.size = ARRAY_SIZE(dntv_live_dvb_t),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_DNTV_LIVE_DVB_T,
}
};
static int __init init_rc_map_dntv_live_dvb_t(void)
{
return ir_register_map(&dntv_live_dvb_t_map);
}
static void __exit exit_rc_map_dntv_live_dvb_t(void)
{
ir_unregister_map(&dntv_live_dvb_t_map);
}
module_init(init_rc_map_dntv_live_dvb_t)
module_exit(exit_rc_map_dntv_live_dvb_t)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,97 @@
/* dntv-live-dvbt-pro.h - Keytable for dntv_live_dvbt_pro Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* DigitalNow DNTV Live! DVB-T Pro Remote */
static struct ir_scancode dntv_live_dvbt_pro[] = {
{ 0x16, KEY_POWER },
{ 0x5b, KEY_HOME },
{ 0x55, KEY_TV }, /* live tv */
{ 0x58, KEY_TUNER }, /* digital Radio */
{ 0x5a, KEY_RADIO }, /* FM radio */
{ 0x59, KEY_DVD }, /* dvd menu */
{ 0x03, KEY_1 },
{ 0x01, KEY_2 },
{ 0x06, KEY_3 },
{ 0x09, KEY_4 },
{ 0x1d, KEY_5 },
{ 0x1f, KEY_6 },
{ 0x0d, KEY_7 },
{ 0x19, KEY_8 },
{ 0x1b, KEY_9 },
{ 0x0c, KEY_CANCEL },
{ 0x15, KEY_0 },
{ 0x4a, KEY_CLEAR },
{ 0x13, KEY_BACK },
{ 0x00, KEY_TAB },
{ 0x4b, KEY_UP },
{ 0x4e, KEY_LEFT },
{ 0x4f, KEY_OK },
{ 0x52, KEY_RIGHT },
{ 0x51, KEY_DOWN },
{ 0x1e, KEY_VOLUMEUP },
{ 0x0a, KEY_VOLUMEDOWN },
{ 0x02, KEY_CHANNELDOWN },
{ 0x05, KEY_CHANNELUP },
{ 0x11, KEY_RECORD },
{ 0x14, KEY_PLAY },
{ 0x4c, KEY_PAUSE },
{ 0x1a, KEY_STOP },
{ 0x40, KEY_REWIND },
{ 0x12, KEY_FASTFORWARD },
{ 0x41, KEY_PREVIOUSSONG }, /* replay |< */
{ 0x42, KEY_NEXTSONG }, /* skip >| */
{ 0x54, KEY_CAMERA }, /* capture */
{ 0x50, KEY_LANGUAGE }, /* sap */
{ 0x47, KEY_TV2 }, /* pip */
{ 0x4d, KEY_SCREEN },
{ 0x43, KEY_SUBTITLE },
{ 0x10, KEY_MUTE },
{ 0x49, KEY_AUDIO }, /* l/r */
{ 0x07, KEY_SLEEP },
{ 0x08, KEY_VIDEO }, /* a/v */
{ 0x0e, KEY_PREVIOUS }, /* recall */
{ 0x45, KEY_ZOOM }, /* zoom + */
{ 0x46, KEY_ANGLE }, /* zoom - */
{ 0x56, KEY_RED },
{ 0x57, KEY_GREEN },
{ 0x5c, KEY_YELLOW },
{ 0x5d, KEY_BLUE },
};
static struct rc_keymap dntv_live_dvbt_pro_map = {
.map = {
.scan = dntv_live_dvbt_pro,
.size = ARRAY_SIZE(dntv_live_dvbt_pro),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_DNTV_LIVE_DVBT_PRO,
}
};
static int __init init_rc_map_dntv_live_dvbt_pro(void)
{
return ir_register_map(&dntv_live_dvbt_pro_map);
}
static void __exit exit_rc_map_dntv_live_dvbt_pro(void)
{
ir_unregister_map(&dntv_live_dvbt_pro_map);
}
module_init(init_rc_map_dntv_live_dvbt_pro)
module_exit(exit_rc_map_dntv_live_dvbt_pro)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,69 @@
/* em-terratec.h - Keytable for em_terratec Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode em_terratec[] = {
{ 0x01, KEY_CHANNEL },
{ 0x02, KEY_SELECT },
{ 0x03, KEY_MUTE },
{ 0x04, KEY_POWER },
{ 0x05, KEY_1 },
{ 0x06, KEY_2 },
{ 0x07, KEY_3 },
{ 0x08, KEY_CHANNELUP },
{ 0x09, KEY_4 },
{ 0x0a, KEY_5 },
{ 0x0b, KEY_6 },
{ 0x0c, KEY_CHANNELDOWN },
{ 0x0d, KEY_7 },
{ 0x0e, KEY_8 },
{ 0x0f, KEY_9 },
{ 0x10, KEY_VOLUMEUP },
{ 0x11, KEY_0 },
{ 0x12, KEY_MENU },
{ 0x13, KEY_PRINT },
{ 0x14, KEY_VOLUMEDOWN },
{ 0x16, KEY_PAUSE },
{ 0x18, KEY_RECORD },
{ 0x19, KEY_REWIND },
{ 0x1a, KEY_PLAY },
{ 0x1b, KEY_FORWARD },
{ 0x1c, KEY_BACKSPACE },
{ 0x1e, KEY_STOP },
{ 0x40, KEY_ZOOM },
};
static struct rc_keymap em_terratec_map = {
.map = {
.scan = em_terratec,
.size = ARRAY_SIZE(em_terratec),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_EM_TERRATEC,
}
};
static int __init init_rc_map_em_terratec(void)
{
return ir_register_map(&em_terratec_map);
}
static void __exit exit_rc_map_em_terratec(void)
{
ir_unregister_map(&em_terratec_map);
}
module_init(init_rc_map_em_terratec)
module_exit(exit_rc_map_em_terratec)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,81 @@
/* encore-enltv-fm53.h - Keytable for encore_enltv_fm53 Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Encore ENLTV-FM v5.3
Mauro Carvalho Chehab <mchehab@infradead.org>
*/
static struct ir_scancode encore_enltv_fm53[] = {
{ 0x10, KEY_POWER2},
{ 0x06, KEY_MUTE},
{ 0x09, KEY_1},
{ 0x1d, KEY_2},
{ 0x1f, KEY_3},
{ 0x19, KEY_4},
{ 0x1b, KEY_5},
{ 0x11, KEY_6},
{ 0x17, KEY_7},
{ 0x12, KEY_8},
{ 0x16, KEY_9},
{ 0x48, KEY_0},
{ 0x04, KEY_LIST}, /* -/-- */
{ 0x40, KEY_LAST}, /* recall */
{ 0x02, KEY_MODE}, /* TV/AV */
{ 0x05, KEY_CAMERA}, /* SNAPSHOT */
{ 0x4c, KEY_CHANNELUP}, /* UP */
{ 0x00, KEY_CHANNELDOWN}, /* DOWN */
{ 0x0d, KEY_VOLUMEUP}, /* RIGHT */
{ 0x15, KEY_VOLUMEDOWN}, /* LEFT */
{ 0x49, KEY_ENTER}, /* OK */
{ 0x54, KEY_RECORD},
{ 0x4d, KEY_PLAY}, /* pause */
{ 0x1e, KEY_MENU}, /* video setting */
{ 0x0e, KEY_RIGHT}, /* <- */
{ 0x1a, KEY_LEFT}, /* -> */
{ 0x0a, KEY_CLEAR}, /* video default */
{ 0x0c, KEY_ZOOM}, /* hide pannel */
{ 0x47, KEY_SLEEP}, /* shutdown */
};
static struct rc_keymap encore_enltv_fm53_map = {
.map = {
.scan = encore_enltv_fm53,
.size = ARRAY_SIZE(encore_enltv_fm53),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_ENCORE_ENLTV_FM53,
}
};
static int __init init_rc_map_encore_enltv_fm53(void)
{
return ir_register_map(&encore_enltv_fm53_map);
}
static void __exit exit_rc_map_encore_enltv_fm53(void)
{
ir_unregister_map(&encore_enltv_fm53_map);
}
module_init(init_rc_map_encore_enltv_fm53)
module_exit(exit_rc_map_encore_enltv_fm53)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,112 @@
/* encore-enltv.h - Keytable for encore_enltv Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Encore ENLTV-FM - black plastic, white front cover with white glowing buttons
Juan Pablo Sormani <sorman@gmail.com> */
static struct ir_scancode encore_enltv[] = {
/* Power button does nothing, neither in Windows app,
although it sends data (used for BIOS wakeup?) */
{ 0x0d, KEY_MUTE },
{ 0x1e, KEY_TV },
{ 0x00, KEY_VIDEO },
{ 0x01, KEY_AUDIO }, /* music */
{ 0x02, KEY_MHP }, /* picture */
{ 0x1f, KEY_1 },
{ 0x03, KEY_2 },
{ 0x04, KEY_3 },
{ 0x05, KEY_4 },
{ 0x1c, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x1d, KEY_9 },
{ 0x0a, KEY_0 },
{ 0x09, KEY_LIST }, /* -/-- */
{ 0x0b, KEY_LAST }, /* recall */
{ 0x14, KEY_HOME }, /* win start menu */
{ 0x15, KEY_EXIT }, /* exit */
{ 0x16, KEY_CHANNELUP }, /* UP */
{ 0x12, KEY_CHANNELDOWN }, /* DOWN */
{ 0x0c, KEY_VOLUMEUP }, /* RIGHT */
{ 0x17, KEY_VOLUMEDOWN }, /* LEFT */
{ 0x18, KEY_ENTER }, /* OK */
{ 0x0e, KEY_ESC },
{ 0x13, KEY_CYCLEWINDOWS }, /* desktop */
{ 0x11, KEY_TAB },
{ 0x19, KEY_SWITCHVIDEOMODE }, /* switch */
{ 0x1a, KEY_MENU },
{ 0x1b, KEY_ZOOM }, /* fullscreen */
{ 0x44, KEY_TIME }, /* time shift */
{ 0x40, KEY_MODE }, /* source */
{ 0x5a, KEY_RECORD },
{ 0x42, KEY_PLAY }, /* play/pause */
{ 0x45, KEY_STOP },
{ 0x43, KEY_CAMERA }, /* camera icon */
{ 0x48, KEY_REWIND },
{ 0x4a, KEY_FASTFORWARD },
{ 0x49, KEY_PREVIOUS },
{ 0x4b, KEY_NEXT },
{ 0x4c, KEY_FAVORITES }, /* tv wall */
{ 0x4d, KEY_SOUND }, /* DVD sound */
{ 0x4e, KEY_LANGUAGE }, /* DVD lang */
{ 0x4f, KEY_TEXT }, /* DVD text */
{ 0x50, KEY_SLEEP }, /* shutdown */
{ 0x51, KEY_MODE }, /* stereo > main */
{ 0x52, KEY_SELECT }, /* stereo > sap */
{ 0x53, KEY_PROG1 }, /* teletext */
{ 0x59, KEY_RED }, /* AP1 */
{ 0x41, KEY_GREEN }, /* AP2 */
{ 0x47, KEY_YELLOW }, /* AP3 */
{ 0x57, KEY_BLUE }, /* AP4 */
};
static struct rc_keymap encore_enltv_map = {
.map = {
.scan = encore_enltv,
.size = ARRAY_SIZE(encore_enltv),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_ENCORE_ENLTV,
}
};
static int __init init_rc_map_encore_enltv(void)
{
return ir_register_map(&encore_enltv_map);
}
static void __exit exit_rc_map_encore_enltv(void)
{
ir_unregister_map(&encore_enltv_map);
}
module_init(init_rc_map_encore_enltv)
module_exit(exit_rc_map_encore_enltv)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,90 @@
/* encore-enltv2.h - Keytable for encore_enltv2 Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Encore ENLTV2-FM - silver plastic - "Wand Media" written at the botton
Mauro Carvalho Chehab <mchehab@infradead.org> */
static struct ir_scancode encore_enltv2[] = {
{ 0x4c, KEY_POWER2 },
{ 0x4a, KEY_TUNER },
{ 0x40, KEY_1 },
{ 0x60, KEY_2 },
{ 0x50, KEY_3 },
{ 0x70, KEY_4 },
{ 0x48, KEY_5 },
{ 0x68, KEY_6 },
{ 0x58, KEY_7 },
{ 0x78, KEY_8 },
{ 0x44, KEY_9 },
{ 0x54, KEY_0 },
{ 0x64, KEY_LAST }, /* +100 */
{ 0x4e, KEY_AGAIN }, /* Recall */
{ 0x6c, KEY_SWITCHVIDEOMODE }, /* Video Source */
{ 0x5e, KEY_MENU },
{ 0x56, KEY_SCREEN },
{ 0x7a, KEY_SETUP },
{ 0x46, KEY_MUTE },
{ 0x5c, KEY_MODE }, /* Stereo */
{ 0x74, KEY_INFO },
{ 0x7c, KEY_CLEAR },
{ 0x55, KEY_UP },
{ 0x49, KEY_DOWN },
{ 0x7e, KEY_LEFT },
{ 0x59, KEY_RIGHT },
{ 0x6a, KEY_ENTER },
{ 0x42, KEY_VOLUMEUP },
{ 0x62, KEY_VOLUMEDOWN },
{ 0x52, KEY_CHANNELUP },
{ 0x72, KEY_CHANNELDOWN },
{ 0x41, KEY_RECORD },
{ 0x51, KEY_CAMERA }, /* Snapshot */
{ 0x75, KEY_TIME }, /* Timeshift */
{ 0x71, KEY_TV2 }, /* PIP */
{ 0x45, KEY_REWIND },
{ 0x6f, KEY_PAUSE },
{ 0x7d, KEY_FORWARD },
{ 0x79, KEY_STOP },
};
static struct rc_keymap encore_enltv2_map = {
.map = {
.scan = encore_enltv2,
.size = ARRAY_SIZE(encore_enltv2),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_ENCORE_ENLTV2,
}
};
static int __init init_rc_map_encore_enltv2(void)
{
return ir_register_map(&encore_enltv2_map);
}
static void __exit exit_rc_map_encore_enltv2(void)
{
ir_unregister_map(&encore_enltv2_map);
}
module_init(init_rc_map_encore_enltv2)
module_exit(exit_rc_map_encore_enltv2)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,61 @@
/* evga-indtube.h - Keytable for evga_indtube Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* EVGA inDtube
Devin Heitmueller <devin.heitmueller@gmail.com>
*/
static struct ir_scancode evga_indtube[] = {
{ 0x12, KEY_POWER},
{ 0x02, KEY_MODE}, /* TV */
{ 0x14, KEY_MUTE},
{ 0x1a, KEY_CHANNELUP},
{ 0x16, KEY_TV2}, /* PIP */
{ 0x1d, KEY_VOLUMEUP},
{ 0x05, KEY_CHANNELDOWN},
{ 0x0f, KEY_PLAYPAUSE},
{ 0x19, KEY_VOLUMEDOWN},
{ 0x1c, KEY_REWIND},
{ 0x0d, KEY_RECORD},
{ 0x18, KEY_FORWARD},
{ 0x1e, KEY_PREVIOUS},
{ 0x1b, KEY_STOP},
{ 0x1f, KEY_NEXT},
{ 0x13, KEY_CAMERA},
};
static struct rc_keymap evga_indtube_map = {
.map = {
.scan = evga_indtube,
.size = ARRAY_SIZE(evga_indtube),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_EVGA_INDTUBE,
}
};
static int __init init_rc_map_evga_indtube(void)
{
return ir_register_map(&evga_indtube_map);
}
static void __exit exit_rc_map_evga_indtube(void)
{
ir_unregister_map(&evga_indtube_map);
}
module_init(init_rc_map_evga_indtube)
module_exit(exit_rc_map_evga_indtube)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,96 @@
/* eztv.h - Keytable for eztv Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Alfons Geser <a.geser@cox.net>
* updates from Job D. R. Borges <jobdrb@ig.com.br> */
static struct ir_scancode eztv[] = {
{ 0x12, KEY_POWER },
{ 0x01, KEY_TV }, /* DVR */
{ 0x15, KEY_DVD }, /* DVD */
{ 0x17, KEY_AUDIO }, /* music */
/* DVR mode / DVD mode / music mode */
{ 0x1b, KEY_MUTE }, /* mute */
{ 0x02, KEY_LANGUAGE }, /* MTS/SAP / audio / autoseek */
{ 0x1e, KEY_SUBTITLE }, /* closed captioning / subtitle / seek */
{ 0x16, KEY_ZOOM }, /* full screen */
{ 0x1c, KEY_VIDEO }, /* video source / eject / delall */
{ 0x1d, KEY_RESTART }, /* playback / angle / del */
{ 0x2f, KEY_SEARCH }, /* scan / menu / playlist */
{ 0x30, KEY_CHANNEL }, /* CH surfing / bookmark / memo */
{ 0x31, KEY_HELP }, /* help */
{ 0x32, KEY_MODE }, /* num/memo */
{ 0x33, KEY_ESC }, /* cancel */
{ 0x0c, KEY_UP }, /* up */
{ 0x10, KEY_DOWN }, /* down */
{ 0x08, KEY_LEFT }, /* left */
{ 0x04, KEY_RIGHT }, /* right */
{ 0x03, KEY_SELECT }, /* select */
{ 0x1f, KEY_REWIND }, /* rewind */
{ 0x20, KEY_PLAYPAUSE },/* play/pause */
{ 0x29, KEY_FORWARD }, /* forward */
{ 0x14, KEY_AGAIN }, /* repeat */
{ 0x2b, KEY_RECORD }, /* recording */
{ 0x2c, KEY_STOP }, /* stop */
{ 0x2d, KEY_PLAY }, /* play */
{ 0x2e, KEY_CAMERA }, /* snapshot / shuffle */
{ 0x00, KEY_0 },
{ 0x05, KEY_1 },
{ 0x06, KEY_2 },
{ 0x07, KEY_3 },
{ 0x09, KEY_4 },
{ 0x0a, KEY_5 },
{ 0x0b, KEY_6 },
{ 0x0d, KEY_7 },
{ 0x0e, KEY_8 },
{ 0x0f, KEY_9 },
{ 0x2a, KEY_VOLUMEUP },
{ 0x11, KEY_VOLUMEDOWN },
{ 0x18, KEY_CHANNELUP },/* CH.tracking up */
{ 0x19, KEY_CHANNELDOWN },/* CH.tracking down */
{ 0x13, KEY_ENTER }, /* enter */
{ 0x21, KEY_DOT }, /* . (decimal dot) */
};
static struct rc_keymap eztv_map = {
.map = {
.scan = eztv,
.size = ARRAY_SIZE(eztv),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_EZTV,
}
};
static int __init init_rc_map_eztv(void)
{
return ir_register_map(&eztv_map);
}
static void __exit exit_rc_map_eztv(void)
{
ir_unregister_map(&eztv_map);
}
module_init(init_rc_map_eztv)
module_exit(exit_rc_map_eztv)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,77 @@
/* flydvb.h - Keytable for flydvb Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode flydvb[] = {
{ 0x01, KEY_ZOOM }, /* Full Screen */
{ 0x00, KEY_POWER }, /* Power */
{ 0x03, KEY_1 },
{ 0x04, KEY_2 },
{ 0x05, KEY_3 },
{ 0x07, KEY_4 },
{ 0x08, KEY_5 },
{ 0x09, KEY_6 },
{ 0x0b, KEY_7 },
{ 0x0c, KEY_8 },
{ 0x0d, KEY_9 },
{ 0x06, KEY_AGAIN }, /* Recall */
{ 0x0f, KEY_0 },
{ 0x10, KEY_MUTE }, /* Mute */
{ 0x02, KEY_RADIO }, /* TV/Radio */
{ 0x1b, KEY_LANGUAGE }, /* SAP (Second Audio Program) */
{ 0x14, KEY_VOLUMEUP }, /* VOL+ */
{ 0x17, KEY_VOLUMEDOWN }, /* VOL- */
{ 0x12, KEY_CHANNELUP }, /* CH+ */
{ 0x13, KEY_CHANNELDOWN }, /* CH- */
{ 0x1d, KEY_ENTER }, /* Enter */
{ 0x1a, KEY_MODE }, /* PIP */
{ 0x18, KEY_TUNER }, /* Source */
{ 0x1e, KEY_RECORD }, /* Record/Pause */
{ 0x15, KEY_ANGLE }, /* Swap (no label on key) */
{ 0x1c, KEY_PAUSE }, /* Timeshift/Pause */
{ 0x19, KEY_BACK }, /* Rewind << */
{ 0x0a, KEY_PLAYPAUSE }, /* Play/Pause */
{ 0x1f, KEY_FORWARD }, /* Forward >> */
{ 0x16, KEY_PREVIOUS }, /* Back |<< */
{ 0x11, KEY_STOP }, /* Stop */
{ 0x0e, KEY_NEXT }, /* End >>| */
};
static struct rc_keymap flydvb_map = {
.map = {
.scan = flydvb,
.size = ARRAY_SIZE(flydvb),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_FLYDVB,
}
};
static int __init init_rc_map_flydvb(void)
{
return ir_register_map(&flydvb_map);
}
static void __exit exit_rc_map_flydvb(void)
{
ir_unregister_map(&flydvb_map);
}
module_init(init_rc_map_flydvb)
module_exit(exit_rc_map_flydvb)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,70 @@
/* flyvideo.h - Keytable for flyvideo Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode flyvideo[] = {
{ 0x0f, KEY_0 },
{ 0x03, KEY_1 },
{ 0x04, KEY_2 },
{ 0x05, KEY_3 },
{ 0x07, KEY_4 },
{ 0x08, KEY_5 },
{ 0x09, KEY_6 },
{ 0x0b, KEY_7 },
{ 0x0c, KEY_8 },
{ 0x0d, KEY_9 },
{ 0x0e, KEY_MODE }, /* Air/Cable */
{ 0x11, KEY_VIDEO }, /* Video */
{ 0x15, KEY_AUDIO }, /* Audio */
{ 0x00, KEY_POWER }, /* Power */
{ 0x18, KEY_TUNER }, /* AV Source */
{ 0x02, KEY_ZOOM }, /* Fullscreen */
{ 0x1a, KEY_LANGUAGE }, /* Stereo */
{ 0x1b, KEY_MUTE }, /* Mute */
{ 0x14, KEY_VOLUMEUP }, /* Volume + */
{ 0x17, KEY_VOLUMEDOWN },/* Volume - */
{ 0x12, KEY_CHANNELUP },/* Channel + */
{ 0x13, KEY_CHANNELDOWN },/* Channel - */
{ 0x06, KEY_AGAIN }, /* Recall */
{ 0x10, KEY_ENTER }, /* Enter */
{ 0x19, KEY_BACK }, /* Rewind ( <<< ) */
{ 0x1f, KEY_FORWARD }, /* Forward ( >>> ) */
{ 0x0a, KEY_ANGLE }, /* no label, may be used as the PAUSE button */
};
static struct rc_keymap flyvideo_map = {
.map = {
.scan = flyvideo,
.size = ARRAY_SIZE(flyvideo),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_FLYVIDEO,
}
};
static int __init init_rc_map_flyvideo(void)
{
return ir_register_map(&flyvideo_map);
}
static void __exit exit_rc_map_flyvideo(void)
{
ir_unregister_map(&flyvideo_map);
}
module_init(init_rc_map_flyvideo)
module_exit(exit_rc_map_flyvideo)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,98 @@
/* fusionhdtv-mce.h - Keytable for fusionhdtv_mce Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* DViCO FUSION HDTV MCE remote */
static struct ir_scancode fusionhdtv_mce[] = {
{ 0x0b, KEY_1 },
{ 0x17, KEY_2 },
{ 0x1b, KEY_3 },
{ 0x07, KEY_4 },
{ 0x50, KEY_5 },
{ 0x54, KEY_6 },
{ 0x48, KEY_7 },
{ 0x4c, KEY_8 },
{ 0x58, KEY_9 },
{ 0x03, KEY_0 },
{ 0x5e, KEY_OK },
{ 0x51, KEY_UP },
{ 0x53, KEY_DOWN },
{ 0x5b, KEY_LEFT },
{ 0x5f, KEY_RIGHT },
{ 0x02, KEY_TV }, /* Labeled DTV on remote */
{ 0x0e, KEY_MP3 },
{ 0x1a, KEY_DVD },
{ 0x1e, KEY_FAVORITES }, /* Labeled CPF on remote */
{ 0x16, KEY_SETUP },
{ 0x46, KEY_POWER2 }, /* TV On/Off button on remote */
{ 0x0a, KEY_EPG }, /* Labeled Guide on remote */
{ 0x49, KEY_BACK },
{ 0x59, KEY_INFO }, /* Labeled MORE on remote */
{ 0x4d, KEY_MENU }, /* Labeled DVDMENU on remote */
{ 0x55, KEY_CYCLEWINDOWS }, /* Labeled ALT-TAB on remote */
{ 0x0f, KEY_PREVIOUSSONG }, /* Labeled |<< REPLAY on remote */
{ 0x12, KEY_NEXTSONG }, /* Labeled >>| SKIP on remote */
{ 0x42, KEY_ENTER }, /* Labeled START with a green
MS windows logo on remote */
{ 0x15, KEY_VOLUMEUP },
{ 0x05, KEY_VOLUMEDOWN },
{ 0x11, KEY_CHANNELUP },
{ 0x09, KEY_CHANNELDOWN },
{ 0x52, KEY_CAMERA },
{ 0x5a, KEY_TUNER },
{ 0x19, KEY_OPEN },
{ 0x13, KEY_MODE }, /* 4:3 16:9 select */
{ 0x1f, KEY_ZOOM },
{ 0x43, KEY_REWIND },
{ 0x47, KEY_PLAYPAUSE },
{ 0x4f, KEY_FASTFORWARD },
{ 0x57, KEY_MUTE },
{ 0x0d, KEY_STOP },
{ 0x01, KEY_RECORD },
{ 0x4e, KEY_POWER },
};
static struct rc_keymap fusionhdtv_mce_map = {
.map = {
.scan = fusionhdtv_mce,
.size = ARRAY_SIZE(fusionhdtv_mce),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_FUSIONHDTV_MCE,
}
};
static int __init init_rc_map_fusionhdtv_mce(void)
{
return ir_register_map(&fusionhdtv_mce_map);
}
static void __exit exit_rc_map_fusionhdtv_mce(void)
{
ir_unregister_map(&fusionhdtv_mce_map);
}
module_init(init_rc_map_fusionhdtv_mce)
module_exit(exit_rc_map_fusionhdtv_mce)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,81 @@
/* gadmei-rm008z.h - Keytable for gadmei_rm008z Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* GADMEI UTV330+ RM008Z remote
Shine Liu <shinel@foxmail.com>
*/
static struct ir_scancode gadmei_rm008z[] = {
{ 0x14, KEY_POWER2}, /* POWER OFF */
{ 0x0c, KEY_MUTE}, /* MUTE */
{ 0x18, KEY_TV}, /* TV */
{ 0x0e, KEY_VIDEO}, /* AV */
{ 0x0b, KEY_AUDIO}, /* SV */
{ 0x0f, KEY_RADIO}, /* FM */
{ 0x00, KEY_1},
{ 0x01, KEY_2},
{ 0x02, KEY_3},
{ 0x03, KEY_4},
{ 0x04, KEY_5},
{ 0x05, KEY_6},
{ 0x06, KEY_7},
{ 0x07, KEY_8},
{ 0x08, KEY_9},
{ 0x09, KEY_0},
{ 0x0a, KEY_INFO}, /* OSD */
{ 0x1c, KEY_BACKSPACE}, /* LAST */
{ 0x0d, KEY_PLAY}, /* PLAY */
{ 0x1e, KEY_CAMERA}, /* SNAPSHOT */
{ 0x1a, KEY_RECORD}, /* RECORD */
{ 0x17, KEY_STOP}, /* STOP */
{ 0x1f, KEY_UP}, /* UP */
{ 0x44, KEY_DOWN}, /* DOWN */
{ 0x46, KEY_TAB}, /* BACK */
{ 0x4a, KEY_ZOOM}, /* FULLSECREEN */
{ 0x10, KEY_VOLUMEUP}, /* VOLUMEUP */
{ 0x11, KEY_VOLUMEDOWN}, /* VOLUMEDOWN */
{ 0x12, KEY_CHANNELUP}, /* CHANNELUP */
{ 0x13, KEY_CHANNELDOWN}, /* CHANNELDOWN */
{ 0x15, KEY_ENTER}, /* OK */
};
static struct rc_keymap gadmei_rm008z_map = {
.map = {
.scan = gadmei_rm008z,
.size = ARRAY_SIZE(gadmei_rm008z),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_GADMEI_RM008Z,
}
};
static int __init init_rc_map_gadmei_rm008z(void)
{
return ir_register_map(&gadmei_rm008z_map);
}
static void __exit exit_rc_map_gadmei_rm008z(void)
{
ir_unregister_map(&gadmei_rm008z_map);
}
module_init(init_rc_map_gadmei_rm008z)
module_exit(exit_rc_map_gadmei_rm008z)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,84 @@
/* genius-tvgo-a11mce.h - Keytable for genius_tvgo_a11mce Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/*
* Remote control for the Genius TVGO A11MCE
* Adrian Pardini <pardo.bsso@gmail.com>
*/
static struct ir_scancode genius_tvgo_a11mce[] = {
/* Keys 0 to 9 */
{ 0x48, KEY_0 },
{ 0x09, KEY_1 },
{ 0x1d, KEY_2 },
{ 0x1f, KEY_3 },
{ 0x19, KEY_4 },
{ 0x1b, KEY_5 },
{ 0x11, KEY_6 },
{ 0x17, KEY_7 },
{ 0x12, KEY_8 },
{ 0x16, KEY_9 },
{ 0x54, KEY_RECORD }, /* recording */
{ 0x06, KEY_MUTE }, /* mute */
{ 0x10, KEY_POWER },
{ 0x40, KEY_LAST }, /* recall */
{ 0x4c, KEY_CHANNELUP }, /* channel / program + */
{ 0x00, KEY_CHANNELDOWN }, /* channel / program - */
{ 0x0d, KEY_VOLUMEUP },
{ 0x15, KEY_VOLUMEDOWN },
{ 0x4d, KEY_OK }, /* also labeled as Pause */
{ 0x1c, KEY_ZOOM }, /* full screen and Stop*/
{ 0x02, KEY_MODE }, /* AV Source or Rewind*/
{ 0x04, KEY_LIST }, /* -/-- */
/* small arrows above numbers */
{ 0x1a, KEY_NEXT }, /* also Fast Forward */
{ 0x0e, KEY_PREVIOUS }, /* also Rewind */
/* these are in a rather non standard layout and have
an alternate name written */
{ 0x1e, KEY_UP }, /* Video Setting */
{ 0x0a, KEY_DOWN }, /* Video Default */
{ 0x05, KEY_CAMERA }, /* Snapshot */
{ 0x0c, KEY_RIGHT }, /* Hide Panel */
/* Four buttons without label */
{ 0x49, KEY_RED },
{ 0x0b, KEY_GREEN },
{ 0x13, KEY_YELLOW },
{ 0x50, KEY_BLUE },
};
static struct rc_keymap genius_tvgo_a11mce_map = {
.map = {
.scan = genius_tvgo_a11mce,
.size = ARRAY_SIZE(genius_tvgo_a11mce),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_GENIUS_TVGO_A11MCE,
}
};
static int __init init_rc_map_genius_tvgo_a11mce(void)
{
return ir_register_map(&genius_tvgo_a11mce_map);
}
static void __exit exit_rc_map_genius_tvgo_a11mce(void)
{
ir_unregister_map(&genius_tvgo_a11mce_map);
}
module_init(init_rc_map_genius_tvgo_a11mce)
module_exit(exit_rc_map_genius_tvgo_a11mce)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,79 @@
/* gotview7135.h - Keytable for gotview7135 Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Mike Baikov <mike@baikov.com> */
static struct ir_scancode gotview7135[] = {
{ 0x11, KEY_POWER },
{ 0x35, KEY_TV },
{ 0x1b, KEY_0 },
{ 0x29, KEY_1 },
{ 0x19, KEY_2 },
{ 0x39, KEY_3 },
{ 0x1f, KEY_4 },
{ 0x2c, KEY_5 },
{ 0x21, KEY_6 },
{ 0x24, KEY_7 },
{ 0x18, KEY_8 },
{ 0x2b, KEY_9 },
{ 0x3b, KEY_AGAIN }, /* LOOP */
{ 0x06, KEY_AUDIO },
{ 0x31, KEY_PRINT }, /* PREVIEW */
{ 0x3e, KEY_VIDEO },
{ 0x10, KEY_CHANNELUP },
{ 0x20, KEY_CHANNELDOWN },
{ 0x0c, KEY_VOLUMEDOWN },
{ 0x28, KEY_VOLUMEUP },
{ 0x08, KEY_MUTE },
{ 0x26, KEY_SEARCH }, /* SCAN */
{ 0x3f, KEY_CAMERA }, /* SNAPSHOT */
{ 0x12, KEY_RECORD },
{ 0x32, KEY_STOP },
{ 0x3c, KEY_PLAY },
{ 0x1d, KEY_REWIND },
{ 0x2d, KEY_PAUSE },
{ 0x0d, KEY_FORWARD },
{ 0x05, KEY_ZOOM }, /*FULL*/
{ 0x2a, KEY_F21 }, /* LIVE TIMESHIFT */
{ 0x0e, KEY_F22 }, /* MIN TIMESHIFT */
{ 0x1e, KEY_TIME }, /* TIMESHIFT */
{ 0x38, KEY_F24 }, /* NORMAL TIMESHIFT */
};
static struct rc_keymap gotview7135_map = {
.map = {
.scan = gotview7135,
.size = ARRAY_SIZE(gotview7135),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_GOTVIEW7135,
}
};
static int __init init_rc_map_gotview7135(void)
{
return ir_register_map(&gotview7135_map);
}
static void __exit exit_rc_map_gotview7135(void)
{
ir_unregister_map(&gotview7135_map);
}
module_init(init_rc_map_gotview7135)
module_exit(exit_rc_map_gotview7135)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,100 @@
/* hauppauge-new.h - Keytable for hauppauge_new Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Hauppauge: the newer, gray remotes (seems there are multiple
* slightly different versions), shipped with cx88+ivtv cards.
* almost rc5 coding, but some non-standard keys */
static struct ir_scancode hauppauge_new[] = {
/* Keys 0 to 9 */
{ 0x00, KEY_0 },
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
{ 0x0a, KEY_TEXT }, /* keypad asterisk as well */
{ 0x0b, KEY_RED }, /* red button */
{ 0x0c, KEY_RADIO },
{ 0x0d, KEY_MENU },
{ 0x0e, KEY_SUBTITLE }, /* also the # key */
{ 0x0f, KEY_MUTE },
{ 0x10, KEY_VOLUMEUP },
{ 0x11, KEY_VOLUMEDOWN },
{ 0x12, KEY_PREVIOUS }, /* previous channel */
{ 0x14, KEY_UP },
{ 0x15, KEY_DOWN },
{ 0x16, KEY_LEFT },
{ 0x17, KEY_RIGHT },
{ 0x18, KEY_VIDEO }, /* Videos */
{ 0x19, KEY_AUDIO }, /* Music */
/* 0x1a: Pictures - presume this means
"Multimedia Home Platform" -
no "PICTURES" key in input.h
*/
{ 0x1a, KEY_MHP },
{ 0x1b, KEY_EPG }, /* Guide */
{ 0x1c, KEY_TV },
{ 0x1e, KEY_NEXTSONG }, /* skip >| */
{ 0x1f, KEY_EXIT }, /* back/exit */
{ 0x20, KEY_CHANNELUP }, /* channel / program + */
{ 0x21, KEY_CHANNELDOWN }, /* channel / program - */
{ 0x22, KEY_CHANNEL }, /* source (old black remote) */
{ 0x24, KEY_PREVIOUSSONG }, /* replay |< */
{ 0x25, KEY_ENTER }, /* OK */
{ 0x26, KEY_SLEEP }, /* minimize (old black remote) */
{ 0x29, KEY_BLUE }, /* blue key */
{ 0x2e, KEY_GREEN }, /* green button */
{ 0x30, KEY_PAUSE }, /* pause */
{ 0x32, KEY_REWIND }, /* backward << */
{ 0x34, KEY_FASTFORWARD }, /* forward >> */
{ 0x35, KEY_PLAY },
{ 0x36, KEY_STOP },
{ 0x37, KEY_RECORD }, /* recording */
{ 0x38, KEY_YELLOW }, /* yellow key */
{ 0x3b, KEY_SELECT }, /* top right button */
{ 0x3c, KEY_ZOOM }, /* full */
{ 0x3d, KEY_POWER }, /* system power (green button) */
};
static struct rc_keymap hauppauge_new_map = {
.map = {
.scan = hauppauge_new,
.size = ARRAY_SIZE(hauppauge_new),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_HAUPPAUGE_NEW,
}
};
static int __init init_rc_map_hauppauge_new(void)
{
return ir_register_map(&hauppauge_new_map);
}
static void __exit exit_rc_map_hauppauge_new(void)
{
ir_unregister_map(&hauppauge_new_map);
}
module_init(init_rc_map_hauppauge_new)
module_exit(exit_rc_map_hauppauge_new)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,142 @@
/* rc5-imon-mce.c - Keytable for Windows Media Center RC-6 remotes for use
* with the SoundGraph iMON/Antec Veris hardware IR decoder
*
* Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* mce-mode imon mce remote key table */
static struct ir_scancode imon_mce[] = {
/* keys sorted mostly by frequency of use to optimize lookups */
{ 0x800ff415, KEY_REWIND },
{ 0x800ff414, KEY_FASTFORWARD },
{ 0x800ff41b, KEY_PREVIOUS },
{ 0x800ff41a, KEY_NEXT },
{ 0x800ff416, KEY_PLAY },
{ 0x800ff418, KEY_PAUSE },
{ 0x800ff419, KEY_STOP },
{ 0x800ff417, KEY_RECORD },
{ 0x02000052, KEY_UP },
{ 0x02000051, KEY_DOWN },
{ 0x02000050, KEY_LEFT },
{ 0x0200004f, KEY_RIGHT },
{ 0x800ff41e, KEY_UP },
{ 0x800ff41f, KEY_DOWN },
{ 0x800ff420, KEY_LEFT },
{ 0x800ff421, KEY_RIGHT },
/* 0x800ff40b also KEY_NUMERIC_POUND on some receivers */
{ 0x800ff40b, KEY_ENTER },
{ 0x02000028, KEY_ENTER },
/* the OK and Enter buttons decode to the same value on some remotes
{ 0x02000028, KEY_OK }, */
{ 0x800ff422, KEY_OK },
{ 0x0200002a, KEY_EXIT },
{ 0x800ff423, KEY_EXIT },
{ 0x02000029, KEY_DELETE },
/* 0x800ff40a also KEY_NUMERIC_STAR on some receivers */
{ 0x800ff40a, KEY_DELETE },
{ 0x800ff40e, KEY_MUTE },
{ 0x800ff410, KEY_VOLUMEUP },
{ 0x800ff411, KEY_VOLUMEDOWN },
{ 0x800ff412, KEY_CHANNELUP },
{ 0x800ff413, KEY_CHANNELDOWN },
{ 0x0200001e, KEY_NUMERIC_1 },
{ 0x0200001f, KEY_NUMERIC_2 },
{ 0x02000020, KEY_NUMERIC_3 },
{ 0x02000021, KEY_NUMERIC_4 },
{ 0x02000022, KEY_NUMERIC_5 },
{ 0x02000023, KEY_NUMERIC_6 },
{ 0x02000024, KEY_NUMERIC_7 },
{ 0x02000025, KEY_NUMERIC_8 },
{ 0x02000026, KEY_NUMERIC_9 },
{ 0x02000027, KEY_NUMERIC_0 },
{ 0x800ff401, KEY_NUMERIC_1 },
{ 0x800ff402, KEY_NUMERIC_2 },
{ 0x800ff403, KEY_NUMERIC_3 },
{ 0x800ff404, KEY_NUMERIC_4 },
{ 0x800ff405, KEY_NUMERIC_5 },
{ 0x800ff406, KEY_NUMERIC_6 },
{ 0x800ff407, KEY_NUMERIC_7 },
{ 0x800ff408, KEY_NUMERIC_8 },
{ 0x800ff409, KEY_NUMERIC_9 },
{ 0x800ff400, KEY_NUMERIC_0 },
{ 0x02200025, KEY_NUMERIC_STAR },
{ 0x02200020, KEY_NUMERIC_POUND },
/* 0x800ff41d also KEY_BLUE on some receivers */
{ 0x800ff41d, KEY_NUMERIC_STAR },
/* 0x800ff41c also KEY_PREVIOUS on some receivers */
{ 0x800ff41c, KEY_NUMERIC_POUND },
{ 0x800ff446, KEY_TV },
{ 0x800ff447, KEY_AUDIO }, /* My Music */
{ 0x800ff448, KEY_PVR }, /* RecordedTV */
{ 0x800ff449, KEY_CAMERA },
{ 0x800ff44a, KEY_VIDEO },
/* 0x800ff424 also KEY_MENU on some receivers */
{ 0x800ff424, KEY_DVD },
/* 0x800ff425 also KEY_GREEN on some receivers */
{ 0x800ff425, KEY_TUNER }, /* LiveTV */
{ 0x800ff450, KEY_RADIO },
{ 0x800ff44c, KEY_LANGUAGE },
{ 0x800ff427, KEY_ZOOM }, /* Aspect */
{ 0x800ff45b, KEY_RED },
{ 0x800ff45c, KEY_GREEN },
{ 0x800ff45d, KEY_YELLOW },
{ 0x800ff45e, KEY_BLUE },
{ 0x800ff466, KEY_RED },
/* { 0x800ff425, KEY_GREEN }, */
{ 0x800ff468, KEY_YELLOW },
/* { 0x800ff41d, KEY_BLUE }, */
{ 0x800ff40f, KEY_INFO },
{ 0x800ff426, KEY_EPG }, /* Guide */
{ 0x800ff45a, KEY_SUBTITLE }, /* Caption/Teletext */
{ 0x800ff44d, KEY_TITLE },
{ 0x800ff40c, KEY_POWER },
{ 0x800ff40d, KEY_PROG1 }, /* Windows MCE button */
};
static struct rc_keymap imon_mce_map = {
.map = {
.scan = imon_mce,
.size = ARRAY_SIZE(imon_mce),
/* its RC6, but w/a hardware decoder */
.ir_type = IR_TYPE_RC6,
.name = RC_MAP_IMON_MCE,
}
};
static int __init init_rc_map_imon_mce(void)
{
return ir_register_map(&imon_mce_map);
}
static void __exit exit_rc_map_imon_mce(void)
{
ir_unregister_map(&imon_mce_map);
}
module_init(init_rc_map_imon_mce)
module_exit(exit_rc_map_imon_mce)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");

View File

@@ -0,0 +1,156 @@
/* rc5-imon-pad.c - Keytable for SoundGraph iMON PAD and Antec Veris
* RM-200 Remote Control
*
* Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/*
* standard imon remote key table, which isn't really entirely
* "standard", as different receivers decode the same key on the
* same remote to different hex codes, and the silkscreened names
* vary a bit between the SoundGraph and Antec remotes... ugh.
*/
static struct ir_scancode imon_pad[] = {
/* keys sorted mostly by frequency of use to optimize lookups */
{ 0x2a8195b7, KEY_REWIND },
{ 0x298315b7, KEY_REWIND },
{ 0x2b8115b7, KEY_FASTFORWARD },
{ 0x2b8315b7, KEY_FASTFORWARD },
{ 0x2b9115b7, KEY_PREVIOUS },
{ 0x298195b7, KEY_NEXT },
{ 0x2a8115b7, KEY_PLAY },
{ 0x2a8315b7, KEY_PLAY },
{ 0x2a9115b7, KEY_PAUSE },
{ 0x2b9715b7, KEY_STOP },
{ 0x298115b7, KEY_RECORD },
{ 0x01008000, KEY_UP },
{ 0x01007f00, KEY_DOWN },
{ 0x01000080, KEY_LEFT },
{ 0x0100007f, KEY_RIGHT },
{ 0x2aa515b7, KEY_UP },
{ 0x289515b7, KEY_DOWN },
{ 0x29a515b7, KEY_LEFT },
{ 0x2ba515b7, KEY_RIGHT },
{ 0x0200002c, KEY_SPACE }, /* Select/Space */
{ 0x2a9315b7, KEY_SPACE }, /* Select/Space */
{ 0x02000028, KEY_ENTER },
{ 0x28a195b7, KEY_ENTER },
{ 0x288195b7, KEY_EXIT },
{ 0x02000029, KEY_ESC },
{ 0x2bb715b7, KEY_ESC },
{ 0x0200002a, KEY_BACKSPACE },
{ 0x28a115b7, KEY_BACKSPACE },
{ 0x2b9595b7, KEY_MUTE },
{ 0x28a395b7, KEY_VOLUMEUP },
{ 0x28a595b7, KEY_VOLUMEDOWN },
{ 0x289395b7, KEY_CHANNELUP },
{ 0x288795b7, KEY_CHANNELDOWN },
{ 0x0200001e, KEY_NUMERIC_1 },
{ 0x0200001f, KEY_NUMERIC_2 },
{ 0x02000020, KEY_NUMERIC_3 },
{ 0x02000021, KEY_NUMERIC_4 },
{ 0x02000022, KEY_NUMERIC_5 },
{ 0x02000023, KEY_NUMERIC_6 },
{ 0x02000024, KEY_NUMERIC_7 },
{ 0x02000025, KEY_NUMERIC_8 },
{ 0x02000026, KEY_NUMERIC_9 },
{ 0x02000027, KEY_NUMERIC_0 },
{ 0x28b595b7, KEY_NUMERIC_1 },
{ 0x2bb195b7, KEY_NUMERIC_2 },
{ 0x28b195b7, KEY_NUMERIC_3 },
{ 0x2a8595b7, KEY_NUMERIC_4 },
{ 0x299595b7, KEY_NUMERIC_5 },
{ 0x2aa595b7, KEY_NUMERIC_6 },
{ 0x2b9395b7, KEY_NUMERIC_7 },
{ 0x2a8515b7, KEY_NUMERIC_8 },
{ 0x2aa115b7, KEY_NUMERIC_9 },
{ 0x2ba595b7, KEY_NUMERIC_0 },
{ 0x02200025, KEY_NUMERIC_STAR },
{ 0x28b515b7, KEY_NUMERIC_STAR },
{ 0x02200020, KEY_NUMERIC_POUND },
{ 0x29a115b7, KEY_NUMERIC_POUND },
{ 0x2b8515b7, KEY_VIDEO },
{ 0x299195b7, KEY_AUDIO },
{ 0x2ba115b7, KEY_CAMERA },
{ 0x28a515b7, KEY_TV },
{ 0x29a395b7, KEY_DVD },
{ 0x29a295b7, KEY_DVD },
/* the Menu key between DVD and Subtitle on the RM-200... */
{ 0x2ba385b7, KEY_MENU },
{ 0x2ba395b7, KEY_MENU },
{ 0x288515b7, KEY_BOOKMARKS },
{ 0x2ab715b7, KEY_MEDIA }, /* Thumbnail */
{ 0x298595b7, KEY_SUBTITLE },
{ 0x2b8595b7, KEY_LANGUAGE },
{ 0x29a595b7, KEY_ZOOM },
{ 0x2aa395b7, KEY_SCREEN }, /* FullScreen */
{ 0x299115b7, KEY_KEYBOARD },
{ 0x299135b7, KEY_KEYBOARD },
{ 0x01010000, BTN_LEFT },
{ 0x01020000, BTN_RIGHT },
{ 0x01010080, BTN_LEFT },
{ 0x01020080, BTN_RIGHT },
{ 0x688301b7, BTN_LEFT },
{ 0x688481b7, BTN_RIGHT },
{ 0x2a9395b7, KEY_CYCLEWINDOWS }, /* TaskSwitcher */
{ 0x2b8395b7, KEY_TIME }, /* Timer */
{ 0x289115b7, KEY_POWER },
{ 0x29b195b7, KEY_EJECTCD }, /* the one next to play */
{ 0x299395b7, KEY_EJECTCLOSECD }, /* eject (by TaskSw) */
{ 0x02800000, KEY_CONTEXT_MENU }, /* Left Menu */
{ 0x2b8195b7, KEY_CONTEXT_MENU }, /* Left Menu*/
{ 0x02000065, KEY_COMPOSE }, /* RightMenu */
{ 0x28b715b7, KEY_COMPOSE }, /* RightMenu */
{ 0x2ab195b7, KEY_PROG1 }, /* Go or MultiMon */
{ 0x29b715b7, KEY_DASHBOARD }, /* AppLauncher */
};
static struct rc_keymap imon_pad_map = {
.map = {
.scan = imon_pad,
.size = ARRAY_SIZE(imon_pad),
/* actual protocol details unknown, hardware decoder */
.ir_type = IR_TYPE_OTHER,
.name = RC_MAP_IMON_PAD,
}
};
static int __init init_rc_map_imon_pad(void)
{
return ir_register_map(&imon_pad_map);
}
static void __exit exit_rc_map_imon_pad(void)
{
ir_unregister_map(&imon_pad_map);
}
module_init(init_rc_map_imon_pad)
module_exit(exit_rc_map_imon_pad)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");

View File

@@ -0,0 +1,88 @@
/* iodata-bctv7e.h - Keytable for iodata_bctv7e Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* IO-DATA BCTV7E Remote */
static struct ir_scancode iodata_bctv7e[] = {
{ 0x40, KEY_TV },
{ 0x20, KEY_RADIO }, /* FM */
{ 0x60, KEY_EPG },
{ 0x00, KEY_POWER },
/* Keys 0 to 9 */
{ 0x44, KEY_0 }, /* 10 */
{ 0x50, KEY_1 },
{ 0x30, KEY_2 },
{ 0x70, KEY_3 },
{ 0x48, KEY_4 },
{ 0x28, KEY_5 },
{ 0x68, KEY_6 },
{ 0x58, KEY_7 },
{ 0x38, KEY_8 },
{ 0x78, KEY_9 },
{ 0x10, KEY_L }, /* Live */
{ 0x08, KEY_TIME }, /* Time Shift */
{ 0x18, KEY_PLAYPAUSE }, /* Play */
{ 0x24, KEY_ENTER }, /* 11 */
{ 0x64, KEY_ESC }, /* 12 */
{ 0x04, KEY_M }, /* Multi */
{ 0x54, KEY_VIDEO },
{ 0x34, KEY_CHANNELUP },
{ 0x74, KEY_VOLUMEUP },
{ 0x14, KEY_MUTE },
{ 0x4c, KEY_VCR }, /* SVIDEO */
{ 0x2c, KEY_CHANNELDOWN },
{ 0x6c, KEY_VOLUMEDOWN },
{ 0x0c, KEY_ZOOM },
{ 0x5c, KEY_PAUSE },
{ 0x3c, KEY_RED }, /* || (red) */
{ 0x7c, KEY_RECORD }, /* recording */
{ 0x1c, KEY_STOP },
{ 0x41, KEY_REWIND }, /* backward << */
{ 0x21, KEY_PLAY },
{ 0x61, KEY_FASTFORWARD }, /* forward >> */
{ 0x01, KEY_NEXT }, /* skip >| */
};
static struct rc_keymap iodata_bctv7e_map = {
.map = {
.scan = iodata_bctv7e,
.size = ARRAY_SIZE(iodata_bctv7e),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_IODATA_BCTV7E,
}
};
static int __init init_rc_map_iodata_bctv7e(void)
{
return ir_register_map(&iodata_bctv7e_map);
}
static void __exit exit_rc_map_iodata_bctv7e(void)
{
ir_unregister_map(&iodata_bctv7e_map);
}
module_init(init_rc_map_iodata_bctv7e)
module_exit(exit_rc_map_iodata_bctv7e)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,87 @@
/* kaiomy.h - Keytable for kaiomy Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Kaiomy TVnPC U2
Mauro Carvalho Chehab <mchehab@infradead.org>
*/
static struct ir_scancode kaiomy[] = {
{ 0x43, KEY_POWER2},
{ 0x01, KEY_LIST},
{ 0x0b, KEY_ZOOM},
{ 0x03, KEY_POWER},
{ 0x04, KEY_1},
{ 0x08, KEY_2},
{ 0x02, KEY_3},
{ 0x0f, KEY_4},
{ 0x05, KEY_5},
{ 0x06, KEY_6},
{ 0x0c, KEY_7},
{ 0x0d, KEY_8},
{ 0x0a, KEY_9},
{ 0x11, KEY_0},
{ 0x09, KEY_CHANNELUP},
{ 0x07, KEY_CHANNELDOWN},
{ 0x0e, KEY_VOLUMEUP},
{ 0x13, KEY_VOLUMEDOWN},
{ 0x10, KEY_HOME},
{ 0x12, KEY_ENTER},
{ 0x14, KEY_RECORD},
{ 0x15, KEY_STOP},
{ 0x16, KEY_PLAY},
{ 0x17, KEY_MUTE},
{ 0x18, KEY_UP},
{ 0x19, KEY_DOWN},
{ 0x1a, KEY_LEFT},
{ 0x1b, KEY_RIGHT},
{ 0x1c, KEY_RED},
{ 0x1d, KEY_GREEN},
{ 0x1e, KEY_YELLOW},
{ 0x1f, KEY_BLUE},
};
static struct rc_keymap kaiomy_map = {
.map = {
.scan = kaiomy,
.size = ARRAY_SIZE(kaiomy),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_KAIOMY,
}
};
static int __init init_rc_map_kaiomy(void)
{
return ir_register_map(&kaiomy_map);
}
static void __exit exit_rc_map_kaiomy(void)
{
ir_unregister_map(&kaiomy_map);
}
module_init(init_rc_map_kaiomy)
module_exit(exit_rc_map_kaiomy)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,83 @@
/* kworld-315u.h - Keytable for kworld_315u Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Kworld 315U
*/
static struct ir_scancode kworld_315u[] = {
{ 0x6143, KEY_POWER },
{ 0x6101, KEY_TUNER }, /* source */
{ 0x610b, KEY_ZOOM },
{ 0x6103, KEY_POWER2 }, /* shutdown */
{ 0x6104, KEY_1 },
{ 0x6108, KEY_2 },
{ 0x6102, KEY_3 },
{ 0x6109, KEY_CHANNELUP },
{ 0x610f, KEY_4 },
{ 0x6105, KEY_5 },
{ 0x6106, KEY_6 },
{ 0x6107, KEY_CHANNELDOWN },
{ 0x610c, KEY_7 },
{ 0x610d, KEY_8 },
{ 0x610a, KEY_9 },
{ 0x610e, KEY_VOLUMEUP },
{ 0x6110, KEY_LAST },
{ 0x6111, KEY_0 },
{ 0x6112, KEY_ENTER },
{ 0x6113, KEY_VOLUMEDOWN },
{ 0x6114, KEY_RECORD },
{ 0x6115, KEY_STOP },
{ 0x6116, KEY_PLAY },
{ 0x6117, KEY_MUTE },
{ 0x6118, KEY_UP },
{ 0x6119, KEY_DOWN },
{ 0x611a, KEY_LEFT },
{ 0x611b, KEY_RIGHT },
{ 0x611c, KEY_RED },
{ 0x611d, KEY_GREEN },
{ 0x611e, KEY_YELLOW },
{ 0x611f, KEY_BLUE },
};
static struct rc_keymap kworld_315u_map = {
.map = {
.scan = kworld_315u,
.size = ARRAY_SIZE(kworld_315u),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_KWORLD_315U,
}
};
static int __init init_rc_map_kworld_315u(void)
{
return ir_register_map(&kworld_315u_map);
}
static void __exit exit_rc_map_kworld_315u(void)
{
ir_unregister_map(&kworld_315u_map);
}
module_init(init_rc_map_kworld_315u)
module_exit(exit_rc_map_kworld_315u)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,99 @@
/* kworld-plus-tv-analog.h - Keytable for kworld_plus_tv_analog Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Kworld Plus TV Analog Lite PCI IR
Mauro Carvalho Chehab <mchehab@infradead.org>
*/
static struct ir_scancode kworld_plus_tv_analog[] = {
{ 0x0c, KEY_PROG1 }, /* Kworld key */
{ 0x16, KEY_CLOSECD }, /* -> ) */
{ 0x1d, KEY_POWER2 },
{ 0x00, KEY_1 },
{ 0x01, KEY_2 },
{ 0x02, KEY_3 }, /* Two keys have the same code: 3 and left */
{ 0x03, KEY_4 }, /* Two keys have the same code: 3 and right */
{ 0x04, KEY_5 },
{ 0x05, KEY_6 },
{ 0x06, KEY_7 },
{ 0x07, KEY_8 },
{ 0x08, KEY_9 },
{ 0x0a, KEY_0 },
{ 0x09, KEY_AGAIN },
{ 0x14, KEY_MUTE },
{ 0x20, KEY_UP },
{ 0x21, KEY_DOWN },
{ 0x0b, KEY_ENTER },
{ 0x10, KEY_CHANNELUP },
{ 0x11, KEY_CHANNELDOWN },
/* Couldn't map key left/key right since those
conflict with '3' and '4' scancodes
I dunno what the original driver does
*/
{ 0x13, KEY_VOLUMEUP },
{ 0x12, KEY_VOLUMEDOWN },
/* The lower part of the IR
There are several duplicated keycodes there.
Most of them conflict with digits.
Add mappings just to the unused scancodes.
Somehow, the original driver has a way to know,
but this doesn't seem to be on some GPIO.
Also, it is not related to the time between keyup
and keydown.
*/
{ 0x19, KEY_TIME}, /* Timeshift */
{ 0x1a, KEY_STOP},
{ 0x1b, KEY_RECORD},
{ 0x22, KEY_TEXT},
{ 0x15, KEY_AUDIO}, /* ((*)) */
{ 0x0f, KEY_ZOOM},
{ 0x1c, KEY_CAMERA}, /* snapshot */
{ 0x18, KEY_RED}, /* B */
{ 0x23, KEY_GREEN}, /* C */
};
static struct rc_keymap kworld_plus_tv_analog_map = {
.map = {
.scan = kworld_plus_tv_analog,
.size = ARRAY_SIZE(kworld_plus_tv_analog),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_KWORLD_PLUS_TV_ANALOG,
}
};
static int __init init_rc_map_kworld_plus_tv_analog(void)
{
return ir_register_map(&kworld_plus_tv_analog_map);
}
static void __exit exit_rc_map_kworld_plus_tv_analog(void)
{
ir_unregister_map(&kworld_plus_tv_analog_map);
}
module_init(init_rc_map_kworld_plus_tv_analog)
module_exit(exit_rc_map_kworld_plus_tv_analog)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,99 @@
/*
* LeadTek Y04G0051 remote controller keytable
*
* Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <media/rc-map.h>
static struct ir_scancode leadtek_y04g0051[] = {
{ 0x0300, KEY_POWER2 },
{ 0x0303, KEY_SCREEN },
{ 0x0304, KEY_RIGHT },
{ 0x0305, KEY_1 },
{ 0x0306, KEY_2 },
{ 0x0307, KEY_3 },
{ 0x0308, KEY_LEFT },
{ 0x0309, KEY_4 },
{ 0x030a, KEY_5 },
{ 0x030b, KEY_6 },
{ 0x030c, KEY_UP },
{ 0x030d, KEY_7 },
{ 0x030e, KEY_8 },
{ 0x030f, KEY_9 },
{ 0x0310, KEY_DOWN },
{ 0x0311, KEY_AGAIN },
{ 0x0312, KEY_0 },
{ 0x0313, KEY_OK }, /* 1st ok */
{ 0x0314, KEY_MUTE },
{ 0x0316, KEY_OK }, /* 2nd ok */
{ 0x031e, KEY_VIDEO }, /* 2nd video */
{ 0x031b, KEY_AUDIO },
{ 0x031f, KEY_TEXT },
{ 0x0340, KEY_SLEEP },
{ 0x0341, KEY_DOT },
{ 0x0342, KEY_REWIND },
{ 0x0343, KEY_PLAY },
{ 0x0344, KEY_FASTFORWARD },
{ 0x0345, KEY_TIME },
{ 0x0346, KEY_STOP }, /* 2nd stop */
{ 0x0347, KEY_RECORD },
{ 0x0348, KEY_CAMERA },
{ 0x0349, KEY_ESC },
{ 0x034a, KEY_NEW },
{ 0x034b, KEY_RED },
{ 0x034c, KEY_GREEN },
{ 0x034d, KEY_YELLOW },
{ 0x034e, KEY_BLUE },
{ 0x034f, KEY_MENU },
{ 0x0350, KEY_STOP }, /* 1st stop */
{ 0x0351, KEY_CHANNEL },
{ 0x0352, KEY_VIDEO }, /* 1st video */
{ 0x0353, KEY_EPG },
{ 0x0354, KEY_PREVIOUS },
{ 0x0355, KEY_NEXT },
{ 0x0356, KEY_TV },
{ 0x035a, KEY_VOLUMEDOWN },
{ 0x035b, KEY_CHANNELUP },
{ 0x035e, KEY_VOLUMEUP },
{ 0x035f, KEY_CHANNELDOWN },
};
static struct rc_keymap leadtek_y04g0051_map = {
.map = {
.scan = leadtek_y04g0051,
.size = ARRAY_SIZE(leadtek_y04g0051),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_LEADTEK_Y04G0051,
}
};
static int __init init_rc_map_leadtek_y04g0051(void)
{
return ir_register_map(&leadtek_y04g0051_map);
}
static void __exit exit_rc_map_leadtek_y04g0051(void)
{
ir_unregister_map(&leadtek_y04g0051_map);
}
module_init(init_rc_map_leadtek_y04g0051)
module_exit(exit_rc_map_leadtek_y04g0051)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");

View File

@@ -0,0 +1,41 @@
/* rc-lirc.c - Empty dummy keytable, for use when its preferred to pass
* all raw IR data to the lirc userspace decoder.
*
* Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/ir-core.h>
static struct ir_scancode lirc[] = {
{ },
};
static struct rc_keymap lirc_map = {
.map = {
.scan = lirc,
.size = ARRAY_SIZE(lirc),
.ir_type = IR_TYPE_LIRC,
.name = RC_MAP_LIRC,
}
};
static int __init init_rc_map_lirc(void)
{
return ir_register_map(&lirc_map);
}
static void __exit exit_rc_map_lirc(void)
{
ir_unregister_map(&lirc_map);
}
module_init(init_rc_map_lirc)
module_exit(exit_rc_map_lirc)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");

View File

@@ -0,0 +1,68 @@
/* LME2510 remote control
*
*
* Copyright (C) 2010 Malcolm Priestley (tvboxspy@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode lme2510_rc[] = {
{ 0xba45, KEY_0 },
{ 0xa05f, KEY_1 },
{ 0xaf50, KEY_2 },
{ 0xa25d, KEY_3 },
{ 0xbe41, KEY_4 },
{ 0xf50a, KEY_5 },
{ 0xbd42, KEY_6 },
{ 0xb847, KEY_7 },
{ 0xb649, KEY_8 },
{ 0xfa05, KEY_9 },
{ 0xbc43, KEY_POWER },
{ 0xb946, KEY_SUBTITLE },
{ 0xf906, KEY_PAUSE },
{ 0xfc03, KEY_MEDIA_REPEAT},
{ 0xfd02, KEY_PAUSE },
{ 0xa15e, KEY_VOLUMEUP },
{ 0xa35c, KEY_VOLUMEDOWN },
{ 0xf609, KEY_CHANNELUP },
{ 0xe51a, KEY_CHANNELDOWN },
{ 0xe11e, KEY_PLAY },
{ 0xe41b, KEY_ZOOM },
{ 0xa659, KEY_MUTE },
{ 0xa55a, KEY_TV },
{ 0xe718, KEY_RECORD },
{ 0xf807, KEY_EPG },
{ 0xfe01, KEY_STOP },
};
static struct rc_keymap lme2510_map = {
.map = {
.scan = lme2510_rc,
.size = ARRAY_SIZE(lme2510_rc),
.ir_type = IR_TYPE_UNKNOWN,
.name = RC_MAP_LME2510,
}
};
static int __init init_rc_lme2510_map(void)
{
return ir_register_map(&lme2510_map);
}
static void __exit exit_rc_lme2510_map(void)
{
ir_unregister_map(&lme2510_map);
}
module_init(init_rc_lme2510_map)
module_exit(exit_rc_lme2510_map)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com");

View File

@@ -0,0 +1,134 @@
/* manli.h - Keytable for manli Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Michael Tokarev <mjt@tls.msk.ru>
keytable is used by MANLI MTV00[0x0c] and BeholdTV 40[13] at
least, and probably other cards too.
The "ascii-art picture" below (in comments, first row
is the keycode in hex, and subsequent row(s) shows
the button labels (several variants when appropriate)
helps to descide which keycodes to assign to the buttons.
*/
static struct ir_scancode manli[] = {
/* 0x1c 0x12 *
* FUNCTION POWER *
* FM (|) *
* */
{ 0x1c, KEY_RADIO }, /*XXX*/
{ 0x12, KEY_POWER },
/* 0x01 0x02 0x03 *
* 1 2 3 *
* *
* 0x04 0x05 0x06 *
* 4 5 6 *
* *
* 0x07 0x08 0x09 *
* 7 8 9 *
* */
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
/* 0x0a 0x00 0x17 *
* RECALL 0 +100 *
* PLUS *
* */
{ 0x0a, KEY_AGAIN }, /*XXX KEY_REWIND? */
{ 0x00, KEY_0 },
{ 0x17, KEY_DIGITS }, /*XXX*/
/* 0x14 0x10 *
* MENU INFO *
* OSD */
{ 0x14, KEY_MENU },
{ 0x10, KEY_INFO },
/* 0x0b *
* Up *
* *
* 0x18 0x16 0x0c *
* Left Ok Right *
* *
* 0x015 *
* Down *
* */
{ 0x0b, KEY_UP },
{ 0x18, KEY_LEFT },
{ 0x16, KEY_OK }, /*XXX KEY_SELECT? KEY_ENTER? */
{ 0x0c, KEY_RIGHT },
{ 0x15, KEY_DOWN },
/* 0x11 0x0d *
* TV/AV MODE *
* SOURCE STEREO *
* */
{ 0x11, KEY_TV }, /*XXX*/
{ 0x0d, KEY_MODE }, /*XXX there's no KEY_STEREO */
/* 0x0f 0x1b 0x1a *
* AUDIO Vol+ Chan+ *
* TIMESHIFT??? *
* *
* 0x0e 0x1f 0x1e *
* SLEEP Vol- Chan- *
* */
{ 0x0f, KEY_AUDIO },
{ 0x1b, KEY_VOLUMEUP },
{ 0x1a, KEY_CHANNELUP },
{ 0x0e, KEY_TIME },
{ 0x1f, KEY_VOLUMEDOWN },
{ 0x1e, KEY_CHANNELDOWN },
/* 0x13 0x19 *
* MUTE SNAPSHOT*
* */
{ 0x13, KEY_MUTE },
{ 0x19, KEY_CAMERA },
/* 0x1d unused ? */
};
static struct rc_keymap manli_map = {
.map = {
.scan = manli,
.size = ARRAY_SIZE(manli),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_MANLI,
}
};
static int __init init_rc_map_manli(void)
{
return ir_register_map(&manli_map);
}
static void __exit exit_rc_map_manli(void)
{
ir_unregister_map(&manli_map);
}
module_init(init_rc_map_manli)
module_exit(exit_rc_map_manli)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,67 @@
/*
* MSI DIGIVOX mini II remote controller keytable
*
* Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <media/rc-map.h>
static struct ir_scancode msi_digivox_ii[] = {
{ 0x0002, KEY_2 },
{ 0x0003, KEY_UP }, /* up */
{ 0x0004, KEY_3 },
{ 0x0005, KEY_CHANNELDOWN },
{ 0x0008, KEY_5 },
{ 0x0009, KEY_0 },
{ 0x000b, KEY_8 },
{ 0x000d, KEY_DOWN }, /* down */
{ 0x0010, KEY_9 },
{ 0x0011, KEY_7 },
{ 0x0014, KEY_VOLUMEUP },
{ 0x0015, KEY_CHANNELUP },
{ 0x0016, KEY_OK },
{ 0x0017, KEY_POWER2 },
{ 0x001a, KEY_1 },
{ 0x001c, KEY_4 },
{ 0x001d, KEY_6 },
{ 0x001f, KEY_VOLUMEDOWN },
};
static struct rc_keymap msi_digivox_ii_map = {
.map = {
.scan = msi_digivox_ii,
.size = ARRAY_SIZE(msi_digivox_ii),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_MSI_DIGIVOX_II,
}
};
static int __init init_rc_map_msi_digivox_ii(void)
{
return ir_register_map(&msi_digivox_ii_map);
}
static void __exit exit_rc_map_msi_digivox_ii(void)
{
ir_unregister_map(&msi_digivox_ii_map);
}
module_init(init_rc_map_msi_digivox_ii)
module_exit(exit_rc_map_msi_digivox_ii)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");

View File

@@ -0,0 +1,85 @@
/*
* MSI DIGIVOX mini III remote controller keytable
*
* Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <media/rc-map.h>
/* MSI DIGIVOX mini III */
/* Uses NEC extended 0x61d6. */
/* This remote seems to be same as rc-kworld-315u.c. Anyhow, add new remote
since rc-kworld-315u.c lacks NEC extended address byte. */
static struct ir_scancode msi_digivox_iii[] = {
{ 0x61d601, KEY_VIDEO }, /* Source */
{ 0x61d602, KEY_3 },
{ 0x61d603, KEY_POWER }, /* ShutDown */
{ 0x61d604, KEY_1 },
{ 0x61d605, KEY_5 },
{ 0x61d606, KEY_6 },
{ 0x61d607, KEY_CHANNELDOWN }, /* CH- */
{ 0x61d608, KEY_2 },
{ 0x61d609, KEY_CHANNELUP }, /* CH+ */
{ 0x61d60a, KEY_9 },
{ 0x61d60b, KEY_ZOOM }, /* Zoom */
{ 0x61d60c, KEY_7 },
{ 0x61d60d, KEY_8 },
{ 0x61d60e, KEY_VOLUMEUP }, /* Vol+ */
{ 0x61d60f, KEY_4 },
{ 0x61d610, KEY_ESC }, /* [back up arrow] */
{ 0x61d611, KEY_0 },
{ 0x61d612, KEY_OK }, /* [enter arrow] */
{ 0x61d613, KEY_VOLUMEDOWN }, /* Vol- */
{ 0x61d614, KEY_RECORD }, /* Rec */
{ 0x61d615, KEY_STOP }, /* Stop */
{ 0x61d616, KEY_PLAY }, /* Play */
{ 0x61d617, KEY_MUTE }, /* Mute */
{ 0x61d618, KEY_UP },
{ 0x61d619, KEY_DOWN },
{ 0x61d61a, KEY_LEFT },
{ 0x61d61b, KEY_RIGHT },
{ 0x61d61c, KEY_RED },
{ 0x61d61d, KEY_GREEN },
{ 0x61d61e, KEY_YELLOW },
{ 0x61d61f, KEY_BLUE },
{ 0x61d643, KEY_POWER2 }, /* [red power button] */
};
static struct rc_keymap msi_digivox_iii_map = {
.map = {
.scan = msi_digivox_iii,
.size = ARRAY_SIZE(msi_digivox_iii),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_MSI_DIGIVOX_III,
}
};
static int __init init_rc_map_msi_digivox_iii(void)
{
return ir_register_map(&msi_digivox_iii_map);
}
static void __exit exit_rc_map_msi_digivox_iii(void)
{
ir_unregister_map(&msi_digivox_iii_map);
}
module_init(init_rc_map_msi_digivox_iii)
module_exit(exit_rc_map_msi_digivox_iii)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");

View File

@@ -0,0 +1,123 @@
/* msi-tvanywhere-plus.h - Keytable for msi_tvanywhere_plus Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/*
Keycodes for remote on the MSI TV@nywhere Plus. The controller IC on the card
is marked "KS003". The controller is I2C at address 0x30, but does not seem
to respond to probes until a read is performed from a valid device.
I don't know why...
Note: This remote may be of similar or identical design to the
Pixelview remote (?). The raw codes and duplicate button codes
appear to be the same.
Henry Wong <henry@stuffedcow.net>
Some changes to formatting and keycodes by Mark Schultz <n9xmj@yahoo.com>
*/
static struct ir_scancode msi_tvanywhere_plus[] = {
/* ---- Remote Button Layout ----
POWER SOURCE SCAN MUTE
TV/FM 1 2 3
|> 4 5 6
<| 7 8 9
^^UP 0 + RECALL
vvDN RECORD STOP PLAY
MINIMIZE ZOOM
CH+
VOL- VOL+
CH-
SNAPSHOT MTS
<< FUNC >> RESET
*/
{ 0x01, KEY_1 }, /* 1 */
{ 0x0b, KEY_2 }, /* 2 */
{ 0x1b, KEY_3 }, /* 3 */
{ 0x05, KEY_4 }, /* 4 */
{ 0x09, KEY_5 }, /* 5 */
{ 0x15, KEY_6 }, /* 6 */
{ 0x06, KEY_7 }, /* 7 */
{ 0x0a, KEY_8 }, /* 8 */
{ 0x12, KEY_9 }, /* 9 */
{ 0x02, KEY_0 }, /* 0 */
{ 0x10, KEY_KPPLUS }, /* + */
{ 0x13, KEY_AGAIN }, /* Recall */
{ 0x1e, KEY_POWER }, /* Power */
{ 0x07, KEY_TUNER }, /* Source */
{ 0x1c, KEY_SEARCH }, /* Scan */
{ 0x18, KEY_MUTE }, /* Mute */
{ 0x03, KEY_RADIO }, /* TV/FM */
/* The next four keys are duplicates that appear to send the
same IR code as Ch+, Ch-, >>, and << . The raw code assigned
to them is the actual code + 0x20 - they will never be
detected as such unless some way is discovered to distinguish
these buttons from those that have the same code. */
{ 0x3f, KEY_RIGHT }, /* |> and Ch+ */
{ 0x37, KEY_LEFT }, /* <| and Ch- */
{ 0x2c, KEY_UP }, /* ^^Up and >> */
{ 0x24, KEY_DOWN }, /* vvDn and << */
{ 0x00, KEY_RECORD }, /* Record */
{ 0x08, KEY_STOP }, /* Stop */
{ 0x11, KEY_PLAY }, /* Play */
{ 0x0f, KEY_CLOSE }, /* Minimize */
{ 0x19, KEY_ZOOM }, /* Zoom */
{ 0x1a, KEY_CAMERA }, /* Snapshot */
{ 0x0d, KEY_LANGUAGE }, /* MTS */
{ 0x14, KEY_VOLUMEDOWN }, /* Vol- */
{ 0x16, KEY_VOLUMEUP }, /* Vol+ */
{ 0x17, KEY_CHANNELDOWN }, /* Ch- */
{ 0x1f, KEY_CHANNELUP }, /* Ch+ */
{ 0x04, KEY_REWIND }, /* << */
{ 0x0e, KEY_MENU }, /* Function */
{ 0x0c, KEY_FASTFORWARD }, /* >> */
{ 0x1d, KEY_RESTART }, /* Reset */
};
static struct rc_keymap msi_tvanywhere_plus_map = {
.map = {
.scan = msi_tvanywhere_plus,
.size = ARRAY_SIZE(msi_tvanywhere_plus),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_MSI_TVANYWHERE_PLUS,
}
};
static int __init init_rc_map_msi_tvanywhere_plus(void)
{
return ir_register_map(&msi_tvanywhere_plus_map);
}
static void __exit exit_rc_map_msi_tvanywhere_plus(void)
{
ir_unregister_map(&msi_tvanywhere_plus_map);
}
module_init(init_rc_map_msi_tvanywhere_plus)
module_exit(exit_rc_map_msi_tvanywhere_plus)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,69 @@
/* msi-tvanywhere.h - Keytable for msi_tvanywhere Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* MSI TV@nywhere MASTER remote */
static struct ir_scancode msi_tvanywhere[] = {
/* Keys 0 to 9 */
{ 0x00, KEY_0 },
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
{ 0x0c, KEY_MUTE },
{ 0x0f, KEY_SCREEN }, /* Full Screen */
{ 0x10, KEY_FN }, /* Funtion */
{ 0x11, KEY_TIME }, /* Time shift */
{ 0x12, KEY_POWER },
{ 0x13, KEY_MEDIA }, /* MTS */
{ 0x14, KEY_SLOW },
{ 0x16, KEY_REWIND }, /* backward << */
{ 0x17, KEY_ENTER }, /* Return */
{ 0x18, KEY_FASTFORWARD }, /* forward >> */
{ 0x1a, KEY_CHANNELUP },
{ 0x1b, KEY_VOLUMEUP },
{ 0x1e, KEY_CHANNELDOWN },
{ 0x1f, KEY_VOLUMEDOWN },
};
static struct rc_keymap msi_tvanywhere_map = {
.map = {
.scan = msi_tvanywhere,
.size = ARRAY_SIZE(msi_tvanywhere),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_MSI_TVANYWHERE,
}
};
static int __init init_rc_map_msi_tvanywhere(void)
{
return ir_register_map(&msi_tvanywhere_map);
}
static void __exit exit_rc_map_msi_tvanywhere(void)
{
ir_unregister_map(&msi_tvanywhere_map);
}
module_init(init_rc_map_msi_tvanywhere)
module_exit(exit_rc_map_msi_tvanywhere)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,96 @@
/* nebula.h - Keytable for nebula Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode nebula[] = {
{ 0x00, KEY_0 },
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
{ 0x0a, KEY_TV },
{ 0x0b, KEY_AUX },
{ 0x0c, KEY_DVD },
{ 0x0d, KEY_POWER },
{ 0x0e, KEY_MHP }, /* labelled 'Picture' */
{ 0x0f, KEY_AUDIO },
{ 0x10, KEY_INFO },
{ 0x11, KEY_F13 }, /* 16:9 */
{ 0x12, KEY_F14 }, /* 14:9 */
{ 0x13, KEY_EPG },
{ 0x14, KEY_EXIT },
{ 0x15, KEY_MENU },
{ 0x16, KEY_UP },
{ 0x17, KEY_DOWN },
{ 0x18, KEY_LEFT },
{ 0x19, KEY_RIGHT },
{ 0x1a, KEY_ENTER },
{ 0x1b, KEY_CHANNELUP },
{ 0x1c, KEY_CHANNELDOWN },
{ 0x1d, KEY_VOLUMEUP },
{ 0x1e, KEY_VOLUMEDOWN },
{ 0x1f, KEY_RED },
{ 0x20, KEY_GREEN },
{ 0x21, KEY_YELLOW },
{ 0x22, KEY_BLUE },
{ 0x23, KEY_SUBTITLE },
{ 0x24, KEY_F15 }, /* AD */
{ 0x25, KEY_TEXT },
{ 0x26, KEY_MUTE },
{ 0x27, KEY_REWIND },
{ 0x28, KEY_STOP },
{ 0x29, KEY_PLAY },
{ 0x2a, KEY_FASTFORWARD },
{ 0x2b, KEY_F16 }, /* chapter */
{ 0x2c, KEY_PAUSE },
{ 0x2d, KEY_PLAY },
{ 0x2e, KEY_RECORD },
{ 0x2f, KEY_F17 }, /* picture in picture */
{ 0x30, KEY_KPPLUS }, /* zoom in */
{ 0x31, KEY_KPMINUS }, /* zoom out */
{ 0x32, KEY_F18 }, /* capture */
{ 0x33, KEY_F19 }, /* web */
{ 0x34, KEY_EMAIL },
{ 0x35, KEY_PHONE },
{ 0x36, KEY_PC },
};
static struct rc_keymap nebula_map = {
.map = {
.scan = nebula,
.size = ARRAY_SIZE(nebula),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_NEBULA,
}
};
static int __init init_rc_map_nebula(void)
{
return ir_register_map(&nebula_map);
}
static void __exit exit_rc_map_nebula(void)
{
ir_unregister_map(&nebula_map);
}
module_init(init_rc_map_nebula)
module_exit(exit_rc_map_nebula)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,105 @@
/* nec-terratec-cinergy-xs.h - Keytable for nec_terratec_cinergy_xs Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Terratec Cinergy Hybrid T USB XS FM
Mauro Carvalho Chehab <mchehab@redhat.com>
*/
static struct ir_scancode nec_terratec_cinergy_xs[] = {
{ 0x1441, KEY_HOME},
{ 0x1401, KEY_POWER2},
{ 0x1442, KEY_MENU}, /* DVD menu */
{ 0x1443, KEY_SUBTITLE},
{ 0x1444, KEY_TEXT}, /* Teletext */
{ 0x1445, KEY_DELETE},
{ 0x1402, KEY_1},
{ 0x1403, KEY_2},
{ 0x1404, KEY_3},
{ 0x1405, KEY_4},
{ 0x1406, KEY_5},
{ 0x1407, KEY_6},
{ 0x1408, KEY_7},
{ 0x1409, KEY_8},
{ 0x140a, KEY_9},
{ 0x140c, KEY_0},
{ 0x140b, KEY_TUNER}, /* AV */
{ 0x140d, KEY_MODE}, /* A.B */
{ 0x1446, KEY_TV},
{ 0x1447, KEY_DVD},
{ 0x1449, KEY_VIDEO},
{ 0x144a, KEY_RADIO}, /* Music */
{ 0x144b, KEY_CAMERA}, /* PIC */
{ 0x1410, KEY_UP},
{ 0x1411, KEY_LEFT},
{ 0x1412, KEY_OK},
{ 0x1413, KEY_RIGHT},
{ 0x1414, KEY_DOWN},
{ 0x140f, KEY_EPG},
{ 0x1416, KEY_INFO},
{ 0x144d, KEY_BACKSPACE},
{ 0x141c, KEY_VOLUMEUP},
{ 0x141e, KEY_VOLUMEDOWN},
{ 0x144c, KEY_PLAY},
{ 0x141d, KEY_MUTE},
{ 0x141b, KEY_CHANNELUP},
{ 0x141f, KEY_CHANNELDOWN},
{ 0x1417, KEY_RED},
{ 0x1418, KEY_GREEN},
{ 0x1419, KEY_YELLOW},
{ 0x141a, KEY_BLUE},
{ 0x1458, KEY_RECORD},
{ 0x1448, KEY_STOP},
{ 0x1440, KEY_PAUSE},
{ 0x1454, KEY_LAST},
{ 0x144e, KEY_REWIND},
{ 0x144f, KEY_FASTFORWARD},
{ 0x145c, KEY_NEXT},
};
static struct rc_keymap nec_terratec_cinergy_xs_map = {
.map = {
.scan = nec_terratec_cinergy_xs,
.size = ARRAY_SIZE(nec_terratec_cinergy_xs),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_NEC_TERRATEC_CINERGY_XS,
}
};
static int __init init_rc_map_nec_terratec_cinergy_xs(void)
{
return ir_register_map(&nec_terratec_cinergy_xs_map);
}
static void __exit exit_rc_map_nec_terratec_cinergy_xs(void)
{
ir_unregister_map(&nec_terratec_cinergy_xs_map);
}
module_init(init_rc_map_nec_terratec_cinergy_xs)
module_exit(exit_rc_map_nec_terratec_cinergy_xs)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,85 @@
/* norwood.h - Keytable for norwood Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Norwood Micro (non-Pro) TV Tuner
By Peter Naulls <peter@chocky.org>
Key comments are the functions given in the manual */
static struct ir_scancode norwood[] = {
/* Keys 0 to 9 */
{ 0x20, KEY_0 },
{ 0x21, KEY_1 },
{ 0x22, KEY_2 },
{ 0x23, KEY_3 },
{ 0x24, KEY_4 },
{ 0x25, KEY_5 },
{ 0x26, KEY_6 },
{ 0x27, KEY_7 },
{ 0x28, KEY_8 },
{ 0x29, KEY_9 },
{ 0x78, KEY_TUNER }, /* Video Source */
{ 0x2c, KEY_EXIT }, /* Open/Close software */
{ 0x2a, KEY_SELECT }, /* 2 Digit Select */
{ 0x69, KEY_AGAIN }, /* Recall */
{ 0x32, KEY_BRIGHTNESSUP }, /* Brightness increase */
{ 0x33, KEY_BRIGHTNESSDOWN }, /* Brightness decrease */
{ 0x6b, KEY_KPPLUS }, /* (not named >>>>>) */
{ 0x6c, KEY_KPMINUS }, /* (not named <<<<<) */
{ 0x2d, KEY_MUTE }, /* Mute */
{ 0x30, KEY_VOLUMEUP }, /* Volume up */
{ 0x31, KEY_VOLUMEDOWN }, /* Volume down */
{ 0x60, KEY_CHANNELUP }, /* Channel up */
{ 0x61, KEY_CHANNELDOWN }, /* Channel down */
{ 0x3f, KEY_RECORD }, /* Record */
{ 0x37, KEY_PLAY }, /* Play */
{ 0x36, KEY_PAUSE }, /* Pause */
{ 0x2b, KEY_STOP }, /* Stop */
{ 0x67, KEY_FASTFORWARD }, /* Foward */
{ 0x66, KEY_REWIND }, /* Rewind */
{ 0x3e, KEY_SEARCH }, /* Auto Scan */
{ 0x2e, KEY_CAMERA }, /* Capture Video */
{ 0x6d, KEY_MENU }, /* Show/Hide Control */
{ 0x2f, KEY_ZOOM }, /* Full Screen */
{ 0x34, KEY_RADIO }, /* FM */
{ 0x65, KEY_POWER }, /* Computer power */
};
static struct rc_keymap norwood_map = {
.map = {
.scan = norwood,
.size = ARRAY_SIZE(norwood),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_NORWOOD,
}
};
static int __init init_rc_map_norwood(void)
{
return ir_register_map(&norwood_map);
}
static void __exit exit_rc_map_norwood(void)
{
ir_unregister_map(&norwood_map);
}
module_init(init_rc_map_norwood)
module_exit(exit_rc_map_norwood)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,80 @@
/* npgtech.h - Keytable for npgtech Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode npgtech[] = {
{ 0x1d, KEY_SWITCHVIDEOMODE }, /* switch inputs */
{ 0x2a, KEY_FRONT },
{ 0x3e, KEY_1 },
{ 0x02, KEY_2 },
{ 0x06, KEY_3 },
{ 0x0a, KEY_4 },
{ 0x0e, KEY_5 },
{ 0x12, KEY_6 },
{ 0x16, KEY_7 },
{ 0x1a, KEY_8 },
{ 0x1e, KEY_9 },
{ 0x3a, KEY_0 },
{ 0x22, KEY_NUMLOCK }, /* -/-- */
{ 0x20, KEY_REFRESH },
{ 0x03, KEY_BRIGHTNESSDOWN },
{ 0x28, KEY_AUDIO },
{ 0x3c, KEY_CHANNELUP },
{ 0x3f, KEY_VOLUMEDOWN },
{ 0x2e, KEY_MUTE },
{ 0x3b, KEY_VOLUMEUP },
{ 0x00, KEY_CHANNELDOWN },
{ 0x07, KEY_BRIGHTNESSUP },
{ 0x2c, KEY_TEXT },
{ 0x37, KEY_RECORD },
{ 0x17, KEY_PLAY },
{ 0x13, KEY_PAUSE },
{ 0x26, KEY_STOP },
{ 0x18, KEY_FASTFORWARD },
{ 0x14, KEY_REWIND },
{ 0x33, KEY_ZOOM },
{ 0x32, KEY_KEYBOARD },
{ 0x30, KEY_GOTO }, /* Pointing arrow */
{ 0x36, KEY_MACRO }, /* Maximize/Minimize (yellow) */
{ 0x0b, KEY_RADIO },
{ 0x10, KEY_POWER },
};
static struct rc_keymap npgtech_map = {
.map = {
.scan = npgtech,
.size = ARRAY_SIZE(npgtech),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_NPGTECH,
}
};
static int __init init_rc_map_npgtech(void)
{
return ir_register_map(&npgtech_map);
}
static void __exit exit_rc_map_npgtech(void)
{
ir_unregister_map(&npgtech_map);
}
module_init(init_rc_map_npgtech)
module_exit(exit_rc_map_npgtech)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,80 @@
/* pctv-sedna.h - Keytable for pctv_sedna Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Mapping for the 28 key remote control as seen at
http://www.sednacomputer.com/photo/cardbus-tv.jpg
Pavel Mihaylov <bin@bash.info>
Also for the remote bundled with Kozumi KTV-01C card */
static struct ir_scancode pctv_sedna[] = {
{ 0x00, KEY_0 },
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
{ 0x0a, KEY_AGAIN }, /* Recall */
{ 0x0b, KEY_CHANNELUP },
{ 0x0c, KEY_VOLUMEUP },
{ 0x0d, KEY_MODE }, /* Stereo */
{ 0x0e, KEY_STOP },
{ 0x0f, KEY_PREVIOUSSONG },
{ 0x10, KEY_ZOOM },
{ 0x11, KEY_TUNER }, /* Source */
{ 0x12, KEY_POWER },
{ 0x13, KEY_MUTE },
{ 0x15, KEY_CHANNELDOWN },
{ 0x18, KEY_VOLUMEDOWN },
{ 0x19, KEY_CAMERA }, /* Snapshot */
{ 0x1a, KEY_NEXTSONG },
{ 0x1b, KEY_TIME }, /* Time Shift */
{ 0x1c, KEY_RADIO }, /* FM Radio */
{ 0x1d, KEY_RECORD },
{ 0x1e, KEY_PAUSE },
/* additional codes for Kozumi's remote */
{ 0x14, KEY_INFO }, /* OSD */
{ 0x16, KEY_OK }, /* OK */
{ 0x17, KEY_DIGITS }, /* Plus */
{ 0x1f, KEY_PLAY }, /* Play */
};
static struct rc_keymap pctv_sedna_map = {
.map = {
.scan = pctv_sedna,
.size = ARRAY_SIZE(pctv_sedna),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_PCTV_SEDNA,
}
};
static int __init init_rc_map_pctv_sedna(void)
{
return ir_register_map(&pctv_sedna_map);
}
static void __exit exit_rc_map_pctv_sedna(void)
{
ir_unregister_map(&pctv_sedna_map);
}
module_init(init_rc_map_pctv_sedna)
module_exit(exit_rc_map_pctv_sedna)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,94 @@
/* pinnacle-color.h - Keytable for pinnacle_color Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode pinnacle_color[] = {
{ 0x59, KEY_MUTE },
{ 0x4a, KEY_POWER },
{ 0x18, KEY_TEXT },
{ 0x26, KEY_TV },
{ 0x3d, KEY_PRINT },
{ 0x48, KEY_RED },
{ 0x04, KEY_GREEN },
{ 0x11, KEY_YELLOW },
{ 0x00, KEY_BLUE },
{ 0x2d, KEY_VOLUMEUP },
{ 0x1e, KEY_VOLUMEDOWN },
{ 0x49, KEY_MENU },
{ 0x16, KEY_CHANNELUP },
{ 0x17, KEY_CHANNELDOWN },
{ 0x20, KEY_UP },
{ 0x21, KEY_DOWN },
{ 0x22, KEY_LEFT },
{ 0x23, KEY_RIGHT },
{ 0x0d, KEY_SELECT },
{ 0x08, KEY_BACK },
{ 0x07, KEY_REFRESH },
{ 0x2f, KEY_ZOOM },
{ 0x29, KEY_RECORD },
{ 0x4b, KEY_PAUSE },
{ 0x4d, KEY_REWIND },
{ 0x2e, KEY_PLAY },
{ 0x4e, KEY_FORWARD },
{ 0x53, KEY_PREVIOUS },
{ 0x4c, KEY_STOP },
{ 0x54, KEY_NEXT },
{ 0x69, KEY_0 },
{ 0x6a, KEY_1 },
{ 0x6b, KEY_2 },
{ 0x6c, KEY_3 },
{ 0x6d, KEY_4 },
{ 0x6e, KEY_5 },
{ 0x6f, KEY_6 },
{ 0x70, KEY_7 },
{ 0x71, KEY_8 },
{ 0x72, KEY_9 },
{ 0x74, KEY_CHANNEL },
{ 0x0a, KEY_BACKSPACE },
};
static struct rc_keymap pinnacle_color_map = {
.map = {
.scan = pinnacle_color,
.size = ARRAY_SIZE(pinnacle_color),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_PINNACLE_COLOR,
}
};
static int __init init_rc_map_pinnacle_color(void)
{
return ir_register_map(&pinnacle_color_map);
}
static void __exit exit_rc_map_pinnacle_color(void)
{
ir_unregister_map(&pinnacle_color_map);
}
module_init(init_rc_map_pinnacle_color)
module_exit(exit_rc_map_pinnacle_color)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,89 @@
/* pinnacle-grey.h - Keytable for pinnacle_grey Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode pinnacle_grey[] = {
{ 0x3a, KEY_0 },
{ 0x31, KEY_1 },
{ 0x32, KEY_2 },
{ 0x33, KEY_3 },
{ 0x34, KEY_4 },
{ 0x35, KEY_5 },
{ 0x36, KEY_6 },
{ 0x37, KEY_7 },
{ 0x38, KEY_8 },
{ 0x39, KEY_9 },
{ 0x2f, KEY_POWER },
{ 0x2e, KEY_P },
{ 0x1f, KEY_L },
{ 0x2b, KEY_I },
{ 0x2d, KEY_SCREEN },
{ 0x1e, KEY_ZOOM },
{ 0x1b, KEY_VOLUMEUP },
{ 0x0f, KEY_VOLUMEDOWN },
{ 0x17, KEY_CHANNELUP },
{ 0x1c, KEY_CHANNELDOWN },
{ 0x25, KEY_INFO },
{ 0x3c, KEY_MUTE },
{ 0x3d, KEY_LEFT },
{ 0x3b, KEY_RIGHT },
{ 0x3f, KEY_UP },
{ 0x3e, KEY_DOWN },
{ 0x1a, KEY_ENTER },
{ 0x1d, KEY_MENU },
{ 0x19, KEY_AGAIN },
{ 0x16, KEY_PREVIOUSSONG },
{ 0x13, KEY_NEXTSONG },
{ 0x15, KEY_PAUSE },
{ 0x0e, KEY_REWIND },
{ 0x0d, KEY_PLAY },
{ 0x0b, KEY_STOP },
{ 0x07, KEY_FORWARD },
{ 0x27, KEY_RECORD },
{ 0x26, KEY_TUNER },
{ 0x29, KEY_TEXT },
{ 0x2a, KEY_MEDIA },
{ 0x18, KEY_EPG },
};
static struct rc_keymap pinnacle_grey_map = {
.map = {
.scan = pinnacle_grey,
.size = ARRAY_SIZE(pinnacle_grey),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_PINNACLE_GREY,
}
};
static int __init init_rc_map_pinnacle_grey(void)
{
return ir_register_map(&pinnacle_grey_map);
}
static void __exit exit_rc_map_pinnacle_grey(void)
{
ir_unregister_map(&pinnacle_grey_map);
}
module_init(init_rc_map_pinnacle_grey)
module_exit(exit_rc_map_pinnacle_grey)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,73 @@
/* pinnacle-pctv-hd.h - Keytable for pinnacle_pctv_hd Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Pinnacle PCTV HD 800i mini remote */
static struct ir_scancode pinnacle_pctv_hd[] = {
{ 0x0f, KEY_1 },
{ 0x15, KEY_2 },
{ 0x10, KEY_3 },
{ 0x18, KEY_4 },
{ 0x1b, KEY_5 },
{ 0x1e, KEY_6 },
{ 0x11, KEY_7 },
{ 0x21, KEY_8 },
{ 0x12, KEY_9 },
{ 0x27, KEY_0 },
{ 0x24, KEY_ZOOM },
{ 0x2a, KEY_SUBTITLE },
{ 0x00, KEY_MUTE },
{ 0x01, KEY_ENTER }, /* Pinnacle Logo */
{ 0x39, KEY_POWER },
{ 0x03, KEY_VOLUMEUP },
{ 0x09, KEY_VOLUMEDOWN },
{ 0x06, KEY_CHANNELUP },
{ 0x0c, KEY_CHANNELDOWN },
{ 0x2d, KEY_REWIND },
{ 0x30, KEY_PLAYPAUSE },
{ 0x33, KEY_FASTFORWARD },
{ 0x3c, KEY_STOP },
{ 0x36, KEY_RECORD },
{ 0x3f, KEY_EPG }, /* Labeled "?" */
};
static struct rc_keymap pinnacle_pctv_hd_map = {
.map = {
.scan = pinnacle_pctv_hd,
.size = ARRAY_SIZE(pinnacle_pctv_hd),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_PINNACLE_PCTV_HD,
}
};
static int __init init_rc_map_pinnacle_pctv_hd(void)
{
return ir_register_map(&pinnacle_pctv_hd_map);
}
static void __exit exit_rc_map_pinnacle_pctv_hd(void)
{
ir_unregister_map(&pinnacle_pctv_hd_map);
}
module_init(init_rc_map_pinnacle_pctv_hd)
module_exit(exit_rc_map_pinnacle_pctv_hd)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,83 @@
/* rc-pixelview-mk12.h - Keytable for pixelview Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/*
* Keytable for MK-F12 IR remote provided together with Pixelview
* Ultra Pro Remote Controller. Uses NEC extended format.
*/
static struct ir_scancode pixelview_mk12[] = {
{ 0x866b03, KEY_TUNER }, /* Timeshift */
{ 0x866b1e, KEY_POWER2 }, /* power */
{ 0x866b01, KEY_1 },
{ 0x866b0b, KEY_2 },
{ 0x866b1b, KEY_3 },
{ 0x866b05, KEY_4 },
{ 0x866b09, KEY_5 },
{ 0x866b15, KEY_6 },
{ 0x866b06, KEY_7 },
{ 0x866b0a, KEY_8 },
{ 0x866b12, KEY_9 },
{ 0x866b02, KEY_0 },
{ 0x866b13, KEY_AGAIN }, /* loop */
{ 0x866b10, KEY_DIGITS }, /* +100 */
{ 0x866b00, KEY_MEDIA }, /* source */
{ 0x866b18, KEY_MUTE }, /* mute */
{ 0x866b19, KEY_CAMERA }, /* snapshot */
{ 0x866b1a, KEY_SEARCH }, /* scan */
{ 0x866b16, KEY_CHANNELUP }, /* chn + */
{ 0x866b14, KEY_CHANNELDOWN }, /* chn - */
{ 0x866b1f, KEY_VOLUMEUP }, /* vol + */
{ 0x866b17, KEY_VOLUMEDOWN }, /* vol - */
{ 0x866b1c, KEY_ZOOM }, /* zoom */
{ 0x866b04, KEY_REWIND },
{ 0x866b0e, KEY_RECORD },
{ 0x866b0c, KEY_FORWARD },
{ 0x866b1d, KEY_STOP },
{ 0x866b08, KEY_PLAY },
{ 0x866b0f, KEY_PAUSE },
{ 0x866b0d, KEY_TV },
{ 0x866b07, KEY_RADIO }, /* FM */
};
static struct rc_keymap pixelview_map = {
.map = {
.scan = pixelview_mk12,
.size = ARRAY_SIZE(pixelview_mk12),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_PIXELVIEW_MK12,
}
};
static int __init init_rc_map_pixelview(void)
{
return ir_register_map(&pixelview_map);
}
static void __exit exit_rc_map_pixelview(void)
{
ir_unregister_map(&pixelview_map);
}
module_init(init_rc_map_pixelview)
module_exit(exit_rc_map_pixelview)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,83 @@
/* pixelview-new.h - Keytable for pixelview_new Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/*
Mauro Carvalho Chehab <mchehab@infradead.org>
present on PV MPEG 8000GT
*/
static struct ir_scancode pixelview_new[] = {
{ 0x3c, KEY_TIME }, /* Timeshift */
{ 0x12, KEY_POWER },
{ 0x3d, KEY_1 },
{ 0x38, KEY_2 },
{ 0x18, KEY_3 },
{ 0x35, KEY_4 },
{ 0x39, KEY_5 },
{ 0x15, KEY_6 },
{ 0x36, KEY_7 },
{ 0x3a, KEY_8 },
{ 0x1e, KEY_9 },
{ 0x3e, KEY_0 },
{ 0x1c, KEY_AGAIN }, /* LOOP */
{ 0x3f, KEY_MEDIA }, /* Source */
{ 0x1f, KEY_LAST }, /* +100 */
{ 0x1b, KEY_MUTE },
{ 0x17, KEY_CHANNELDOWN },
{ 0x16, KEY_CHANNELUP },
{ 0x10, KEY_VOLUMEUP },
{ 0x14, KEY_VOLUMEDOWN },
{ 0x13, KEY_ZOOM },
{ 0x19, KEY_CAMERA }, /* SNAPSHOT */
{ 0x1a, KEY_SEARCH }, /* scan */
{ 0x37, KEY_REWIND }, /* << */
{ 0x32, KEY_RECORD }, /* o (red) */
{ 0x33, KEY_FORWARD }, /* >> */
{ 0x11, KEY_STOP }, /* square */
{ 0x3b, KEY_PLAY }, /* > */
{ 0x30, KEY_PLAYPAUSE }, /* || */
{ 0x31, KEY_TV },
{ 0x34, KEY_RADIO },
};
static struct rc_keymap pixelview_new_map = {
.map = {
.scan = pixelview_new,
.size = ARRAY_SIZE(pixelview_new),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_PIXELVIEW_NEW,
}
};
static int __init init_rc_map_pixelview_new(void)
{
return ir_register_map(&pixelview_new_map);
}
static void __exit exit_rc_map_pixelview_new(void)
{
ir_unregister_map(&pixelview_new_map);
}
module_init(init_rc_map_pixelview_new)
module_exit(exit_rc_map_pixelview_new)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,82 @@
/* pixelview.h - Keytable for pixelview Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode pixelview[] = {
{ 0x1e, KEY_POWER }, /* power */
{ 0x07, KEY_MEDIA }, /* source */
{ 0x1c, KEY_SEARCH }, /* scan */
{ 0x03, KEY_TUNER }, /* TV/FM */
{ 0x00, KEY_RECORD },
{ 0x08, KEY_STOP },
{ 0x11, KEY_PLAY },
{ 0x1a, KEY_PLAYPAUSE }, /* freeze */
{ 0x19, KEY_ZOOM }, /* zoom */
{ 0x0f, KEY_TEXT }, /* min */
{ 0x01, KEY_1 },
{ 0x0b, KEY_2 },
{ 0x1b, KEY_3 },
{ 0x05, KEY_4 },
{ 0x09, KEY_5 },
{ 0x15, KEY_6 },
{ 0x06, KEY_7 },
{ 0x0a, KEY_8 },
{ 0x12, KEY_9 },
{ 0x02, KEY_0 },
{ 0x10, KEY_LAST }, /* +100 */
{ 0x13, KEY_LIST }, /* recall */
{ 0x1f, KEY_CHANNELUP }, /* chn down */
{ 0x17, KEY_CHANNELDOWN }, /* chn up */
{ 0x16, KEY_VOLUMEUP }, /* vol down */
{ 0x14, KEY_VOLUMEDOWN }, /* vol up */
{ 0x04, KEY_KPMINUS }, /* <<< */
{ 0x0e, KEY_SETUP }, /* function */
{ 0x0c, KEY_KPPLUS }, /* >>> */
{ 0x0d, KEY_GOTO }, /* mts */
{ 0x1d, KEY_REFRESH }, /* reset */
{ 0x18, KEY_MUTE }, /* mute/unmute */
};
static struct rc_keymap pixelview_map = {
.map = {
.scan = pixelview,
.size = ARRAY_SIZE(pixelview),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_PIXELVIEW,
}
};
static int __init init_rc_map_pixelview(void)
{
return ir_register_map(&pixelview_map);
}
static void __exit exit_rc_map_pixelview(void)
{
ir_unregister_map(&pixelview_map);
}
module_init(init_rc_map_pixelview)
module_exit(exit_rc_map_pixelview)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,81 @@
/* powercolor-real-angel.h - Keytable for powercolor_real_angel Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/*
* Remote control for Powercolor Real Angel 330
* Daniel Fraga <fragabr@gmail.com>
*/
static struct ir_scancode powercolor_real_angel[] = {
{ 0x38, KEY_SWITCHVIDEOMODE }, /* switch inputs */
{ 0x0c, KEY_MEDIA }, /* Turn ON/OFF App */
{ 0x00, KEY_0 },
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
{ 0x0a, KEY_DIGITS }, /* single, double, tripple digit */
{ 0x29, KEY_PREVIOUS }, /* previous channel */
{ 0x12, KEY_BRIGHTNESSUP },
{ 0x13, KEY_BRIGHTNESSDOWN },
{ 0x2b, KEY_MODE }, /* stereo/mono */
{ 0x2c, KEY_TEXT }, /* teletext */
{ 0x20, KEY_CHANNELUP }, /* channel up */
{ 0x21, KEY_CHANNELDOWN }, /* channel down */
{ 0x10, KEY_VOLUMEUP }, /* volume up */
{ 0x11, KEY_VOLUMEDOWN }, /* volume down */
{ 0x0d, KEY_MUTE },
{ 0x1f, KEY_RECORD },
{ 0x17, KEY_PLAY },
{ 0x16, KEY_PAUSE },
{ 0x0b, KEY_STOP },
{ 0x27, KEY_FASTFORWARD },
{ 0x26, KEY_REWIND },
{ 0x1e, KEY_SEARCH }, /* autoscan */
{ 0x0e, KEY_CAMERA }, /* snapshot */
{ 0x2d, KEY_SETUP },
{ 0x0f, KEY_SCREEN }, /* full screen */
{ 0x14, KEY_RADIO }, /* FM radio */
{ 0x25, KEY_POWER }, /* power */
};
static struct rc_keymap powercolor_real_angel_map = {
.map = {
.scan = powercolor_real_angel,
.size = ARRAY_SIZE(powercolor_real_angel),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_POWERCOLOR_REAL_ANGEL,
}
};
static int __init init_rc_map_powercolor_real_angel(void)
{
return ir_register_map(&powercolor_real_angel_map);
}
static void __exit exit_rc_map_powercolor_real_angel(void)
{
ir_unregister_map(&powercolor_real_angel_map);
}
module_init(init_rc_map_powercolor_real_angel)
module_exit(exit_rc_map_powercolor_real_angel)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,69 @@
/* proteus-2309.h - Keytable for proteus_2309 Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Michal Majchrowicz <mmajchrowicz@gmail.com> */
static struct ir_scancode proteus_2309[] = {
/* numeric */
{ 0x00, KEY_0 },
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
{ 0x5c, KEY_POWER }, /* power */
{ 0x20, KEY_ZOOM }, /* full screen */
{ 0x0f, KEY_BACKSPACE }, /* recall */
{ 0x1b, KEY_ENTER }, /* mute */
{ 0x41, KEY_RECORD }, /* record */
{ 0x43, KEY_STOP }, /* stop */
{ 0x16, KEY_S },
{ 0x1a, KEY_POWER2 }, /* off */
{ 0x2e, KEY_RED },
{ 0x1f, KEY_CHANNELDOWN }, /* channel - */
{ 0x1c, KEY_CHANNELUP }, /* channel + */
{ 0x10, KEY_VOLUMEDOWN }, /* volume - */
{ 0x1e, KEY_VOLUMEUP }, /* volume + */
{ 0x14, KEY_F1 },
};
static struct rc_keymap proteus_2309_map = {
.map = {
.scan = proteus_2309,
.size = ARRAY_SIZE(proteus_2309),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_PROTEUS_2309,
}
};
static int __init init_rc_map_proteus_2309(void)
{
return ir_register_map(&proteus_2309_map);
}
static void __exit exit_rc_map_proteus_2309(void)
{
ir_unregister_map(&proteus_2309_map);
}
module_init(init_rc_map_proteus_2309)
module_exit(exit_rc_map_proteus_2309)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,81 @@
/* purpletv.h - Keytable for purpletv Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode purpletv[] = {
{ 0x03, KEY_POWER },
{ 0x6f, KEY_MUTE },
{ 0x10, KEY_BACKSPACE }, /* Recall */
{ 0x11, KEY_0 },
{ 0x04, KEY_1 },
{ 0x05, KEY_2 },
{ 0x06, KEY_3 },
{ 0x08, KEY_4 },
{ 0x09, KEY_5 },
{ 0x0a, KEY_6 },
{ 0x0c, KEY_7 },
{ 0x0d, KEY_8 },
{ 0x0e, KEY_9 },
{ 0x12, KEY_DOT }, /* 100+ */
{ 0x07, KEY_VOLUMEUP },
{ 0x0b, KEY_VOLUMEDOWN },
{ 0x1a, KEY_KPPLUS },
{ 0x18, KEY_KPMINUS },
{ 0x15, KEY_UP },
{ 0x1d, KEY_DOWN },
{ 0x0f, KEY_CHANNELUP },
{ 0x13, KEY_CHANNELDOWN },
{ 0x48, KEY_ZOOM },
{ 0x1b, KEY_VIDEO }, /* Video source */
{ 0x1f, KEY_CAMERA }, /* Snapshot */
{ 0x49, KEY_LANGUAGE }, /* MTS Select */
{ 0x19, KEY_SEARCH }, /* Auto Scan */
{ 0x4b, KEY_RECORD },
{ 0x46, KEY_PLAY },
{ 0x45, KEY_PAUSE }, /* Pause */
{ 0x44, KEY_STOP },
{ 0x43, KEY_TIME }, /* Time Shift */
{ 0x17, KEY_CHANNEL }, /* SURF CH */
{ 0x40, KEY_FORWARD }, /* Forward ? */
{ 0x42, KEY_REWIND }, /* Backward ? */
};
static struct rc_keymap purpletv_map = {
.map = {
.scan = purpletv,
.size = ARRAY_SIZE(purpletv),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_PURPLETV,
}
};
static int __init init_rc_map_purpletv(void)
{
return ir_register_map(&purpletv_map);
}
static void __exit exit_rc_map_purpletv(void)
{
ir_unregister_map(&purpletv_map);
}
module_init(init_rc_map_purpletv)
module_exit(exit_rc_map_purpletv)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,78 @@
/* pv951.h - Keytable for pv951 Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Mark Phalan <phalanm@o2.ie> */
static struct ir_scancode pv951[] = {
{ 0x00, KEY_0 },
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
{ 0x12, KEY_POWER },
{ 0x10, KEY_MUTE },
{ 0x1f, KEY_VOLUMEDOWN },
{ 0x1b, KEY_VOLUMEUP },
{ 0x1a, KEY_CHANNELUP },
{ 0x1e, KEY_CHANNELDOWN },
{ 0x0e, KEY_PAGEUP },
{ 0x1d, KEY_PAGEDOWN },
{ 0x13, KEY_SOUND },
{ 0x18, KEY_KPPLUSMINUS }, /* CH +/- */
{ 0x16, KEY_SUBTITLE }, /* CC */
{ 0x0d, KEY_TEXT }, /* TTX */
{ 0x0b, KEY_TV }, /* AIR/CBL */
{ 0x11, KEY_PC }, /* PC/TV */
{ 0x17, KEY_OK }, /* CH RTN */
{ 0x19, KEY_MODE }, /* FUNC */
{ 0x0c, KEY_SEARCH }, /* AUTOSCAN */
/* Not sure what to do with these ones! */
{ 0x0f, KEY_SELECT }, /* SOURCE */
{ 0x0a, KEY_KPPLUS }, /* +100 */
{ 0x14, KEY_EQUAL }, /* SYNC */
{ 0x1c, KEY_MEDIA }, /* PC/TV */
};
static struct rc_keymap pv951_map = {
.map = {
.scan = pv951,
.size = ARRAY_SIZE(pv951),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_PV951,
}
};
static int __init init_rc_map_pv951(void)
{
return ir_register_map(&pv951_map);
}
static void __exit exit_rc_map_pv951(void)
{
ir_unregister_map(&pv951_map);
}
module_init(init_rc_map_pv951)
module_exit(exit_rc_map_pv951)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,103 @@
/* rc5-hauppauge-new.h - Keytable for rc5_hauppauge_new Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/*
* Hauppauge:the newer, gray remotes (seems there are multiple
* slightly different versions), shipped with cx88+ivtv cards.
*
* This table contains the complete RC5 code, instead of just the data part
*/
static struct ir_scancode rc5_hauppauge_new[] = {
/* Keys 0 to 9 */
{ 0x1e00, KEY_0 },
{ 0x1e01, KEY_1 },
{ 0x1e02, KEY_2 },
{ 0x1e03, KEY_3 },
{ 0x1e04, KEY_4 },
{ 0x1e05, KEY_5 },
{ 0x1e06, KEY_6 },
{ 0x1e07, KEY_7 },
{ 0x1e08, KEY_8 },
{ 0x1e09, KEY_9 },
{ 0x1e0a, KEY_TEXT }, /* keypad asterisk as well */
{ 0x1e0b, KEY_RED }, /* red button */
{ 0x1e0c, KEY_RADIO },
{ 0x1e0d, KEY_MENU },
{ 0x1e0e, KEY_SUBTITLE }, /* also the # key */
{ 0x1e0f, KEY_MUTE },
{ 0x1e10, KEY_VOLUMEUP },
{ 0x1e11, KEY_VOLUMEDOWN },
{ 0x1e12, KEY_PREVIOUS }, /* previous channel */
{ 0x1e14, KEY_UP },
{ 0x1e15, KEY_DOWN },
{ 0x1e16, KEY_LEFT },
{ 0x1e17, KEY_RIGHT },
{ 0x1e18, KEY_VIDEO }, /* Videos */
{ 0x1e19, KEY_AUDIO }, /* Music */
/* 0x1e1a: Pictures - presume this means
"Multimedia Home Platform" -
no "PICTURES" key in input.h
*/
{ 0x1e1a, KEY_MHP },
{ 0x1e1b, KEY_EPG }, /* Guide */
{ 0x1e1c, KEY_TV },
{ 0x1e1e, KEY_NEXTSONG }, /* skip >| */
{ 0x1e1f, KEY_EXIT }, /* back/exit */
{ 0x1e20, KEY_CHANNELUP }, /* channel / program + */
{ 0x1e21, KEY_CHANNELDOWN }, /* channel / program - */
{ 0x1e22, KEY_CHANNEL }, /* source (old black remote) */
{ 0x1e24, KEY_PREVIOUSSONG }, /* replay |< */
{ 0x1e25, KEY_ENTER }, /* OK */
{ 0x1e26, KEY_SLEEP }, /* minimize (old black remote) */
{ 0x1e29, KEY_BLUE }, /* blue key */
{ 0x1e2e, KEY_GREEN }, /* green button */
{ 0x1e30, KEY_PAUSE }, /* pause */
{ 0x1e32, KEY_REWIND }, /* backward << */
{ 0x1e34, KEY_FASTFORWARD }, /* forward >> */
{ 0x1e35, KEY_PLAY },
{ 0x1e36, KEY_STOP },
{ 0x1e37, KEY_RECORD }, /* recording */
{ 0x1e38, KEY_YELLOW }, /* yellow key */
{ 0x1e3b, KEY_SELECT }, /* top right button */
{ 0x1e3c, KEY_ZOOM }, /* full */
{ 0x1e3d, KEY_POWER }, /* system power (green button) */
};
static struct rc_keymap rc5_hauppauge_new_map = {
.map = {
.scan = rc5_hauppauge_new,
.size = ARRAY_SIZE(rc5_hauppauge_new),
.ir_type = IR_TYPE_RC5,
.name = RC_MAP_RC5_HAUPPAUGE_NEW,
}
};
static int __init init_rc_map_rc5_hauppauge_new(void)
{
return ir_register_map(&rc5_hauppauge_new_map);
}
static void __exit exit_rc_map_rc5_hauppauge_new(void)
{
ir_unregister_map(&rc5_hauppauge_new_map);
}
module_init(init_rc_map_rc5_hauppauge_new)
module_exit(exit_rc_map_rc5_hauppauge_new)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,81 @@
/* rc5-tv.h - Keytable for rc5_tv Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* generic RC5 keytable */
/* see http://users.pandora.be/nenya/electronics/rc5/codes00.htm */
/* used by old (black) Hauppauge remotes */
static struct ir_scancode rc5_tv[] = {
/* Keys 0 to 9 */
{ 0x00, KEY_0 },
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
{ 0x03, KEY_3 },
{ 0x04, KEY_4 },
{ 0x05, KEY_5 },
{ 0x06, KEY_6 },
{ 0x07, KEY_7 },
{ 0x08, KEY_8 },
{ 0x09, KEY_9 },
{ 0x0b, KEY_CHANNEL }, /* channel / program (japan: 11) */
{ 0x0c, KEY_POWER }, /* standby */
{ 0x0d, KEY_MUTE }, /* mute / demute */
{ 0x0f, KEY_TV }, /* display */
{ 0x10, KEY_VOLUMEUP },
{ 0x11, KEY_VOLUMEDOWN },
{ 0x12, KEY_BRIGHTNESSUP },
{ 0x13, KEY_BRIGHTNESSDOWN },
{ 0x1e, KEY_SEARCH }, /* search + */
{ 0x20, KEY_CHANNELUP }, /* channel / program + */
{ 0x21, KEY_CHANNELDOWN }, /* channel / program - */
{ 0x22, KEY_CHANNEL }, /* alt / channel */
{ 0x23, KEY_LANGUAGE }, /* 1st / 2nd language */
{ 0x26, KEY_SLEEP }, /* sleeptimer */
{ 0x2e, KEY_MENU }, /* 2nd controls (USA: menu) */
{ 0x30, KEY_PAUSE },
{ 0x32, KEY_REWIND },
{ 0x33, KEY_GOTO },
{ 0x35, KEY_PLAY },
{ 0x36, KEY_STOP },
{ 0x37, KEY_RECORD }, /* recording */
{ 0x3c, KEY_TEXT }, /* teletext submode (Japan: 12) */
{ 0x3d, KEY_SUSPEND }, /* system standby */
};
static struct rc_keymap rc5_tv_map = {
.map = {
.scan = rc5_tv,
.size = ARRAY_SIZE(rc5_tv),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_RC5_TV,
}
};
static int __init init_rc_map_rc5_tv(void)
{
return ir_register_map(&rc5_tv_map);
}
static void __exit exit_rc_map_rc5_tv(void)
{
ir_unregister_map(&rc5_tv_map);
}
module_init(init_rc_map_rc5_tv)
module_exit(exit_rc_map_rc5_tv)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,113 @@
/* rc-rc6-mce.c - Keytable for Windows Media Center RC-6 remotes for use
* with the Media Center Edition eHome Infrared Transceiver.
*
* Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode rc6_mce[] = {
{ 0x800f0400, KEY_NUMERIC_0 },
{ 0x800f0401, KEY_NUMERIC_1 },
{ 0x800f0402, KEY_NUMERIC_2 },
{ 0x800f0403, KEY_NUMERIC_3 },
{ 0x800f0404, KEY_NUMERIC_4 },
{ 0x800f0405, KEY_NUMERIC_5 },
{ 0x800f0406, KEY_NUMERIC_6 },
{ 0x800f0407, KEY_NUMERIC_7 },
{ 0x800f0408, KEY_NUMERIC_8 },
{ 0x800f0409, KEY_NUMERIC_9 },
{ 0x800f040a, KEY_DELETE },
{ 0x800f040b, KEY_ENTER },
{ 0x800f040c, KEY_POWER }, /* PC Power */
{ 0x800f040d, KEY_PROG1 }, /* Windows MCE button */
{ 0x800f040e, KEY_MUTE },
{ 0x800f040f, KEY_INFO },
{ 0x800f0410, KEY_VOLUMEUP },
{ 0x800f0411, KEY_VOLUMEDOWN },
{ 0x800f0412, KEY_CHANNELUP },
{ 0x800f0413, KEY_CHANNELDOWN },
{ 0x800f0414, KEY_FASTFORWARD },
{ 0x800f0415, KEY_REWIND },
{ 0x800f0416, KEY_PLAY },
{ 0x800f0417, KEY_RECORD },
{ 0x800f0418, KEY_PAUSE },
{ 0x800f046e, KEY_PLAYPAUSE },
{ 0x800f0419, KEY_STOP },
{ 0x800f041a, KEY_NEXT },
{ 0x800f041b, KEY_PREVIOUS },
{ 0x800f041c, KEY_NUMERIC_POUND },
{ 0x800f041d, KEY_NUMERIC_STAR },
{ 0x800f041e, KEY_UP },
{ 0x800f041f, KEY_DOWN },
{ 0x800f0420, KEY_LEFT },
{ 0x800f0421, KEY_RIGHT },
{ 0x800f0422, KEY_OK },
{ 0x800f0423, KEY_EXIT },
{ 0x800f0424, KEY_DVD },
{ 0x800f0425, KEY_TUNER }, /* LiveTV */
{ 0x800f0426, KEY_EPG }, /* Guide */
{ 0x800f0427, KEY_ZOOM }, /* Aspect */
{ 0x800f043a, KEY_BRIGHTNESSUP },
{ 0x800f0446, KEY_TV },
{ 0x800f0447, KEY_AUDIO }, /* My Music */
{ 0x800f0448, KEY_PVR }, /* RecordedTV */
{ 0x800f0449, KEY_CAMERA },
{ 0x800f044a, KEY_VIDEO },
{ 0x800f044c, KEY_LANGUAGE },
{ 0x800f044d, KEY_TITLE },
{ 0x800f044e, KEY_PRINT }, /* Print - HP OEM version of remote */
{ 0x800f0450, KEY_RADIO },
{ 0x800f045a, KEY_SUBTITLE }, /* Caption/Teletext */
{ 0x800f045b, KEY_RED },
{ 0x800f045c, KEY_GREEN },
{ 0x800f045d, KEY_YELLOW },
{ 0x800f045e, KEY_BLUE },
{ 0x800f0465, KEY_POWER2 }, /* TV Power */
{ 0x800f046e, KEY_PLAYPAUSE },
{ 0x800f046f, KEY_MEDIA }, /* Start media application (NEW) */
{ 0x800f0480, KEY_BRIGHTNESSDOWN },
{ 0x800f0481, KEY_PLAYPAUSE },
};
static struct rc_keymap rc6_mce_map = {
.map = {
.scan = rc6_mce,
.size = ARRAY_SIZE(rc6_mce),
.ir_type = IR_TYPE_RC6,
.name = RC_MAP_RC6_MCE,
}
};
static int __init init_rc_map_rc6_mce(void)
{
return ir_register_map(&rc6_mce_map);
}
static void __exit exit_rc_map_rc6_mce(void)
{
ir_unregister_map(&rc6_mce_map);
}
module_init(init_rc_map_rc6_mce)
module_exit(exit_rc_map_rc6_mce)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");

View File

@@ -0,0 +1,78 @@
/* real-audio-220-32-keys.h - Keytable for real_audio_220_32_keys Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Zogis Real Audio 220 - 32 keys IR */
static struct ir_scancode real_audio_220_32_keys[] = {
{ 0x1c, KEY_RADIO},
{ 0x12, KEY_POWER2},
{ 0x01, KEY_1},
{ 0x02, KEY_2},
{ 0x03, KEY_3},
{ 0x04, KEY_4},
{ 0x05, KEY_5},
{ 0x06, KEY_6},
{ 0x07, KEY_7},
{ 0x08, KEY_8},
{ 0x09, KEY_9},
{ 0x00, KEY_0},
{ 0x0c, KEY_VOLUMEUP},
{ 0x18, KEY_VOLUMEDOWN},
{ 0x0b, KEY_CHANNELUP},
{ 0x15, KEY_CHANNELDOWN},
{ 0x16, KEY_ENTER},
{ 0x11, KEY_LIST}, /* Source */
{ 0x0d, KEY_AUDIO}, /* stereo */
{ 0x0f, KEY_PREVIOUS}, /* Prev */
{ 0x1b, KEY_TIME}, /* Timeshift */
{ 0x1a, KEY_NEXT}, /* Next */
{ 0x0e, KEY_STOP},
{ 0x1f, KEY_PLAY},
{ 0x1e, KEY_PLAYPAUSE}, /* Pause */
{ 0x1d, KEY_RECORD},
{ 0x13, KEY_MUTE},
{ 0x19, KEY_CAMERA}, /* Snapshot */
};
static struct rc_keymap real_audio_220_32_keys_map = {
.map = {
.scan = real_audio_220_32_keys,
.size = ARRAY_SIZE(real_audio_220_32_keys),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_REAL_AUDIO_220_32_KEYS,
}
};
static int __init init_rc_map_real_audio_220_32_keys(void)
{
return ir_register_map(&real_audio_220_32_keys_map);
}
static void __exit exit_rc_map_real_audio_220_32_keys(void)
{
ir_unregister_map(&real_audio_220_32_keys_map);
}
module_init(init_rc_map_real_audio_220_32_keys)
module_exit(exit_rc_map_real_audio_220_32_keys)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,82 @@
/* rc-streamzap.c - Keytable for Streamzap PC Remote, for use
* with the Streamzap PC Remote IR Receiver.
*
* Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode streamzap[] = {
/*
* The Streamzap remote is almost, but not quite, RC-5, as it has an extra
* bit in it, which throws the in-kernel RC-5 decoder for a loop. Currently,
* an additional RC-5-sz decoder is being deployed to support it, but it
* may be possible to merge it back with the standard RC-5 decoder.
*/
{ 0x28c0, KEY_NUMERIC_0 },
{ 0x28c1, KEY_NUMERIC_1 },
{ 0x28c2, KEY_NUMERIC_2 },
{ 0x28c3, KEY_NUMERIC_3 },
{ 0x28c4, KEY_NUMERIC_4 },
{ 0x28c5, KEY_NUMERIC_5 },
{ 0x28c6, KEY_NUMERIC_6 },
{ 0x28c7, KEY_NUMERIC_7 },
{ 0x28c8, KEY_NUMERIC_8 },
{ 0x28c9, KEY_NUMERIC_9 },
{ 0x28ca, KEY_POWER },
{ 0x28cb, KEY_MUTE },
{ 0x28cc, KEY_CHANNELUP },
{ 0x28cd, KEY_VOLUMEUP },
{ 0x28ce, KEY_CHANNELDOWN },
{ 0x28cf, KEY_VOLUMEDOWN },
{ 0x28d0, KEY_UP },
{ 0x28d1, KEY_LEFT },
{ 0x28d2, KEY_OK },
{ 0x28d3, KEY_RIGHT },
{ 0x28d4, KEY_DOWN },
{ 0x28d5, KEY_MENU },
{ 0x28d6, KEY_EXIT },
{ 0x28d7, KEY_PLAY },
{ 0x28d8, KEY_PAUSE },
{ 0x28d9, KEY_STOP },
{ 0x28da, KEY_BACK },
{ 0x28db, KEY_FORWARD },
{ 0x28dc, KEY_RECORD },
{ 0x28dd, KEY_REWIND },
{ 0x28de, KEY_FASTFORWARD },
{ 0x28e0, KEY_RED },
{ 0x28e1, KEY_GREEN },
{ 0x28e2, KEY_YELLOW },
{ 0x28e3, KEY_BLUE },
};
static struct rc_keymap streamzap_map = {
.map = {
.scan = streamzap,
.size = ARRAY_SIZE(streamzap),
.ir_type = IR_TYPE_RC5_SZ,
.name = RC_MAP_STREAMZAP,
}
};
static int __init init_rc_map_streamzap(void)
{
return ir_register_map(&streamzap_map);
}
static void __exit exit_rc_map_streamzap(void)
{
ir_unregister_map(&streamzap_map);
}
module_init(init_rc_map_streamzap)
module_exit(exit_rc_map_streamzap)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");

View File

@@ -0,0 +1,73 @@
/* tbs-nec.h - Keytable for tbs_nec Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode tbs_nec[] = {
{ 0x04, KEY_POWER2}, /*power*/
{ 0x14, KEY_MUTE}, /*mute*/
{ 0x07, KEY_1},
{ 0x06, KEY_2},
{ 0x05, KEY_3},
{ 0x0b, KEY_4},
{ 0x0a, KEY_5},
{ 0x09, KEY_6},
{ 0x0f, KEY_7},
{ 0x0e, KEY_8},
{ 0x0d, KEY_9},
{ 0x12, KEY_0},
{ 0x16, KEY_CHANNELUP}, /*ch+*/
{ 0x11, KEY_CHANNELDOWN},/*ch-*/
{ 0x13, KEY_VOLUMEUP}, /*vol+*/
{ 0x0c, KEY_VOLUMEDOWN},/*vol-*/
{ 0x03, KEY_RECORD}, /*rec*/
{ 0x18, KEY_PAUSE}, /*pause*/
{ 0x19, KEY_OK}, /*ok*/
{ 0x1a, KEY_CAMERA}, /* snapshot */
{ 0x01, KEY_UP},
{ 0x10, KEY_LEFT},
{ 0x02, KEY_RIGHT},
{ 0x08, KEY_DOWN},
{ 0x15, KEY_FAVORITES},
{ 0x17, KEY_SUBTITLE},
{ 0x1d, KEY_ZOOM},
{ 0x1f, KEY_EXIT},
{ 0x1e, KEY_MENU},
{ 0x1c, KEY_EPG},
{ 0x00, KEY_PREVIOUS},
{ 0x1b, KEY_MODE},
};
static struct rc_keymap tbs_nec_map = {
.map = {
.scan = tbs_nec,
.size = ARRAY_SIZE(tbs_nec),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_TBS_NEC,
}
};
static int __init init_rc_map_tbs_nec(void)
{
return ir_register_map(&tbs_nec_map);
}
static void __exit exit_rc_map_tbs_nec(void)
{
ir_unregister_map(&tbs_nec_map);
}
module_init(init_rc_map_tbs_nec)
module_exit(exit_rc_map_tbs_nec)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,92 @@
/* terratec-cinergy-xs.h - Keytable for terratec_cinergy_xs Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* Terratec Cinergy Hybrid T USB XS
Devin Heitmueller <dheitmueller@linuxtv.org>
*/
static struct ir_scancode terratec_cinergy_xs[] = {
{ 0x41, KEY_HOME},
{ 0x01, KEY_POWER},
{ 0x42, KEY_MENU},
{ 0x02, KEY_1},
{ 0x03, KEY_2},
{ 0x04, KEY_3},
{ 0x43, KEY_SUBTITLE},
{ 0x05, KEY_4},
{ 0x06, KEY_5},
{ 0x07, KEY_6},
{ 0x44, KEY_TEXT},
{ 0x08, KEY_7},
{ 0x09, KEY_8},
{ 0x0a, KEY_9},
{ 0x45, KEY_DELETE},
{ 0x0b, KEY_TUNER},
{ 0x0c, KEY_0},
{ 0x0d, KEY_MODE},
{ 0x46, KEY_TV},
{ 0x47, KEY_DVD},
{ 0x49, KEY_VIDEO},
{ 0x4b, KEY_AUX},
{ 0x10, KEY_UP},
{ 0x11, KEY_LEFT},
{ 0x12, KEY_OK},
{ 0x13, KEY_RIGHT},
{ 0x14, KEY_DOWN},
{ 0x0f, KEY_EPG},
{ 0x16, KEY_INFO},
{ 0x4d, KEY_BACKSPACE},
{ 0x1c, KEY_VOLUMEUP},
{ 0x4c, KEY_PLAY},
{ 0x1b, KEY_CHANNELUP},
{ 0x1e, KEY_VOLUMEDOWN},
{ 0x1d, KEY_MUTE},
{ 0x1f, KEY_CHANNELDOWN},
{ 0x17, KEY_RED},
{ 0x18, KEY_GREEN},
{ 0x19, KEY_YELLOW},
{ 0x1a, KEY_BLUE},
{ 0x58, KEY_RECORD},
{ 0x48, KEY_STOP},
{ 0x40, KEY_PAUSE},
{ 0x54, KEY_LAST},
{ 0x4e, KEY_REWIND},
{ 0x4f, KEY_FASTFORWARD},
{ 0x5c, KEY_NEXT},
};
static struct rc_keymap terratec_cinergy_xs_map = {
.map = {
.scan = terratec_cinergy_xs,
.size = ARRAY_SIZE(terratec_cinergy_xs),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_TERRATEC_CINERGY_XS,
}
};
static int __init init_rc_map_terratec_cinergy_xs(void)
{
return ir_register_map(&terratec_cinergy_xs_map);
}
static void __exit exit_rc_map_terratec_cinergy_xs(void)
{
ir_unregister_map(&terratec_cinergy_xs_map);
}
module_init(init_rc_map_terratec_cinergy_xs)
module_exit(exit_rc_map_terratec_cinergy_xs)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,79 @@
/*
* TerraTec remote controller keytable
*
* Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <media/rc-map.h>
/* TerraTec slim remote, 7 rows, 4 columns. */
/* Uses NEC extended 0x02bd. */
static struct ir_scancode terratec_slim[] = {
{ 0x02bd00, KEY_1 },
{ 0x02bd01, KEY_2 },
{ 0x02bd02, KEY_3 },
{ 0x02bd03, KEY_4 },
{ 0x02bd04, KEY_5 },
{ 0x02bd05, KEY_6 },
{ 0x02bd06, KEY_7 },
{ 0x02bd07, KEY_8 },
{ 0x02bd08, KEY_9 },
{ 0x02bd09, KEY_0 },
{ 0x02bd0a, KEY_MUTE },
{ 0x02bd0b, KEY_NEW }, /* symbol: PIP */
{ 0x02bd0e, KEY_VOLUMEDOWN },
{ 0x02bd0f, KEY_PLAYPAUSE },
{ 0x02bd10, KEY_RIGHT },
{ 0x02bd11, KEY_LEFT },
{ 0x02bd12, KEY_UP },
{ 0x02bd13, KEY_DOWN },
{ 0x02bd15, KEY_OK },
{ 0x02bd16, KEY_STOP },
{ 0x02bd17, KEY_CAMERA }, /* snapshot */
{ 0x02bd18, KEY_CHANNELUP },
{ 0x02bd19, KEY_RECORD },
{ 0x02bd1a, KEY_CHANNELDOWN },
{ 0x02bd1c, KEY_ESC },
{ 0x02bd1f, KEY_VOLUMEUP },
{ 0x02bd44, KEY_EPG },
{ 0x02bd45, KEY_POWER2 }, /* [red power button] */
};
static struct rc_keymap terratec_slim_map = {
.map = {
.scan = terratec_slim,
.size = ARRAY_SIZE(terratec_slim),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_TERRATEC_SLIM,
}
};
static int __init init_rc_map_terratec_slim(void)
{
return ir_register_map(&terratec_slim_map);
}
static void __exit exit_rc_map_terratec_slim(void)
{
ir_unregister_map(&terratec_slim_map);
}
module_init(init_rc_map_terratec_slim)
module_exit(exit_rc_map_terratec_slim)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");

View File

@@ -0,0 +1,88 @@
/* tevii-nec.h - Keytable for tevii_nec Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
static struct ir_scancode tevii_nec[] = {
{ 0x0a, KEY_POWER2},
{ 0x0c, KEY_MUTE},
{ 0x11, KEY_1},
{ 0x12, KEY_2},
{ 0x13, KEY_3},
{ 0x14, KEY_4},
{ 0x15, KEY_5},
{ 0x16, KEY_6},
{ 0x17, KEY_7},
{ 0x18, KEY_8},
{ 0x19, KEY_9},
{ 0x10, KEY_0},
{ 0x1c, KEY_MENU},
{ 0x0f, KEY_VOLUMEDOWN},
{ 0x1a, KEY_LAST},
{ 0x0e, KEY_OPEN},
{ 0x04, KEY_RECORD},
{ 0x09, KEY_VOLUMEUP},
{ 0x08, KEY_CHANNELUP},
{ 0x07, KEY_PVR},
{ 0x0b, KEY_TIME},
{ 0x02, KEY_RIGHT},
{ 0x03, KEY_LEFT},
{ 0x00, KEY_UP},
{ 0x1f, KEY_OK},
{ 0x01, KEY_DOWN},
{ 0x05, KEY_TUNER},
{ 0x06, KEY_CHANNELDOWN},
{ 0x40, KEY_PLAYPAUSE},
{ 0x1e, KEY_REWIND},
{ 0x1b, KEY_FAVORITES},
{ 0x1d, KEY_BACK},
{ 0x4d, KEY_FASTFORWARD},
{ 0x44, KEY_EPG},
{ 0x4c, KEY_INFO},
{ 0x41, KEY_AB},
{ 0x43, KEY_AUDIO},
{ 0x45, KEY_SUBTITLE},
{ 0x4a, KEY_LIST},
{ 0x46, KEY_F1},
{ 0x47, KEY_F2},
{ 0x5e, KEY_F3},
{ 0x5c, KEY_F4},
{ 0x52, KEY_F5},
{ 0x5a, KEY_F6},
{ 0x56, KEY_MODE},
{ 0x58, KEY_SWITCHVIDEOMODE},
};
static struct rc_keymap tevii_nec_map = {
.map = {
.scan = tevii_nec,
.size = ARRAY_SIZE(tevii_nec),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_TEVII_NEC,
}
};
static int __init init_rc_map_tevii_nec(void)
{
return ir_register_map(&tevii_nec_map);
}
static void __exit exit_rc_map_tevii_nec(void)
{
ir_unregister_map(&tevii_nec_map);
}
module_init(init_rc_map_tevii_nec)
module_exit(exit_rc_map_tevii_nec)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

View File

@@ -0,0 +1,85 @@
/*
* Total Media In Hand remote controller keytable
*
* Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <media/rc-map.h>
/* Uses NEC extended 0x02bd */
static struct ir_scancode total_media_in_hand[] = {
{ 0x02bd00, KEY_1 },
{ 0x02bd01, KEY_2 },
{ 0x02bd02, KEY_3 },
{ 0x02bd03, KEY_4 },
{ 0x02bd04, KEY_5 },
{ 0x02bd05, KEY_6 },
{ 0x02bd06, KEY_7 },
{ 0x02bd07, KEY_8 },
{ 0x02bd08, KEY_9 },
{ 0x02bd09, KEY_0 },
{ 0x02bd0a, KEY_MUTE },
{ 0x02bd0b, KEY_CYCLEWINDOWS }, /* yellow, [min / max] */
{ 0x02bd0c, KEY_VIDEO }, /* TV / AV */
{ 0x02bd0e, KEY_VOLUMEDOWN },
{ 0x02bd0f, KEY_TIME }, /* TimeShift */
{ 0x02bd10, KEY_RIGHT }, /* right arrow */
{ 0x02bd11, KEY_LEFT }, /* left arrow */
{ 0x02bd12, KEY_UP }, /* up arrow */
{ 0x02bd13, KEY_DOWN }, /* down arrow */
{ 0x02bd14, KEY_POWER2 }, /* [red] */
{ 0x02bd15, KEY_OK }, /* OK */
{ 0x02bd16, KEY_STOP },
{ 0x02bd17, KEY_CAMERA }, /* Snapshot */
{ 0x02bd18, KEY_CHANNELUP },
{ 0x02bd19, KEY_RECORD },
{ 0x02bd1a, KEY_CHANNELDOWN },
{ 0x02bd1c, KEY_ESC }, /* Esc */
{ 0x02bd1e, KEY_PLAY },
{ 0x02bd1f, KEY_VOLUMEUP },
{ 0x02bd40, KEY_PAUSE },
{ 0x02bd41, KEY_FASTFORWARD }, /* FF >> */
{ 0x02bd42, KEY_REWIND }, /* FR << */
{ 0x02bd43, KEY_ZOOM }, /* [window + mouse pointer] */
{ 0x02bd44, KEY_SHUFFLE }, /* Shuffle */
{ 0x02bd45, KEY_INFO }, /* [red (I)] */
};
static struct rc_keymap total_media_in_hand_map = {
.map = {
.scan = total_media_in_hand,
.size = ARRAY_SIZE(total_media_in_hand),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_TOTAL_MEDIA_IN_HAND,
}
};
static int __init init_rc_map_total_media_in_hand(void)
{
return ir_register_map(&total_media_in_hand_map);
}
static void __exit exit_rc_map_total_media_in_hand(void)
{
ir_unregister_map(&total_media_in_hand_map);
}
module_init(init_rc_map_total_media_in_hand)
module_exit(exit_rc_map_total_media_in_hand)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");

View File

@@ -0,0 +1,80 @@
/*
* TrekStor remote controller keytable
*
* Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <media/rc-map.h>
/* TrekStor DVB-T USB Stick remote controller. */
/* Imported from af9015.h.
Initial keytable was from Marc Schneider <macke@macke.org> */
static struct ir_scancode trekstor[] = {
{ 0x0084, KEY_0 },
{ 0x0085, KEY_MUTE }, /* Mute */
{ 0x0086, KEY_HOMEPAGE }, /* Home */
{ 0x0087, KEY_UP }, /* Up */
{ 0x0088, KEY_OK }, /* OK */
{ 0x0089, KEY_RIGHT }, /* Right */
{ 0x008a, KEY_FASTFORWARD }, /* Fast forward */
{ 0x008b, KEY_VOLUMEUP }, /* Volume + */
{ 0x008c, KEY_DOWN }, /* Down */
{ 0x008d, KEY_PLAY }, /* Play/Pause */
{ 0x008e, KEY_STOP }, /* Stop */
{ 0x008f, KEY_EPG }, /* Info/EPG */
{ 0x0090, KEY_7 },
{ 0x0091, KEY_4 },
{ 0x0092, KEY_1 },
{ 0x0093, KEY_CHANNELDOWN }, /* Channel - */
{ 0x0094, KEY_8 },
{ 0x0095, KEY_5 },
{ 0x0096, KEY_2 },
{ 0x0097, KEY_CHANNELUP }, /* Channel + */
{ 0x0098, KEY_9 },
{ 0x0099, KEY_6 },
{ 0x009a, KEY_3 },
{ 0x009b, KEY_VOLUMEDOWN }, /* Volume - */
{ 0x009c, KEY_TV }, /* TV */
{ 0x009d, KEY_RECORD }, /* Record */
{ 0x009e, KEY_REWIND }, /* Rewind */
{ 0x009f, KEY_LEFT }, /* Left */
};
static struct rc_keymap trekstor_map = {
.map = {
.scan = trekstor,
.size = ARRAY_SIZE(trekstor),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_TREKSTOR,
}
};
static int __init init_rc_map_trekstor(void)
{
return ir_register_map(&trekstor_map);
}
static void __exit exit_rc_map_trekstor(void)
{
ir_unregister_map(&trekstor_map);
}
module_init(init_rc_map_trekstor)
module_exit(exit_rc_map_trekstor)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");

View File

@@ -0,0 +1,82 @@
/* tt-1500.h - Keytable for tt_1500 Remote Controller
*
* keymap imported from ir-keymaps.c
*
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* for the Technotrend 1500 bundled remotes (grey and black): */
static struct ir_scancode tt_1500[] = {
{ 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 },
{ 0x3a, KEY_RECORD }, /* these keys are only in the black remote */
{ 0x3b, KEY_PLAY },
{ 0x3c, KEY_STOP },
{ 0x3d, KEY_REWIND },
{ 0x3e, KEY_PAUSE },
{ 0x3f, KEY_FORWARD },
};
static struct rc_keymap tt_1500_map = {
.map = {
.scan = tt_1500,
.size = ARRAY_SIZE(tt_1500),
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
.name = RC_MAP_TT_1500,
}
};
static int __init init_rc_map_tt_1500(void)
{
return ir_register_map(&tt_1500_map);
}
static void __exit exit_rc_map_tt_1500(void)
{
ir_unregister_map(&tt_1500_map);
}
module_init(init_rc_map_tt_1500)
module_exit(exit_rc_map_tt_1500)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");

Some files were not shown because too many files have changed in this diff Show More