[06/13] IR: nec decoder: fix repeat.

Message ID 1280456235-2024-7-git-send-email-maximlevitsky@gmail.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Maxim Levitsky July 30, 2010, 2:17 a.m. UTC
  Repeat space is 4 units, not 8.
Current code would never trigger a repeat.

However that isn't true for NECX, so repeat there
must be handled differently.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
---
 drivers/media/IR/ir-nec-decoder.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
  

Comments

Andy Walls July 30, 2010, 2:50 a.m. UTC | #1
On Fri, 2010-07-30 at 05:17 +0300, Maxim Levitsky wrote:
> Repeat space is 4 units, not 8.
> Current code would never trigger a repeat.


Yup.  Page 11, line (4)

http://www.datasheetcatalog.org/datasheet/nec/UPD6122G-002.pdf

Reviewed-by: Andy Walls <awalls@md.metrocast.net>

Regards,
Andy

> However that isn't true for NECX, so repeat there
> must be handled differently.
> 
> Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
> ---
>  drivers/media/IR/ir-nec-decoder.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c
> index 52e0f37..1c0cf03 100644
> --- a/drivers/media/IR/ir-nec-decoder.c
> +++ b/drivers/media/IR/ir-nec-decoder.c
> @@ -20,7 +20,7 @@
>  #define NEC_HEADER_PULSE	(16 * NEC_UNIT)
>  #define NECX_HEADER_PULSE	(8  * NEC_UNIT) /* Less common NEC variant */
>  #define NEC_HEADER_SPACE	(8  * NEC_UNIT)
> -#define NEC_REPEAT_SPACE	(8  * NEC_UNIT)
> +#define NEC_REPEAT_SPACE	(4  * NEC_UNIT)
>  #define NEC_BIT_PULSE		(1  * NEC_UNIT)
>  #define NEC_BIT_0_SPACE		(1  * NEC_UNIT)
>  #define NEC_BIT_1_SPACE		(3  * NEC_UNIT)


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c
index 52e0f37..1c0cf03 100644
--- a/drivers/media/IR/ir-nec-decoder.c
+++ b/drivers/media/IR/ir-nec-decoder.c
@@ -20,7 +20,7 @@ 
 #define NEC_HEADER_PULSE	(16 * NEC_UNIT)
 #define NECX_HEADER_PULSE	(8  * NEC_UNIT) /* Less common NEC variant */
 #define NEC_HEADER_SPACE	(8  * NEC_UNIT)
-#define NEC_REPEAT_SPACE	(8  * NEC_UNIT)
+#define NEC_REPEAT_SPACE	(4  * NEC_UNIT)
 #define NEC_BIT_PULSE		(1  * NEC_UNIT)
 #define NEC_BIT_0_SPACE		(1  * NEC_UNIT)
 #define NEC_BIT_1_SPACE		(3  * NEC_UNIT)