All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Härdeman" <david@hardeman.nu>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Sean Young <sean@mess.org>, linux-media@vger.kernel.org
Subject: Re: [RFC PATCH 6/6] [media] rc: teach lirc how to send scancodes
Date: Wed, 20 May 2015 11:18:09 +0200	[thread overview]
Message-ID: <cd8f8ae67e82660173b0d291f394d810@hardeman.nu> (raw)
In-Reply-To: <20150520060853.5d3a5e0d@recife.lan>

On 2015-05-20 11:08, Mauro Carvalho Chehab wrote:
> Em Wed, 20 May 2015 10:53:59 +0200
> David Härdeman <david@hardeman.nu> escreveu:
> 
>> On 2015-03-19 22:50, Sean Young wrote:
>> > The send mode has to be switched to LIRC_MODE_SCANCODE and then you can
>> > send one scancode with a write. The encoding is the same as for
>> > receiving
>> > scancodes.
>> 
>> Why do the encoding in-kernel when it can be done in userspace?
>> 
>> I'd understand if it was hardware that accepted a scancode as input, 
>> but
>> that doesn't seem to be the case?
> 
> IMO, that makes the interface clearer. Also, the encoding code is 
> needed
> anyway, as it is needed to setup the wake up keycode on some hardware.
> So, we already added encoder capabilities at some decoders:

I know.

But with the proposed API userspace would have to first try to send a 
scancode + protocol, then see what the error code was, and if it 
indicated that the kernel couldn't encode the scancode, userspace would 
anyway have to encode it itself and then try again with raw events?

I think that's a bad API (to put it mildly).

There's simply no need to encode the scancodes in kernel (even if the 
code happens to be present for a random and fluctuating set of 
protocols) and any well-written userspace would have to include code to 
encode to any protocol it wants to support (since it can't rely on the 
kernel supporting any given protocol)....what does that buy you except a 
hairy API and added complexity?


  reply	other threads:[~2015-05-20  9:18 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-19 21:50 [RFC PATCH 0/6] Send and receive decoded IR using lirc interface Sean Young
2015-03-19 21:50 ` [RFC PATCH 1/6] [media] lirc: remove broken features Sean Young
2015-05-14 16:39   ` Mauro Carvalho Chehab
2015-03-19 21:50 ` [RFC PATCH 2/6] [media] lirc: LIRC_[SG]ET_SEND_MODE should return -ENOSYS Sean Young
2015-05-14 17:00   ` Mauro Carvalho Chehab
2015-03-19 21:50 ` [RFC PATCH 3/6] [media] rc: lirc bridge should not be a raw decoder Sean Young
2015-05-14 16:47   ` Mauro Carvalho Chehab
2015-03-19 21:50 ` [RFC PATCH 4/6] [media] rc: lirc is not a protocol or a keymap Sean Young
2015-05-14 16:51   ` Mauro Carvalho Chehab
2015-05-19 20:34     ` David Härdeman
2015-05-20  8:19       ` Mauro Carvalho Chehab
2015-05-20  8:49         ` David Härdeman
2015-05-20  9:01           ` Mauro Carvalho Chehab
2015-05-20  9:06             ` David Härdeman
2015-05-20 19:16               ` David Härdeman
2015-05-20 20:54                 ` David Härdeman
2015-03-19 21:50 ` [RFC PATCH 5/6] [media] lirc: pass IR scancodes to userspace via lirc bridge Sean Young
2015-05-14 16:58   ` Mauro Carvalho Chehab
2015-03-19 21:50 ` [RFC PATCH 6/6] [media] rc: teach lirc how to send scancodes Sean Young
2015-05-14 17:04   ` Mauro Carvalho Chehab
2015-05-20  8:53   ` David Härdeman
2015-05-20  9:08     ` Mauro Carvalho Chehab
2015-05-20  9:18       ` David Härdeman [this message]
2015-03-30 21:18 ` [RFC PATCH 0/6] Send and receive decoded IR using lirc interface David Härdeman
2015-03-30 23:08   ` Sean Young
2015-04-01 20:33     ` David Härdeman
2015-03-31 23:47   ` Mauro Carvalho Chehab
2015-04-01 22:19     ` David Härdeman
2015-04-01 23:10       ` Mauro Carvalho Chehab
2015-04-01 23:55         ` David Härdeman
2015-04-02 11:37         ` David Härdeman
2015-04-03 10:11       ` Sean Young
2015-04-03 18:41         ` 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=cd8f8ae67e82660173b0d291f394d810@hardeman.nu \
    --to=david@hardeman.nu \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=sean@mess.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 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.