All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Smirl <jonsmirl@gmail.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: "David Härdeman" <david@hardeman.nu>,
	"Andy Walls" <awalls@md.metrocast.net>,
	linux-input@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [RFC] Teach drivers/media/IR/ir-raw-event.c to use durations
Date: Wed, 7 Apr 2010 11:03:14 -0400	[thread overview]
Message-ID: <k2i9e4733911004070803ib02cf971k810c0b02971a2e67@mail.gmail.com> (raw)
In-Reply-To: <4BBC88AA.4030808@infradead.org>

On Wed, Apr 7, 2010 at 9:29 AM, Mauro Carvalho Chehab
<mchehab@infradead.org> wrote:
> On the implementation I did, each event is passed to each decoder serialized (yet, as one keystroke
> is a series of events, it behaves as if they are processed in parallel). We might create separate
> kthreads for each decoder, and use a spinlock at kfifo, but I suspect that the end result will be
> very close and we'll have more threads interfering at the samples collect, especially on those
> (broken) hardware that don't have IRQ's to indicate a state transition, so the driver needs
> to poll the samples.

Polling should be the driver's problem. They can set up a timer
interrupt and do it that way. Do all of the protocols have a long
enough lead one for a timer tick to catch them? If so, look for it in
the timer event, then go into a polling loop. You'd be way better off
buying new hardware since your video is going to stop while this
pooling loop runs. Do modern serial ports interrupt on DTR or whatever
those Iguana devices use? What is an example of a polled input device?
I can't think of one, even IR diode on mic input is interrupt driven
(that require a special ALSA driver to pass the data into RC core).

No need to use different kthreads for each protocol decoder, but don't
lock up the default kernel thread waiting for a user space response.
What I meant by parallel was that pulses are fed one at a time into
each of the decoders, don't wait for a long space and then feed the
entire message into the decoders.

>
> --
>
> Cheers,
> Mauro
>



-- 
Jon Smirl
jonsmirl@gmail.com

  reply	other threads:[~2010-04-07 15:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100406104410.710253548@hardeman.nu>
2010-04-06 10:48 ` [RFC] Teach drivers/media/IR/ir-raw-event.c to use durations David Härdeman
2010-04-06 14:26   ` Mauro Carvalho Chehab
2010-04-06 14:26     ` Mauro Carvalho Chehab
2010-04-07 10:20     ` Andy Walls
2010-04-07 11:42       ` David Härdeman
2010-04-07 11:42         ` David Härdeman
2010-04-07 13:11         ` Jon Smirl
2010-04-07 13:29           ` Mauro Carvalho Chehab
2010-04-07 15:03             ` Jon Smirl [this message]
2010-04-08  0:28         ` Andy Walls
2010-04-07 11:09     ` David Härdeman
2010-04-07 13:17       ` Mauro Carvalho Chehab

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=k2i9e4733911004070803ib02cf971k810c0b02971a2e67@mail.gmail.com \
    --to=jonsmirl@gmail.com \
    --cc=awalls@md.metrocast.net \
    --cc=david@hardeman.nu \
    --cc=linux-input@vger.kernel.org \
    --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.