16 #include <linux/module.h>
19 #define SONY_UNIT 600000
20 #define SONY_HEADER_PULSE (4 * SONY_UNIT)
21 #define SONY_HEADER_SPACE (1 * SONY_UNIT)
22 #define SONY_BIT_0_PULSE (1 * SONY_UNIT)
23 #define SONY_BIT_1_PULSE (2 * SONY_UNIT)
24 #define SONY_BIT_SPACE (1 * SONY_UNIT)
25 #define SONY_TRAILER_SPACE (10 * SONY_UNIT)
44 struct sony_dec *
data = &dev->
raw->sony;
51 if (!is_timing_event(ev)) {
60 IR_dprintk(2,
"Sony decode started at state %d (%uus %s)\n",
63 switch (data->state) {
124 switch (data->count) {
126 device = bitrev8((data->bits << 3) & 0xF8);
128 function = bitrev8((data->bits >> 4) & 0xFE);
131 device = bitrev8((data->bits >> 0) & 0xFF);
133 function = bitrev8((data->bits >> 7) & 0xFE);
136 device = bitrev8((data->bits >> 5) & 0xF8);
137 subdevice = bitrev8((data->bits >> 0) & 0xFF);
138 function = bitrev8((data->bits >> 12) & 0xFE);
141 IR_dprintk(1,
"Sony invalid bitcount %u\n", data->count);
145 scancode = device << 16 | subdevice << 8 |
function;
146 IR_dprintk(1,
"Sony(%u) scancode 0x%05x\n", data->count, scancode);
153 IR_dprintk(1,
"Sony decode failed at state %d (%uus %s)\n",
161 .decode = ir_sony_decode,
164 static int __init ir_sony_decode_init(
void)
172 static void __exit ir_sony_decode_exit(
void)