diff options
author | Jarod Wilson <jarod@redhat.com> | 2011-01-06 11:23:13 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-01-19 09:52:19 -0500 |
commit | 706c57d802394e2fe720ebc929234a678f94e716 (patch) | |
tree | f2ad5b3f1d87626cedc793cd4352a828436061fe /drivers/media | |
parent | 672dcd54774ea1b03da8f2baa1cdbf827927fc85 (diff) |
[media] rc/mceusb: timeout should be in ns, not us
Fixes an egregious bug in mceusb driver, where the receiver was being
put into idle mode far sooner than it should have, thanks to storing a
timeout value that in us where it should be ns. Basically, the receiver
kept going into idle mode before a trailing space had been fully
received, which was causing problems for some protocols, most notably
manifesting as lirc userspace never receiving a trailing space for any
rc5 signals.
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/rc/mceusb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index 2d9113493cf0..079353e5d558 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c | |||
@@ -816,7 +816,7 @@ static void mceusb_handle_command(struct mceusb_dev *ir, int index) | |||
816 | switch (ir->buf_in[index]) { | 816 | switch (ir->buf_in[index]) { |
817 | /* 2-byte return value commands */ | 817 | /* 2-byte return value commands */ |
818 | case MCE_CMD_S_TIMEOUT: | 818 | case MCE_CMD_S_TIMEOUT: |
819 | ir->rc->timeout = MS_TO_US((hi << 8 | lo) / 2); | 819 | ir->rc->timeout = MS_TO_NS((hi << 8 | lo) / 2); |
820 | break; | 820 | break; |
821 | 821 | ||
822 | /* 1-byte return value commands */ | 822 | /* 1-byte return value commands */ |
@@ -1060,7 +1060,7 @@ static struct rc_dev *mceusb_init_rc_dev(struct mceusb_dev *ir) | |||
1060 | rc->priv = ir; | 1060 | rc->priv = ir; |
1061 | rc->driver_type = RC_DRIVER_IR_RAW; | 1061 | rc->driver_type = RC_DRIVER_IR_RAW; |
1062 | rc->allowed_protos = RC_TYPE_ALL; | 1062 | rc->allowed_protos = RC_TYPE_ALL; |
1063 | rc->timeout = MS_TO_US(1000); | 1063 | rc->timeout = MS_TO_NS(1000); |
1064 | if (!ir->flags.no_tx) { | 1064 | if (!ir->flags.no_tx) { |
1065 | rc->s_tx_mask = mceusb_set_tx_mask; | 1065 | rc->s_tx_mask = mceusb_set_tx_mask; |
1066 | rc->s_tx_carrier = mceusb_set_tx_carrier; | 1066 | rc->s_tx_carrier = mceusb_set_tx_carrier; |