LIRC
Voici quelques notes (un pense-bête) concernant la configuration de LIRC chez moi.
Testé et approuvé avec lirc 0.7.1pre2-2 debian, drivers lirc de lirc-0.7.2, noyau 2.6.14.3 x86_64 vanilla, une carte d'acquisition video Avermedia (qui ne sert plus qu'à contrôler la télécommande grâce à
Free multiposteTV).
Tout (ou presque) provient de
http://mysettopbox.tv/phpBB2/viewtopic.php?p=32373.
- Debian de base : apt-get install lirc xmms-lirc
- Drivers adaptés (le paquet debian ne convient pas) :
- récupérer les sources de lirc
- ./setup.sh
- cd drivers && make && make install (pas besoin de compiler le reste)
- activer le plugin lirc dans xmms
/etc/modprobe.d/lirc :
alias char-major-61 lirc_gpio
options lirc_gpio gpio_mask=0xf00f0 gpio_lock_mask=0x20 gpio_xor_mask=0xf00f0 soft_gap=0 sample_rate=10
/etc/lirc/hardware.conf :
...
DEVICE="/dev/lirc0"
MODULES="lirc_dev lirc_gpio"
...
/etc/lirc/lircd.conf :
# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.7.1pre2(any) on Mon Aug 15 15:03:15 2005
#
# contributed by Simon Glynn
#
# brand: Avermedia DVB-T 771
# model no. of remote control:
# devices being controlled by this remote:
#
begin remote
name myremote
bits 8
eps 30
aeps 100
one 0 0
zero 0 0
gap 199890
toggle_bit 0
begin codes
source 0x7D
teletext 0xBD
power 0xFD
1 0x75
2 0xB5
3 0x35
4 0x6D
5 0xAD
6 0x2D
7 0x65
8 0xA5
9 0x25
0 0x5D
audio 0xED
full-screen 0xE5
preview 0xDD
loop 0x1D
display 0x9D
backward 0x55
forward 0x95
capture 0x15
mute 0xD5
play 0xCD
stop 0x0D
pause 0x8D
record 0x4D
red 0x45
green 0x79
ok 0xC5
cancel 0xF9
volume- 0x85
volume+ 0x05
channel- 0xB9
channel+ 0x39
end codes
end remote
~/.lircrc :
begin
prog = irexec
button = power
config = sleep 3 ; sudo /sbin/poweroff
end
############################XMMS###################################
#xmms
begin xmms
begin
prog = xmms
button = play
config = PLAY
end
begin
prog = xmms
button = pause
config = PAUSE
end
begin
prog = xmms
button = stop
config = STOP
end
begin
prog = xmms
button = cancel
config = QUIT
flags = mode
end
begin
prog = xmms
button = power
config = QUIT
flags = mode
end
begin
prog = xmms
button = channel+
config = NEXT
end
begin
prog = xmms
button = channel-
config = PREV
end
begin
prog = xmms
button = forward
config = FWD 3
repeat = 32
end
begin
prog = xmms
button = backward
config = BWD 3
repeat = 32
end
begin
prog = xmms
button = volume+
config = VOL_UP 10
repeat = 2
end
begin
prog = xmms
button = volume-
config = VOL_DOWN 10
repeat = 2
end
begin
prog = xmms
button = 1
config = ONE
end
begin
prog = xmms
button = 2
config = TWO
end
begin
prog = xmms
button = 3
config = THREE
end
begin
prog = xmms
button = 4
config = FOUR
end
begin
prog = xmms
button = 5
config = FIVE
end
begin
prog = xmms
button = 6
config = SIX
end
begin
prog = xmms
button = 7
config = SEVEN
end
begin
prog = xmms
button = 8
config = EIGHT
end
begin
prog = xmms
button = 9
config = NINE
end
begin
prog = xmms
button = 0
config = ZERO
end
begin
prog = xmms
button = display
config = SETPOS
end
end xmms
############################XawTV###################################
#xawtv
begin
prog = xawtv
button = full-screen
config = fullscreen
end
begin
prog = xawtv
button = power
config = quit
end
begin
prog = xawtv
button = cancel
config = quit
end
############################MPLAYER###################################
#MPlayer
begin
prog = mplayer
button = power
config = quit
end
begin
prog = mplayer
button = cancel
config = quit
end
begin
prog = mplayer
button = display
config = osd
end
begin
prog = mplayer
button = backward
config = seek -10
repeat = 0
end
begin
prog = mplayer
button = forward
config = seek +10
repeat = 0
end
begin
prog = mplayer
button = channel-
config = seek -60
repeat = 0
end
begin
prog = mplayer
button = channel+
config = seek +60
repeat = 0
end
begin
prog = mplayer
button = pause
config = pause
end
begin
prog = mplayer
button = play
config = pause
end
begin
prog = mplayer
button = volume+
config = volume +24
repeat = 32
end
begin
prog = mplayer
button = volume-
config = volume -24
repeat = 32
end
begin
prog=mplayer
button=mute
config=mute
end
# Toggle full-screen
begin
prog = mplayer
button = full-screen
repeat = 32
config = vo_fullscreen
end
###################XINE######################################
begin
prog = xine
button=2
config=EventUp
repeat=32
end
begin
prog=xine
button=8
config=EventDown
repeat=32
end
begin
prog=xine
button=4
config=EventLeft
repeat=32
end
begin
prog=xine
button=6
config=EventRight
repeat=32
end
begin
prog=xine
button=5
config=EventSelect
repeat=32
end
begin
prog=xine
button=1
config=SpeedSlower
repeat=32
end
begin
prog=xine
button=3
config=SpeedFaster
repeat=32
end
begin
prog=xine
button=teletext
config=Menu
repeat=32
end
begin
prog=xine
button=source
config=RootMenu
repeat=32
end
begin
prog=xine
button=channel-
config=EventPrior
repeat=32
end
begin
prog=xine
button=channel+
config=EventNext
repeat=32
end
begin
prog=xine
button=power
config=Quit
repeat=32
end
begin
prog=xine
button=cancel
config=Quit
repeat=32
end
begin
prog=xine
button=volume+
config=Volume+
repeat=16
end
begin
prog=xine
button=volume-
config=Volume-
repeat=16
end
begin
prog=xine
button=full-screen
config=ToggleFullscreen
repeat=32
end
begin
prog=xine
button=play
config=Play
repeat=32
end
begin
prog=xine
button=pause
config=Pause
repeat=32
end
begin
prog=xine
button=forward
config=SeekRelative+15
repeat=32
end
begin
prog=xine
button=backward
config=SeekRelative-15
repeat=32
end
begin
prog=xine
button=mute
config=Mute
repeat=32
end
###################VLC######################################
# See example.lircrc in the VLC sources
begin
prog = vlc
button = play
config = key-play
repeat=32
end
begin
prog = vlc
button = pause
config = key-pause
repeat=32
end
begin
prog = vlc
button = stop
config = key-stop
repeat=32
end
begin
prog = vlc
button = power
config = key-quit
repeat=32
end
begin
prog = vlc
button = cancel
config = key-quit
repeat=32
end
begin
prog = vlc
button = channel+
config = key-next
repeat=32
end
begin
prog = vlc
button = channel-
config = key-prev
repeat=32
end
begin
prog = vlc
button = full-screen
config = key-fullscreen
repeat=32
end
begin
prog = vlc
button = backward
config = key-slower
repeat=32
end
begin
prog = vlc
button = forward
config = key-faster
repeat=32
end
#Audio controls
begin
prog = vlc
button = volume-
config = key-vol-down
repeat=0
end
begin
prog = vlc
button = volume+
config = key-vol-up
repeat=0
end
begin
prog = vlc
button = mute
config = key-vol-mute
repeat=32
end
#For dvd navigation
begin
prog = vlc
button = 4
config = key-nav-left
end
begin
prog = vlc
button = 8
config = key-nav-down
end
begin
prog = vlc
button = 2
config = key-nav-up
end
begin
prog = vlc
button = 6
config = key-nav-right
end
begin
prog = vlc
button = 5
config = key-nav-activate
end
begin
prog = vlc
button = source
config = key-disc-menu
end
~/.vlc/vlcrc :
Outils pratiques
Pour voir les touches sur lesquelles on appuie :
irw
Pour lancer des applis :
irexec (+ sections
irexec dans le
.lircrc)