linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: "David Härdeman" <david@hardeman.nu>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
	Jarod Wilson <jarod@wilsonet.com>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] [media] rc: do not sleep when the driver blocks on IR completion
Date: Sat, 25 Aug 2012 11:13:51 +0100	[thread overview]
Message-ID: <20120825101351.GA26760@pequod.mess.org> (raw)
In-Reply-To: <20120825092526.GA4285@hardeman.nu>

On Sat, Aug 25, 2012 at 11:25:26AM +0200, David Härdeman wrote:
> On Sat, Aug 25, 2012 at 12:26:25AM +0100, Sean Young wrote:
> >On Sat, Aug 25, 2012 at 12:05:18AM +0200, David Härdeman wrote:
> >> On Thu, Aug 23, 2012 at 10:18:35PM +0100, Sean Young wrote:
> >> >Some drivers wait for the IR device to complete sending before
> >> >returning, so sleeping should not be done.
> >> 
> >> I'm not quite sure what the purpose is. Even if a driver waits for TX to
> >> finish, the lirc imposed sleep isn't harmful in any way.
> >
> >Due to rounding errors, clock skew and different start times, the sleep 
> >might be waiting for a different amount of time than the hardware took 
> >to send it. The sleep is a bit of a kludge, let alone if the driver
> >can wait for the hardware to tell you when it's done.
> 
> I don't see the sleep as much of a problem right now. Whether the
> hardware says its done or if we simulate the same thing in the lirc
> layer, the entire concept is a bit of a kludge :)

It's not making it any better.

> >Also, your change calculates the amount of us to sleep after transmission, 
> >so if the transmission buffer was modified by the driver, the calculated 
> >sleep might not make sense. Both winbond-cir and iguanair do this.
> 
> Oh, right, I'd overlooked this. I have written patches for winbond-cir
> (which makes it asynchronous and leaves the txbuffer alone) and iguanair
> (to leave the txbuffer alone). I'll post them sometime today when I've
> done some more tests.

If this is the solution we're going for, then I've got a patch for iguanair
which leaves the txbuffer alone and is ready and tested. I'll send it out
in the next half hour.


Sean

      reply	other threads:[~2012-08-25 10:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23 21:18 [PATCH] [media] rc: do not sleep when the driver blocks on IR completion Sean Young
2012-08-24 22:05 ` David Härdeman
2012-08-24 23:26   ` Sean Young
2012-08-25  9:25     ` David Härdeman
2012-08-25 10:13       ` Sean Young [this message]

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=20120825101351.GA26760@pequod.mess.org \
    --to=sean@mess.org \
    --cc=david@hardeman.nu \
    --cc=jarod@wilsonet.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).