diff options
author | Maxim Levitsky <maximlevitsky@gmail.com> | 2010-07-31 10:59:23 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-08 22:43:00 -0400 |
commit | e589333f346b58f8da5bb8152e1219c52d375ccc (patch) | |
tree | 4ff05f4f9c5a06c532084ed46b3612ebeec1e21c /include/media | |
parent | 4a702ebf61120906696f8366dd2be0653b1643e3 (diff) |
V4L/DVB: IR: extend interfaces to support more device settings
LIRC: add new IOCTL that enables learning mode (wide band receiver)
Still missing features: carrier report & timeout reports.
Will need to pack these into ir_raw_event
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/ir-core.h | 12 | ||||
-rw-r--r-- | include/media/lirc.h | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/include/media/ir-core.h b/include/media/ir-core.h index a781045aeed5..eb7fddf8f607 100644 --- a/include/media/ir-core.h +++ b/include/media/ir-core.h | |||
@@ -44,6 +44,8 @@ enum rc_driver_type { | |||
44 | * @timeout: optional time after which device stops sending data | 44 | * @timeout: optional time after which device stops sending data |
45 | * @min_timeout: minimum timeout supported by device | 45 | * @min_timeout: minimum timeout supported by device |
46 | * @max_timeout: maximum timeout supported by device | 46 | * @max_timeout: maximum timeout supported by device |
47 | * @rx_resolution : resolution (in ns) of input sampler | ||
48 | * @tx_resolution: resolution (in ns) of output sampler | ||
47 | * @priv: driver-specific data, to be used on the callbacks | 49 | * @priv: driver-specific data, to be used on the callbacks |
48 | * @change_protocol: allow changing the protocol used on hardware decoders | 50 | * @change_protocol: allow changing the protocol used on hardware decoders |
49 | * @open: callback to allow drivers to enable polling/irq when IR input device | 51 | * @open: callback to allow drivers to enable polling/irq when IR input device |
@@ -52,9 +54,12 @@ enum rc_driver_type { | |||
52 | * is opened. | 54 | * is opened. |
53 | * @s_tx_mask: set transmitter mask (for devices with multiple tx outputs) | 55 | * @s_tx_mask: set transmitter mask (for devices with multiple tx outputs) |
54 | * @s_tx_carrier: set transmit carrier frequency | 56 | * @s_tx_carrier: set transmit carrier frequency |
57 | * @s_tx_duty_cycle: set transmit duty cycle (0% - 100%) | ||
58 | * @s_rx_carrier: inform driver about carrier it is expected to handle | ||
55 | * @tx_ir: transmit IR | 59 | * @tx_ir: transmit IR |
56 | * @s_idle: optional: enable/disable hardware idle mode, upon which, | 60 | * @s_idle: optional: enable/disable hardware idle mode, upon which, |
57 | * device doesn't interrupt host untill it sees IR data | 61 | device doesn't interrupt host until it sees IR pulses |
62 | * @s_learning_mode: enable wide band receiver used for learning | ||
58 | */ | 63 | */ |
59 | struct ir_dev_props { | 64 | struct ir_dev_props { |
60 | enum rc_driver_type driver_type; | 65 | enum rc_driver_type driver_type; |
@@ -65,6 +70,8 @@ struct ir_dev_props { | |||
65 | u32 min_timeout; | 70 | u32 min_timeout; |
66 | u32 max_timeout; | 71 | u32 max_timeout; |
67 | 72 | ||
73 | u32 rx_resolution; | ||
74 | u32 tx_resolution; | ||
68 | 75 | ||
69 | void *priv; | 76 | void *priv; |
70 | int (*change_protocol)(void *priv, u64 ir_type); | 77 | int (*change_protocol)(void *priv, u64 ir_type); |
@@ -72,8 +79,11 @@ struct ir_dev_props { | |||
72 | void (*close)(void *priv); | 79 | void (*close)(void *priv); |
73 | int (*s_tx_mask)(void *priv, u32 mask); | 80 | int (*s_tx_mask)(void *priv, u32 mask); |
74 | int (*s_tx_carrier)(void *priv, u32 carrier); | 81 | int (*s_tx_carrier)(void *priv, u32 carrier); |
82 | int (*s_tx_duty_cycle)(void *priv, u32 duty_cycle); | ||
83 | int (*s_rx_carrier_range)(void *priv, u32 min, u32 max); | ||
75 | int (*tx_ir)(void *priv, int *txbuf, u32 n); | 84 | int (*tx_ir)(void *priv, int *txbuf, u32 n); |
76 | void (*s_idle)(void *priv, int enable); | 85 | void (*s_idle)(void *priv, int enable); |
86 | int (*s_learning_mode)(void *priv, int enable); | ||
77 | }; | 87 | }; |
78 | 88 | ||
79 | struct ir_input_dev { | 89 | struct ir_input_dev { |
diff --git a/include/media/lirc.h b/include/media/lirc.h index 42c467c50519..6678a169fd9e 100644 --- a/include/media/lirc.h +++ b/include/media/lirc.h | |||
@@ -77,6 +77,7 @@ | |||
77 | #define LIRC_CAN_SET_REC_FILTER 0x08000000 | 77 | #define LIRC_CAN_SET_REC_FILTER 0x08000000 |
78 | 78 | ||
79 | #define LIRC_CAN_MEASURE_CARRIER 0x02000000 | 79 | #define LIRC_CAN_MEASURE_CARRIER 0x02000000 |
80 | #define LIRC_CAN_USE_WIDEBAND_RECEIVER 0x04000000 | ||
80 | 81 | ||
81 | #define LIRC_CAN_SEND(x) ((x)&LIRC_CAN_SEND_MASK) | 82 | #define LIRC_CAN_SEND(x) ((x)&LIRC_CAN_SEND_MASK) |
82 | #define LIRC_CAN_REC(x) ((x)&LIRC_CAN_REC_MASK) | 83 | #define LIRC_CAN_REC(x) ((x)&LIRC_CAN_REC_MASK) |
@@ -145,7 +146,7 @@ | |||
145 | * if enabled from the next key press on the driver will send | 146 | * if enabled from the next key press on the driver will send |
146 | * LIRC_MODE2_FREQUENCY packets | 147 | * LIRC_MODE2_FREQUENCY packets |
147 | */ | 148 | */ |
148 | #define LIRC_SET_MEASURE_CARRIER_MODE _IOW('i', 0x0000001d, __u32) | 149 | #define LIRC_SET_MEASURE_CARRIER_MODE _IOW('i', 0x0000001d, __u32) |
149 | 150 | ||
150 | /* | 151 | /* |
151 | * to set a range use | 152 | * to set a range use |
@@ -162,4 +163,6 @@ | |||
162 | #define LIRC_SETUP_START _IO('i', 0x00000021) | 163 | #define LIRC_SETUP_START _IO('i', 0x00000021) |
163 | #define LIRC_SETUP_END _IO('i', 0x00000022) | 164 | #define LIRC_SETUP_END _IO('i', 0x00000022) |
164 | 165 | ||
166 | #define LIRC_SET_WIDEBAND_RECEIVER _IOW('i', 0x00000023, __u32) | ||
167 | |||
165 | #endif | 168 | #endif |