Difference between revisions of "X10"

From ArchWiki
Jump to: navigation, search
(Example mplayer config)
(Example mplayer config)
Line 97: Line 97:
 
== Example mplayer config ==
 
== Example mplayer config ==
  
INFO: You need to remove --disable-lirc from mplayers PKGBUILD and recompile it, as it is disabled by default (04.02.09)
+
You need to remove --disable-lirc from mplayers PKGBUILD and recompile it, as it is disabled by default (04.02.09)
 
You can check if lirc support is compiled in with "mplayer -v someplayablefile.xyz" look for "Setting up LIRC support...
 
You can check if lirc support is compiled in with "mplayer -v someplayablefile.xyz" look for "Setting up LIRC support...
 
~/.lircrc is the default mplayer filename for the lirc config, see man mplayer to change this.
 
~/.lircrc is the default mplayer filename for the lirc config, see man mplayer to change this.

Revision as of 15:23, 4 February 2009


Install lirc

pacman -S lirc lirc-utils

The package lirc provides the right kernel module.

Blacklist not working module

For some reason udev loads the wrong kernel module for this radio remote, so you need to blacklist it. this is done in /etc/rc.conf

MODULES=(!ati_remote)

To load the right one at boot:

MODULES=(!ati_remote lirc_atiusb)

INFO: You need to unload the wrong kernel module manually if you attached the receiver before blacklisting the module

Add the daemon to the daemons array to start it at boot:

DAEMONS="(lircd)"

Create /etc/lircd.conf

This maps the keys from your remote to strings you can use for programs like mplayer. This config was created with "irrecord /tmp/x10".

begin remote
 name  /tmp/x10
 bits           16
 eps            30
 aeps          100
 one             0     0
 zero            0     0
 pre_data_bits   8
 pre_data       0x14
 post_data_bits  16
 post_data      0x0
 gap          227990
 toggle_bit_mask 0x80800000
     begin codes
         LIVE_TV                  0x719C
         PHOTO                    0xDA05
         DVD_MENU                 0x5984
         REC_TV                   0xED18
         MUSIC                    0x5B86
         VIDEO                    0x022D
         AUDIO                    0x87B2
         TITLE                    0x0A35
         ANGLE                    0x89B4
         SUBTITLES                0x0833
         POWER                    0xD702
         GUIDE                    0x0631
         TEXT                     0x6B96
         VOLUME_UP                0xDE09
         VOLUME_DOWN              0x5D88
         MUTE                     0xD500
         PROGRAM_UP               0x608B
         PROGRAM_DOWN             0xE10C
         LEFT                     0x729D
         RIGHT                    0xF41F
         UP                       0x6F9A
         DOWN                     0xF722
         OK                       0x739E
         ONE                      0xE20D
         TWO                      0x638E
         THREE                    0xE40F
         FOUR                     0x6590
         FIVE                     0xE611
         SIX                      0x6792
         SEVEN                    0xE813
         EIGHT                    0x6994
         NINE                     0xEA15
         ZERO                     0x6C97
         ASTERISK                 0x0C37
         HASH_KEY                 0x8DB8
         BACK                     0xF520
         INFO                     0x84AF
         PAUSE                    0x147EA90000  #ERROR
         WORLD                    0xF01B
         REWIND                   0x79A4
         REWIND_TO_BEGINNING      0xF621
         PLAY                     0x7AA5
         FORWARD                  0xFB26
         FORWARD_TO_END           0x78A3
         STOP                     0xFD28
         RED_CIRCLE_BUTTON        0x7CA7
     end codes
end remote

Starting lircd

/etc/rc.d/lircd start

Example mplayer config

You need to remove --disable-lirc from mplayers PKGBUILD and recompile it, as it is disabled by default (04.02.09) You can check if lirc support is compiled in with "mplayer -v someplayablefile.xyz" look for "Setting up LIRC support... ~/.lircrc is the default mplayer filename for the lirc config, see man mplayer to change this.

~/.lircrc
begin
    button = VOLUME_UP
    prog = mplayer
    config = volume 1
    repeat = 1
end
begin
   button = VOLUME_DOWN
   prog = mplayer
   config = volume -1
   repeat = 1
end
begin

button = RIGHT prog = mplayer config = seek +1 repeat = 1

end
begin

button = LEFT prog = mplayer config = seek -1 repeat = 1

end
begin

button = UP prog = mplayer config = seek +100 repeat = 1

end
begin

button = DOWN prog = mplayer config = seek -100

end
begin

button = PLAY prog = mplayer config = pause

end
begin

button = PAUSE prog = mplayer config = pause

end