On Mon, Jul 02, 2012 at 11:59:37AM +1000, Anton Blanchard wrote:
>
>When using my Logitech Harmony remote I get regular dropped events
>(about 1 in every 3). Adjusting the sample frequency to 6us so we
>sample at a multiple of an RC-6 pulse (444us) fixes it.

Sounds weird.

The in-kernel RC6 decoder already has margins of around 50% for most
pulse/spaces (i.e. 444us +/- 222us). Changing the sample resolution from
10 to 6 us should have little to no effect on the RC6 decoding (also,
the Windows driver uses a 50us resolution IIRC).

Do you have a log of a successful and unsuccesful event (the timings
that is)?

>Signed-off-by: Anton Blanchard <an...@samba.org>
>---
>
>Index: linux/drivers/media/rc/winbond-cir.c
>===================================================================
>--- linux.orig/drivers/media/rc/winbond-cir.c  2012-07-01 14:54:28.993475033 
>+1000
>+++ linux/drivers/media/rc/winbond-cir.c       2012-07-01 14:55:50.500939910 
>+1000
>@@ -358,7 +358,7 @@ wbcir_irq_rx(struct wbcir_data *data, st
>               if (data->rxstate == WBCIR_RXSTATE_ERROR)
>                       continue;
>               rawir.pulse = irdata & 0x80 ? false : true;
>-              rawir.duration = US_TO_NS((irdata & 0x7F) * 10);
>+              rawir.duration = US_TO_NS((irdata & 0x7F) * 6);
>               ir_raw_event_store_with_filter(data->dev, &rawir);
>       }
> 
>@@ -874,8 +874,8 @@ wbcir_init_hw(struct wbcir_data *data)
>       /* prescaler 1.0, tx/rx fifo lvl 16 */
>       outb(0x30, data->sbase + WBCIR_REG_SP3_EXCR2);
> 
>-      /* Set baud divisor to sample every 10 us */
>-      outb(0x0F, data->sbase + WBCIR_REG_SP3_BGDL);
>+      /* Set baud divisor to sample every 6 us */
>+      outb(0x09, data->sbase + WBCIR_REG_SP3_BGDL);
>       outb(0x00, data->sbase + WBCIR_REG_SP3_BGDH);
> 
>       /* Set CEIR mode */
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to