All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/4] IR decoding using BPF
@ 2018-05-14 21:10 Sean Young
  2018-05-14 21:10 ` [PATCH v1 1/4] media: rc: introduce BPF_PROG_IR_DECODER Sean Young
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Sean Young @ 2018-05-14 21:10 UTC (permalink / raw)
  To: linux-media, linux-kernel, Alexei Starovoitov,
	Mauro Carvalho Chehab, Daniel Borkmann, netdev, Matthias Reichl,
	Devin Heitmueller

The kernel IR decoders support the most widely used IR protocols, but there
are many protocols which are not supported[1]. For example, the
lirc-remotes[2] repo has over 2700 remotes, many of which are not supported
by rc-core. There is a "long tail" of unsupported IR protocols.

IR encoding is done in such a way that some simple circuit can decode it;
therefore, bpf is ideal.

In order to support all these protocols, here we have bpf based IR decoding.
The idea is that user-space can define a decoder in bpf, attach it to
the rc device through the lirc chardev.

Separate work is underway to extend ir-keytable to have an extensive library
of bpf-based decoders, and a much expanded library of rc keymaps. 

Another future application would be to compile IRP[3] to a IR BPF program, and
so support virtually every remote without having to write a decoder for each.

Thanks,

Sean Young

[1] http://www.hifi-remote.com/wiki/index.php?title=DecodeIR
[2] https://sourceforge.net/p/lirc-remotes/code/ci/master/tree/remotes/
[3] http://www.hifi-remote.com/wiki/index.php?title=IRP_Notation

Sean Young (4):
  media: rc: introduce BPF_PROG_IR_DECODER
  media: bpf: allow raw IR decoder bpf programs to be used
  media: rc bpf: move ir_raw_event to uapi
  samples/bpf: an example of a raw IR decoder

 drivers/media/rc/Kconfig                  |   8 +
 drivers/media/rc/Makefile                 |   1 +
 drivers/media/rc/ir-bpf-decoder.c         | 284 ++++++++++++++++++++++
 drivers/media/rc/lirc_dev.c               |  30 +++
 drivers/media/rc/rc-core-priv.h           |  15 ++
 drivers/media/rc/rc-ir-raw.c              |   5 +
 include/linux/bpf_types.h                 |   3 +
 include/media/rc-core.h                   |  19 +-
 include/uapi/linux/bpf.h                  |  17 +-
 include/uapi/linux/bpf_rcdev.h            |  24 ++
 kernel/bpf/syscall.c                      |   7 +
 samples/bpf/Makefile                      |   4 +
 samples/bpf/bpf_load.c                    |   9 +-
 samples/bpf/grundig_decoder_kern.c        | 112 +++++++++
 samples/bpf/grundig_decoder_user.c        |  54 ++++
 tools/bpf/bpftool/prog.c                  |   1 +
 tools/include/uapi/linux/bpf.h            |  17 +-
 tools/testing/selftests/bpf/bpf_helpers.h |   6 +
 18 files changed, 594 insertions(+), 22 deletions(-)
 create mode 100644 drivers/media/rc/ir-bpf-decoder.c
 create mode 100644 include/uapi/linux/bpf_rcdev.h
 create mode 100644 samples/bpf/grundig_decoder_kern.c
 create mode 100644 samples/bpf/grundig_decoder_user.c

-- 
2.17.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-05-15 12:19 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-14 21:10 [PATCH v1 0/4] IR decoding using BPF Sean Young
2018-05-14 21:10 ` [PATCH v1 1/4] media: rc: introduce BPF_PROG_IR_DECODER Sean Young
2018-05-14 23:27   ` Randy Dunlap
2018-05-15 12:19     ` Sean Young
2018-05-15  4:48   ` Y Song
2018-05-15 10:30     ` Sean Young
2018-05-14 21:10 ` [PATCH v1 2/4] media: bpf: allow raw IR decoder bpf programs to be used Sean Young
2018-05-15  2:34   ` kbuild test robot
2018-05-15  5:22   ` Y Song
2018-05-14 21:11 ` [PATCH v1 3/4] media: rc bpf: move ir_raw_event to uapi Sean Young
2018-05-15  1:59   ` kbuild test robot
2018-05-15  5:26   ` Y Song
2018-05-14 21:11 ` [PATCH v1 4/4] samples/bpf: an example of a raw IR decoder Sean Young
2018-05-15  5:34   ` Y Song
2018-05-15 10:40     ` Sean Young

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.