Войти в систему

Home
    - Создать дневник
    - Написать в дневник
       - Подробный режим

LJ.Rossia.org
    - Новости сайта
    - Общие настройки
    - Sitemap
    - Оплата
    - ljr-fif

Редактировать...
    - Настройки
    - Список друзей
    - Дневник
    - Картинки
    - Пароль
    - Вид дневника

Сообщества

Настроить S2

Помощь
    - Забыли пароль?
    - FAQ
    - Тех. поддержка



Пишет LWN.net ([info]syn_lwnheadline)
@ 2018-07-09 15:46:00


Previous Entry  Add to memories!  Tell a Friend!  Next Entry
[$] IR decoding with BPF
In the 4.18 kernel, a new feature was merged to allow infrared (IR)
decoding to be done using BPF. Infrared remotes use many different
encodings; if a decoder were to be written for each, we would end up with
hundreds of decoders in the kernel. So, currently, the kernel only supports
the most widely used protocols. Alternatively, the lirc daemon can
be run to decode IR. Decoding IR can usually be expressed in a few lines of
code, so a more lightweight solution without many kernel-to-userspace
context switches would be preferable. This article will explain how IR
messages are encoded, the structure of a BPF program, and how a BPF program
can maintain state between invocations. It concludes with a look at the
steps that are taken to end up with a button event, such as a volume-up key
event.


(Читать комментарии) (Добавить комментарий)