From: Anton Blanchard <anton@samba.org>
To: "David Härdeman" <david@hardeman.nu>
Cc: <mchehab@infradead.org>, <linux-media@vger.kernel.org>
Subject: Re: [PATCH 3/3] [media] winbond-cir: Adjust sample frequency to improve reliability
Date: Mon, 9 Jul 2012 12:02:08 +1000 [thread overview]
Message-ID: <20120709120208.446f2bdf@kryten> (raw)
In-Reply-To: <9c21e63d50aba0e550a69a691dd12860@hardeman.nu>
Hi David,
> Just to make sure something like that isn't happening, could you
> correct the line in wbcir_irq_rx() which currently reads:
>
> rawir.duration = US_TO_NS((irdata & 0x7F) * 10);
>
> so that it reads
>
> rawir.duration = US_TO_NS(((irdata & 0x7F) + 1) * 10);
Sure, I have added the change. This is what my diff to mainline looks
like right now:
diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
index 342c2c8..6381c11 100644
--- a/drivers/media/rc/winbond-cir.c
+++ b/drivers/media/rc/winbond-cir.c
@@ -232,7 +232,7 @@ MODULE_PARM_DESC(invert, "Invert the signal from the IR receiver");
static bool txandrx; /* default = 0 */
module_param(txandrx, bool, 0444);
-MODULE_PARM_DESC(invert, "Allow simultaneous TX and RX");
+MODULE_PARM_DESC(txandrx, "Allow simultaneous TX and RX");
static unsigned int wake_sc = 0x800F040C;
module_param(wake_sc, uint, 0644);
@@ -358,7 +358,8 @@ wbcir_irq_rx(struct wbcir_data *data, struct pnp_dev *device)
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) + 1) * 10);
+ printk(KERN_DEBUG "%x %d %d\n", irdata, rawir.pulse, rawir.duration);
ir_raw_event_store_with_filter(data->dev, &rawir);
}
@@ -1026,6 +1027,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id)
data->dev->input_id.product = WBCIR_ID_FAMILY;
data->dev->input_id.version = WBCIR_ID_CHIP;
data->dev->map_name = RC_MAP_RC6_MCE;
+ data->dev->timeout = MS_TO_NS(100);
data->dev->s_idle = wbcir_idle_rx;
data->dev->s_tx_mask = wbcir_txmask;
data->dev->s_tx_carrier = wbcir_txcarrier;
Here is the debug output:
http://ozlabs.org/~anton/winbond.log1.gz
> Another possibility is that the printk in the interrupt handler causes
> overhead...could you do a debug run without the printk in the
> interrupt handler?
Here is the output without the printk in the interrupt handler:
http://ozlabs.org/~anton/winbond.log2.gz
Anton
next prev parent reply other threads:[~2012-07-09 2:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 1:58 [PATCH 1/3] [media] winbond-cir: Fix txandrx module info Anton Blanchard
2012-07-02 1:58 ` [PATCH 2/3] [media] winbond-cir: Initialise timeout, driver_type and allowed_protos Anton Blanchard
2012-07-03 20:22 ` David Härdeman
2012-07-02 1:59 ` [PATCH 3/3] [media] winbond-cir: Adjust sample frequency to improve reliability Anton Blanchard
2012-07-03 20:28 ` David Härdeman
2012-07-05 10:30 ` Anton Blanchard
2012-07-05 11:04 ` Konstantin Dimitrov
2012-07-05 14:13 ` David Härdeman
2012-07-05 14:39 ` Konstantin Dimitrov
2012-07-05 14:45 ` David Härdeman
2012-07-05 14:56 ` Konstantin Dimitrov
2012-07-09 2:02 ` Anton Blanchard [this message]
2012-08-20 21:40 ` David Härdeman
2012-07-03 20:18 ` [PATCH 1/3] [media] winbond-cir: Fix txandrx module info David Härdeman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120709120208.446f2bdf@kryten \
--to=anton@samba.org \
--cc=david@hardeman.nu \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.