media: rc: ite-cir: lower timeout and extend allowed timeout range
The minimum possible timeout of ite-cir is 8 samples, which is typically about 70us. The driver however changes the FIFO trigger level from the hardware's default of 1 byte to 17 bytes, so the minimum usable timeout value is 17 * 8 samples, which is typically about 1.2ms. Tests showed that using timeouts down to 1.2ms actually work fine. The current default timeout of 200ms is much longer than necessary and the maximum timeout of 1s seems to have been chosen a bit arbitrarily. So change the minimum timeout to the driver's limit of 17 * 8 samples and bring timeout and maximum timeout in line with the settings of many other receivers. Signed-off-by: Matthias Reichl <hias@horus.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Родитель
5dae9cea2a
Коммит
0630efeee8
|
@ -1561,9 +1561,11 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
|
||||||
rdev->close = ite_close;
|
rdev->close = ite_close;
|
||||||
rdev->s_idle = ite_s_idle;
|
rdev->s_idle = ite_s_idle;
|
||||||
rdev->s_rx_carrier_range = ite_set_rx_carrier_range;
|
rdev->s_rx_carrier_range = ite_set_rx_carrier_range;
|
||||||
rdev->min_timeout = ITE_MIN_IDLE_TIMEOUT;
|
/* FIFO threshold is 17 bytes, so 17 * 8 samples minimum */
|
||||||
rdev->max_timeout = ITE_MAX_IDLE_TIMEOUT;
|
rdev->min_timeout = 17 * 8 * ITE_BAUDRATE_DIVISOR *
|
||||||
rdev->timeout = ITE_IDLE_TIMEOUT;
|
itdev->params.sample_period;
|
||||||
|
rdev->timeout = IR_DEFAULT_TIMEOUT;
|
||||||
|
rdev->max_timeout = 10 * IR_DEFAULT_TIMEOUT;
|
||||||
rdev->rx_resolution = ITE_BAUDRATE_DIVISOR *
|
rdev->rx_resolution = ITE_BAUDRATE_DIVISOR *
|
||||||
itdev->params.sample_period;
|
itdev->params.sample_period;
|
||||||
rdev->tx_resolution = ITE_BAUDRATE_DIVISOR *
|
rdev->tx_resolution = ITE_BAUDRATE_DIVISOR *
|
||||||
|
|
|
@ -154,13 +154,6 @@ struct ite_dev {
|
||||||
/* default carrier freq for when demodulator is off (Hz) */
|
/* default carrier freq for when demodulator is off (Hz) */
|
||||||
#define ITE_DEFAULT_CARRIER_FREQ 38000
|
#define ITE_DEFAULT_CARRIER_FREQ 38000
|
||||||
|
|
||||||
/* default idling timeout in ns (0.2 seconds) */
|
|
||||||
#define ITE_IDLE_TIMEOUT 200000000UL
|
|
||||||
|
|
||||||
/* limit timeout values */
|
|
||||||
#define ITE_MIN_IDLE_TIMEOUT 100000000UL
|
|
||||||
#define ITE_MAX_IDLE_TIMEOUT 1000000000UL
|
|
||||||
|
|
||||||
/* convert bits to us */
|
/* convert bits to us */
|
||||||
#define ITE_BITS_TO_NS(bits, sample_period) \
|
#define ITE_BITS_TO_NS(bits, sample_period) \
|
||||||
((u32) ((bits) * ITE_BAUDRATE_DIVISOR * sample_period))
|
((u32) ((bits) * ITE_BAUDRATE_DIVISOR * sample_period))
|
||||||
|
|
Загрузка…
Ссылка в новой задаче