public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Gregor Jasny <gjasny@googlemail.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Ulrich Eckhardt <uli-lirc@uli-eckhardt.de>
Subject: Re: Need help with ir-keytable imon bug report
Date: Thu, 16 Jun 2016 22:02:31 -0300	[thread overview]
Message-ID: <20160616220231.69616e84@recife.lan> (raw)
In-Reply-To: <ac402439-e317-9d83-6c70-df592cc3cf63@googlemail.com>

HI Gregor,

Em Wed, 15 Jun 2016 22:25:06 +0200
Gregor Jasny <gjasny@googlemail.com> escreveu:

> Hello,
> 
> could someone please help me triaging the following ir-keytable bug? The
> reporter complains that the 'other' IR protocol results in double clicks
> and we should set the device to RC6 instead:
> 
> https://bugs.launchpad.net/ubuntu/+source/v4l-utils/+bug/1579760
> 
> This is what we have in v4l-utils:
> https://git.linuxtv.org/v4l-utils.git/tree/utils/keytable/rc_keymaps/imon_pad

The way it works is that the keymap table comes from the Kernel driver.

The scripts at v4l-utils just copies whatever is there.

Please notice that the IMON keymap is used by only one Kernel driver:
drivers/media/rc/imon.c, with supports two different protocols: RC6 and
a proprietary one (the driver calls it iMON protocol).
The driver actually supports two types of IR key maps, depending
on the protocol:

	if (ictx->rc_type == RC_BIT_RC6_MCE)
		rdev->map_name = RC_MAP_IMON_MCE;
	else
		rdev->map_name = RC_MAP_IMON_PAD;

In other words, it uses either the code at:
	drivers/media/IR/keymaps/rc-imon-pad.c (for the IMON protocol)
or
	drivers/media/rc/keymaps/rc-imon-mce.c (for RC6)

I suspect that the user is selecting the wrong keymap on the BZ
you mentioned. It should be using: 
	utils/keytable/rc_keymaps/imon_mce

if his device came with a RC6 IR. There's another possibility:
maybe some newer devices come with a different keymap than the
one available when the driver was originally written.

That's said, from his report:

	$ sudo ir-keytable
	Found /sys/class/rc/rc0/ (/dev/input/event4) with:
	 Driver imon, table rc-imon-pad
	 Supported protocols: other

It should be listing both "other" and "RC6" protocols there.
It sounds a Kernel regression. I remember one Kernel patch once
broke the list of protocols. Maybe the fix patch were not applied
on Ubuntu, or maybe some other regression happened.

-- 
Thanks,
Mauro

      reply	other threads:[~2016-06-17  1:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15 20:25 Need help with ir-keytable imon bug report Gregor Jasny
2016-06-17  1:02 ` 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=20160616220231.69616e84@recife.lan \
    --to=mchehab@osg.samsung.com \
    --cc=gjasny@googlemail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=uli-lirc@uli-eckhardt.de \
    /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