Article 3TJ8F [$] IR decoding with BPF

[$] IR decoding with BPF

by
corbet
from LWN.net on (#3TJ8F)
In the 4.18 kernel, a new feature was merged to allow infrared (IR)decoding to be done using BPF. Infrared remotes use many differentencodings; if a decoder were to be written for each, we would end up withhundreds of decoders in the kernel. So, currently, the kernel only supportsthe most widely used protocols. Alternatively, the lirc daemon canbe run to decode IR. Decoding IR can usually be expressed in a few lines ofcode, so a more lightweight solution without many kernel-to-userspacecontext switches would be preferable. This article will explain how IRmessages are encoded, the structure of a BPF program, and how a BPF programcan maintain state between invocations. It concludes with a look at thesteps that are taken to end up with a button event, such as a volume-up keyevent.
External Content
Source RSS or Atom Feed
Feed Location http://lwn.net/headlines/rss
Feed Title LWN.net
Feed Link https://lwn.net/
Reply 0 comments