All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Sylwester Nawrocki <snjw23@gmail.com>
Subject: Re: [RFC PATCH 0/3] Improve Kconfig selection for media devices
Date: Mon, 28 May 2012 14:17:52 +0200	[thread overview]
Message-ID: <20120528141752.7e4c530e@stein> (raw)
In-Reply-To: <4FC363A5.1010802@redhat.com>

On May 28 Mauro Carvalho Chehab wrote:
> Em 28-05-2012 06:48, Stefan Richter escreveu:
> > c) The RC_CORE_SUPP help text gives the impression that RC core is
> > always needed if there is hardware with an IR feature.  But the firedtv
> > driver is a case where the driver directly works on top of the input
> > subsystem rather than on RC core.  Maybe there are more such cases.
> 
> All other drivers use RC_CORE, as we've replaced the existing implementations
> to use it, removing bad/inconsistent IR code implementations everywhere.
> The only driver left is firedtv.
[...]
> The right thing to do is to convert drivers/media/dvb/firewire/firedtv-rc.c
> to use rc-core. There are several issues with the current implementation:
> 
> 	- IR keycode tables are hardcoded;
> 	- There is a "magic" to convert a 16 bits scancode (NEC protocol?)
> 	  into a key;
> 	- There's no way to replace the existing table to an user-provided
> 	  one;

There are two tables:  An old mapping and a new mapping.  The new mapping
is copied into a newly allocated writable array.  It should be possible to
overwrite this array by means of EVIOCSKEYCODE ioctls.

If I remember correctly, the firedtv driver sources came only with the old
mapping table when they were submitted for upstream merge.  When I helped
to clean up the driver, I noticed that the two FireDTV C/CI and T/CI (which
I newly purchased at the time as test devices) emitted entirely different
scan codes than what the sources suggested.  I suppose the original driver
sources were written against older firmware or maybe older hardware
revisions, possibly even prototype hardware.  We would have to get hold of
the original authors if we wanted to find out.

Anyway, I implemented the new scancode->keycode mapping in a way that
followed Dimitry's (?) review advice at that time, but left the old
immutable mapping in there as fallback if an old scancode was received.

If it is a burden, we could rip out the old table and see if anybody
complains.

> 	- The IR userspace tools won't work, as it doesn't export the
> 	  needed sysfs nodes to report an IR.

But at least keypad/ keyboard related userspace should work.

> If you want, I can write a patch doing that, but I can't test it here, as
> I don't have a firedtv device.

I can test such a patch as spare time permits if you point me to particular
tools that I should test.
-- 
Stefan Richter
-=====-===-- -=-= ===--
http://arcgraph.de/sr/

  reply	other threads:[~2012-05-28 12:17 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 15:34 [GIT PULL for v3.5-rc1] media updates for v3.5 Mauro Carvalho Chehab
2012-05-24 15:52 ` Antti Palosaari
2012-05-24 16:33 ` Ezequiel Garcia
2012-05-24 16:44   ` Mauro Carvalho Chehab
2012-05-24 20:42 ` Linus Torvalds
2012-05-24 22:33   ` Mauro Carvalho Chehab
2012-05-24 22:40     ` Linus Torvalds
2012-05-25 12:12       ` Mauro Carvalho Chehab
2012-05-25 14:49         ` Anssi Hannula
2012-05-25 15:21           ` Mauro Carvalho Chehab
2012-05-25 16:01             ` Anssi Hannula
2012-05-25 21:20             ` Guennadi Liakhovetski
2012-05-25 22:38         ` Stefan Richter
2012-05-27 14:47           ` Mauro Carvalho Chehab
2012-05-27 15:54             ` Mauro Carvalho Chehab
2012-05-27 16:56               ` [RFC PATCH 0/3] Improve Kconfig selection for media devices Mauro Carvalho Chehab
2012-05-27 16:56                 ` [RFC PATCH 1/3] media: reorganize the main Kconfig items Mauro Carvalho Chehab
2012-05-27 17:15                   ` Hans Verkuil
2012-05-27 17:20                     ` Mauro Carvalho Chehab
2012-05-27 17:27                   ` Sylwester Nawrocki
2012-05-27 16:56                 ` [RFC PATCH 2/3] media: Remove VIDEO_MEDIA Kconfig option Mauro Carvalho Chehab
2012-05-27 16:56                 ` [RFC PATCH 3/3] media: only show V4L devices based on device type selection Mauro Carvalho Chehab
2012-05-27 17:13                 ` [RFC] file tree rearrangement - was: Re: [RFC PATCH 0/3] Improve Kconfig selection for media devices Mauro Carvalho Chehab
2012-05-27 17:25                   ` Hans Verkuil
2012-05-27 18:47                     ` Andy Walls
2012-05-27 20:15                       ` Mauro Carvalho Chehab
2012-05-28  9:42                         ` Hans Verkuil
2012-05-28 11:03                           ` Mauro Carvalho Chehab
2012-05-28 11:45                             ` Hans Verkuil
2012-05-28 12:10                               ` Mauro Carvalho Chehab
2012-05-27 19:54                     ` Mauro Carvalho Chehab
2012-05-28  9:12                       ` Hans Verkuil
2012-05-28  9:48                 ` Stefan Richter
2012-05-28 11:38                   ` Mauro Carvalho Chehab
2012-05-28 12:17                     ` Stefan Richter [this message]
2012-05-28 12:32                       ` Mauro Carvalho Chehab

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=20120528141752.7e4c530e@stein \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=snjw23@gmail.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.