Add IR support for saa7134

From LinuxTVWiki
Jump to: navigation, search

Saa7134 was the first driver to support the new ir core raw input event infrastructure. As such, it is very easy to add there support for any new IR that uses GPIO18 or GPIO16 to receive raw pulse/space events.

In order to add support for a new board called SAA7134_BOARD_FOO, you just need to add:

For GPIO18:

       case SAA7134_BOARD_FOO:
               ir_codes     = RC_MAP_FOO;
               mask_keydown = 0x0040000;
               mask_keyup   = 0x0040000;
               mask_keycode = 0xffff;
               raw_decode   = 1;
               break;

For GPIO16, the mask_kewdown and mask_keyup should be 0x10000. However, a small trivial 2 line change at saa7134_hw_enable2() is required, in order to enable both positive and negative IRQ transitions. This change weren't done yet, since we lack the need for it currently.