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/ir-core.h | |
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/ir-core.h')
-rw-r--r-- | include/media/ir-core.h | 12 |
1 files changed, 11 insertions, 1 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 { |