public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Walls <awalls@md.metrocast.net>
To: Christoph Bartelmus <lirc@bartelmus.de>
Cc: maximlevitsky@gmail.com, jarod@wilsonet.com,
	linux-input@vger.kernel.org, linux-media@vger.kernel.org,
	lirc-list@lists.sourceforge.net, mchehab@redhat.com
Subject: Re: [PATCH 0/9 v2] IR: few fixes, additions and ENE driver
Date: Thu, 29 Jul 2010 22:03:30 -0400	[thread overview]
Message-ID: <1280455410.15737.58.camel@localhost> (raw)
In-Reply-To: <BTlN5mEJjFB@christoph>

On Thu, 2010-07-29 at 19:15 +0200, Christoph Bartelmus wrote:
> on 29 Jul 10 at 19:26, Maxim Levitsky wrote:
> > On Thu, 2010-07-29 at 11:38 -0400, Andy Walls wrote:
> >> On Thu, 2010-07-29 at 17:41 +0300, Maxim Levitsky wrote:
> >>> On Thu, 2010-07-29 at 09:23 +0200, Christoph Bartelmus wrote:

Hi Christoph, Mauro, and Jarrod

> When timeout reports are enabled the sequence must be:
> <pulse> <timeout> <space> <pulse>
> where <timeout> is optional.

OK.  This is some of the detail I needed.

I'm looking at the master branch of Jarrod's wip git repo, but:


1. I don't see how a timeout report is going to make it through 

	drivers/media/IR/ir-lirc-codec.c:lir_lirc_decode()

I guess I'll have to add a "flags" field (or something) to 

	include/media/ir_core.h:struct ir_raw_event

to modify the events beyond just mark or space reports.

Mauro, do you have any preferences or comments here?



2. The in-kernel decoders normally need a the final space to close out
the decoding, so the above sequence will cause them to wait.  It would
only really be noticiable if no repeat came from the remote, but it
still would be annoying.

If I send a space for the timeout to get the in kernel decoders to close
out decoding, then I end up sending a double space out to LIRC, which I
just read will confuse LIRC.  

So...

If I'm going to add a timeout event flag to struct ir_raw_event, I
suppose we could either:

	a. have the current in kernel decoders interpret an
	   ir_raw_event with a timeout event as a cue to conclude
           decoding the current pulse train

	b. add a "finish decode" flag and have the in kernel decoders
	   respond to that.

I beleive this will also let the in-kernel decoders still respond to
final space as they currently do.

Objections? comments?


3.  When my hardware times out, it stops measuring anything, until it
sees a new edge.  For short timeout settings (smaller than the
intertransmission gap), I will have generate a space in software to
provide the length of the gap.

I'll have to store the time of reading the timeout flag of the hardware
Rx FIFO, compute an approximate gap length when the next mark
measurement comes in, and insert a the space.  The gaps space time will
only be approximate, as the Rx FIFO watermark is set to interrupt at 4
measurements in the FIFO.



If I can't do #1 & #2 above, I'm not sure how I can send any in band
signaling out to user space.

Regards,
Andy

> lircd will not work when you leave out the space. It must know the exact  
> time between the pulses. Some hardware generates timeout reports that are  
> too short to distinguish between spaces that are so short that the next  
> sequence can be interpreted as a repeat or longer spaces which indicate  
> that this is a new key press.
> 
> Christoph



  parent reply	other threads:[~2010-07-30  2:03 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28 23:40 Maxim Levitsky
2010-07-28 23:40 ` [PATCH 1/9] IR: Kconfig fixes Maxim Levitsky
2010-07-28 23:40 ` [PATCH 2/9] IR: minor fixes: Maxim Levitsky
2010-07-28 23:40 ` [PATCH 3/9] IR: replace spinlock with mutex Maxim Levitsky
2010-07-28 23:40 ` [PATCH 4/9] IR: add helper function for hardware with small o/b buffer Maxim Levitsky
2010-07-28 23:40 ` [PATCH 5/9] IR: extend interfaces to support more device settings Maxim Levitsky
2010-07-29  7:25   ` Christoph Bartelmus
2010-07-29 15:27     ` Maxim Levitsky
2010-07-29 17:05       ` Christoph Bartelmus
2010-07-28 23:40 ` [PATCH 6/9] IR: Allow not to compile keymaps in Maxim Levitsky
2010-07-28 23:40 ` [PATCH 7/9] IR: report unknown scancodes the in-kernel decoders found Maxim Levitsky
2010-07-28 23:40 ` [PATCH 8/9] STAGING: remove lirc_ene0100 driver Maxim Levitsky
2010-07-28 23:40 ` [PATCH 9/9] IR: Port ene driver to new IR subsystem and enable it Maxim Levitsky
2010-07-29  3:52 ` [PATCH 0/9 v2] IR: few fixes, additions and ENE driver Jarod Wilson
2010-07-29 15:30   ` Maxim Levitsky
2010-07-29 15:26     ` Jarod Wilson
2010-07-29  7:23 ` <kein Betreff> Christoph Bartelmus
2010-07-29 14:41   ` [PATCH 0/9 v2] IR: few fixes, additions and ENE driver Maxim Levitsky
2010-07-29 15:38     ` Andy Walls
2010-07-29 16:26       ` Maxim Levitsky
2010-07-29 16:58         ` Andy Walls
2010-07-29 17:15         ` Christoph Bartelmus
2010-07-29 17:35           ` Maxim Levitsky
2010-07-29 19:35             ` Christoph Bartelmus
2010-07-29 20:04               ` Maxim Levitsky
2010-07-29 21:28                 ` Jarod Wilson
2010-07-29 21:57                   ` Jarod Wilson
2010-07-29 22:07                     ` Maxim Levitsky
2010-07-29 22:24                       ` Maxim Levitsky
2010-07-30  2:03           ` Andy Walls [this message]
2010-07-29 17:17       ` Christoph Bartelmus
2010-07-29 16:58     ` Christoph Bartelmus
2010-07-29 17:43       ` Maxim Levitsky
2010-07-29 19:42         ` Christoph Bartelmus
2010-07-29 19:58           ` Maxim Levitsky
2010-07-29 19:21       ` Jarod Wilson
  -- strict thread matches above, loose matches on Subject: below --
2010-07-30  2:17 Maxim Levitsky

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=1280455410.15737.58.camel@localhost \
    --to=awalls@md.metrocast.net \
    --cc=jarod@wilsonet.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=lirc-list@lists.sourceforge.net \
    --cc=lirc@bartelmus.de \
    --cc=maximlevitsky@gmail.com \
    --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