public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <maurochehab@gmail.com>
To: Franklin Meng <fmeng2002@yahoo.com>
Cc: Douglas Schilling <dougsland@gmail.com>,
	maillist <linux-media@vger.kernel.org>
Subject: Re: [Patch] Kworld 315U remote support
Date: Wed, 10 Feb 2010 17:05:08 -0200	[thread overview]
Message-ID: <4B730364.8090406@gmail.com> (raw)
In-Reply-To: <311770.77952.qm@web32701.mail.mud.yahoo.com>

Franklin Meng wrote:
> Mauro, 
> 
> I tried out the ir_type change to the code and when I set it to IR_TYPE_NEC, I see messages in the log indicating that the key was not recognized.  Using IR_TYPE_OTHER seems to work ok.
> 
> My guess is that if I modify the keycodes IR_TYPE_NEC will work as well.

If it is displaying a log, it means that the protocol is NEC.
All you need is to add the 8 most significant bits to the table. In general,
this code is common to all keystrokes.

For example, this is the legacy keymap table for Hauppauge IR:

static struct ir_scancode ir_codes_hauppauge_new[] = {
        /* Keys 0 to 9 */
        { 0x00, KEY_0 },
        { 0x01, KEY_1 },
        { 0x02, KEY_2 },
        { 0x03, KEY_3 },
        { 0x04, KEY_4 },

The new table is:

static struct ir_scancode ir_codes_rc5_hauppauge_new[] = {
        /* Keys 0 to 9 */
        { 0x1e00, KEY_0 },
        { 0x1e01, KEY_1 },
        { 0x1e02, KEY_2 },
        { 0x1e03, KEY_3 },
        { 0x1e04, KEY_4 },

You'll notice that the only difference is that the code now has
"0x1e00" added to all keys, and that the new table has the
protocol properly indicated.

> Can I just use IR_TYPE_OTHER?  That seems like the most straight forward approach with the least amount of changes.  

The usage of IR_TYPE_OTHER disables some new API's that are shown
to userspace, that allows the replacement of the IR for a better one.

Due to that, the usage of IR_TYPE_OTHER is deprecated. 

We should really get rid of  all those legacy keymaps that don't 
inform the IR protocol, not allowing that the key sequences and protocols 
to  be properly seen on userspace and eventually replaced, if the user
wants to buy a powerful remote and associate other keys to his IR.

So, please don't use IR_TYPE_OTHER.

Cheers,
Mauro

      reply	other threads:[~2010-02-10 19:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-07 19:53 [Patch] Kworld 315U remote support Franklin Meng
2010-02-08 13:13 ` Mauro Carvalho Chehab
2010-02-10 18:53   ` Franklin Meng
2010-02-10 19:05     ` Mauro Carvalho Chehab [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=4B730364.8090406@gmail.com \
    --to=maurochehab@gmail.com \
    --cc=dougsland@gmail.com \
    --cc=fmeng2002@yahoo.com \
    --cc=linux-media@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox