All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: linux-media@vger.kernel.org, Frank Wunderlich <frank-w@public-files.de>
Subject: Re: [PATCH v2] media: rc: make scancodes 64 bit
Date: Mon, 9 Mar 2020 11:46:40 +0000	[thread overview]
Message-ID: <20200309114640.GA9321@gofer.mess.org> (raw)
In-Reply-To: <20200302103127.0eff8aa4@coco.lan>

Hi Mauro,

On Mon, Mar 02, 2020 at 10:31:27AM +0100, Mauro Carvalho Chehab wrote:
> Em Wed, 29 Jan 2020 11:54:16 +0000
> Sean Young <sean@mess.org> escreveu:
> 
> > There are many protocols that encode more than 32 bit. We want 64 bit
> > support so that BPF IR decoders can decode more than 32 bit. None of
> > the existing kernel IR decoders/encoders support 64 bit, for now.
> 
> The reason why we don't properly support 64 bits yet [2] is that it requires 
> some changes in order to provide a backward-compatible set of functions.

This should be supported.

> [2] Actually, I guess we have one driver with has 64 bits scancodes.

Which one is that?

> > The MSC_SCAN event can only contain 32 bit scancodes, so we no longer
> > generate these input events. The full 64 bit scancode can be read from
> > the lirc chardev.
> 
> For example, if all possible scancodes are <= 32 bit, it should still
> generate MSC_SCAN, as otherwise existing tools that rely on it will 
> break.

The scancodes are generated from the driver, and even if there is no
keymap loaded, scancodes are still generated. Therefore I don't think it
makes sense to switch on whether there are any 64 bit scancodes in the
current keymap.

We don't know if a driver will produce 64 bit scancodes right now. Although
BPF is the only route (currently) which can produce 64 bit scancodes,
there is no way to see if a BPF program will generate 64 bit scancodes
in advance.

So, I've changed the code to generate MSC_SCANCODE if the scancode fits
into 32 bits, reluctantly. However, I think this is the best we can do
for compatibility. I will post a v2 shortly.

Thanks
Sean

  parent reply	other threads:[~2020-03-09 11:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29 11:54 [PATCH v4l-utils 1/4] keytable: support 64 bit scancodes Sean Young
2020-01-29 11:54 ` [PATCH v2] media: rc: make scancodes 64 bit Sean Young
2020-03-02  9:31   ` Mauro Carvalho Chehab
2020-03-05  1:01     ` Sean Young
2020-03-09 11:46     ` Sean Young [this message]
2020-01-29 11:54 ` [PATCH v4l-utils 2/4] keytable: new samsung36 bpf decoder Sean Young
2020-01-29 11:54 ` [PATCH v4l-utils 3/4] Add keymap for Samsung AK59-00125A remote Sean Young
2020-01-29 11:54 ` [PATCH v4l-utils 4/4] keytable: a bpf protocol can have parameters and no scancodes Sean Young
  -- strict thread matches above, loose matches on Subject: below --
2020-03-09 12:23 [PATCH v2] media: rc: make scancodes 64 bit Sean Young

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=20200309114640.GA9321@gofer.mess.org \
    --to=sean@mess.org \
    --cc=frank-w@public-files.de \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+huawei@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 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.