All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Härdeman" <david@hardeman.nu>
To: Jarod Wilson <jarod@wilsonet.com>
Cc: Jarod Wilson <jarod@redhat.com>,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	<linux-media@vger.kernel.org>
Subject: Re: [RFC PATCH 0/2] Apple remote support
Date: Thu, 04 Nov 2010 13:16:22 +0100	[thread overview]
Message-ID: <37bb20b43afce52964a95a72a725b0e4@hardeman.nu> (raw)
In-Reply-To: <AANLkTi=c_g7nxCFWsVMYM-tJr68V1iMzhSyJ7=g9VLnR@mail.gmail.com>

On Tue, 2 Nov 2010 16:42:05 -0400, Jarod Wilson <jarod@wilsonet.com>
wrote:
> On Mon, Nov 1, 2010 at 5:56 PM, David Härdeman <david@hardeman.nu>
wrote:
>> On Sat, Oct 30, 2010 at 10:32:14PM -0400, Jarod Wilson wrote:
>>> On Sat, Oct 30, 2010 at 7:36 PM, David Härdeman <david@hardeman.nu>
>>> wrote:
>>> > In that case, one solution would be:
>>> >
>>> > * using the full 32 bit scancode
>>> > * add a module parameter to squash the ID byte to zero
>>> > * default the module parameter to true
>>> > * create a keymap suitable for ID = 0x00
>>> >
>>> > Users who really want to distinguish remotes can then change the
>>> > module
>>> > parameter and generate a keymap for their particular ID. Most others
>>> > will be blissfully unaware of this feature.
>>>
>>> I was thinking something similar but slightly different. I think ID =
>>> 0x00 is a valid ID byte, so I was thinking static int pair_id = -1; to
>>> start out. This would be a stand-alone apple-only decoder, so we'd
>>> look for the apple identifier bytes, bail if not found. We'd also look
>>> at the ID byte, and if pair_id is 0-255, we'd bail if the ID byte
>>> didn't match it. The scancode we'd actually use to match the key table
>>> would be just the one command byte. It seems to make sense in my head,
>>> at least.
>>
>> But you'd lose the ability to support two different remotes with
>> different ID's (if you want different mappings in the keymap).
> 
> Hm, true. How likely are people to want to do that, I wonder?
> 
> So alternatively, rather than a pair_id param, could use a
> check_pair_byte param. If 0, then just & 0xff the pair byte, and have
> 0xff there in the default keymap (using all 32 bits for each code)

Yes, that's what I proposed above :) (just & 0x00 the pair byte)

-- 
David Härdeman

  reply	other threads:[~2010-11-04 12:16 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29  3:11 [RFC PATCH 0/2] Apple remote support Jarod Wilson
2010-10-29  3:13 ` [RFC PATCH 1/2] ir-nec-decoder: decode Apple's NEC remote variant Jarod Wilson
2010-10-29 22:15   ` Andy Walls
2010-10-29  3:13 ` [RFC PATCH 2/2] IR: add Apple remote keymap Jarod Wilson
2010-10-29  3:15 ` [RFC PATCH 0/2] Apple remote support Jarod Wilson
2010-10-29 13:46   ` Mauro Carvalho Chehab
2010-10-29 15:11     ` Jarod Wilson
2010-10-29 19:17       ` David Härdeman
2010-10-29 19:27         ` Jarod Wilson
2010-10-29 19:59           ` David Härdeman
2010-10-29 20:09             ` Jarod Wilson
2010-10-30 23:36               ` David Härdeman
2010-10-31  2:32                 ` Jarod Wilson
2010-11-01 21:56                   ` David Härdeman
2010-11-02 20:42                     ` Jarod Wilson
2010-11-04 12:16                       ` David Härdeman [this message]
2010-11-04 15:54                         ` Jarod Wilson
2010-11-04 19:38                           ` David Härdeman
2010-11-04 19:43                             ` Mauro Carvalho Chehab
2010-11-05 13:27                               ` David Härdeman
2010-11-05 14:04                                 ` Christopher Harrington
2010-11-07 19:01                                   ` Jarod Wilson
2010-11-15  4:11                                 ` Jarod Wilson
2010-11-15 18:39                                   ` David Härdeman
2010-11-16 12:08                                   ` Mauro Carvalho Chehab
2010-11-16 23:26                                     ` David Härdeman
2010-11-18 16:33                                       ` Jarod Wilson
2010-11-18 20:43                                         ` David Härdeman
2010-11-18 20:49                                           ` Jarod Wilson
2010-11-18 20:59                                             ` Mauro Carvalho Chehab
2010-11-19 23:55                                               ` 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=37bb20b43afce52964a95a72a725b0e4@hardeman.nu \
    --to=david@hardeman.nu \
    --cc=jarod@redhat.com \
    --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 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.