[pvrusb2] HVR-1950 IR Support
Roger
rogerx.oss at gmail.com
Tue Dec 27 04:55:47 CST 2011
This is what I have so far for an lircrc file for hvr-1950 using the previously
posted /etc/lirc/lircd.conf file.
MPlayer
Use "mplayer -input cmdlist |less" to find MPLayer commands to pass to the
"config" option below.
Xine
"xine --keymap=lirc >> $HOME/.lircrc" will go a step further and give you a
pretty nice lircrc file to start playing with.
I've only configured/interfaced the essential buttons with MPlayer & Xine,
omitting such buttons as number buttons. The color buttons I'm playing with
subtitles, lang, OSD Menu, GUI Menu, etc.
This will likely be the last you hear from me on this, but hopefully will get
many PVRUSB2 HVR-1950 users heading in the proper direction, saving them time
and while providing them time to completely clean things up a bit so they can
submit a more formaly lircrc file. ;-)
(I've omitted MythTV as I no longer use the heavy application, but will more
then likely work without issues.)
FYI for users: Also, the remote will work separately from any background
recording process.
$HOME/.lircrc
################################################################################
# MPlayer lirc setup
################################################################################
# Show OSD
begin
prog = mplayer
button = KEY_EPG
config = osd
end
# Show Filename
begin
prog = mplayer
button = KEY_GREEN
config = osd_show_property_text "${filename}" 2400
config = osd_show_text ""
end
# Show Subtitles
begin
prog = mplayer
button = KEY_SUBTITLE
config = sub_visibility
end
# sub_visibility toggle the visibility of the subtitle v
# subvob_lang cycle through all available subtitle languages. j
# switch_audio cycle through all available audio languages. #
# Subtitle Language
begin
prog = mplayer
button = KEY_RED
config = vobsub_lang
end
# Switch Audio Language
begin
prog = mplayer
button = KEY_BLUE
config = switch_audio
end
# Pause playback
begin
prog = mplayer
button = KEY_PAUSE
config = pause
end
# Skip ahead a minute if playing
# If paused, resume playing
begin
prog = mplayer
button = KEY_PLAY
config = seek +1
end
# Back/Exit
begin
prog = mplayer
button = KEY_EXIT
config = quit
end
# Stop
begin
prog = mplayer
button = KEY_STOP
config = quit
end
# Mute
begin
prog = mplayer
button = KEY_MUTE
config = mute
end
# Seek back 10 seconds
begin
prog = mplayer
button = KEY_LEFT
config = seek -10
end
# Seek forward 30 seconds
begin
prog = mplayer
button = KEY_RIGHT
config = seek +30
end
# Seek forward 10 minutes
begin
prog = mplayer
button = KEY_FASTFORWARD
config = seek +600
end
# Seek backward 10 minutes
begin
prog = mplayer
button = KEY_REWIND
config = seek -600
end
# Skip Forward Song/Chapter
begin
prog = mplayer
button = KEY_NEXTSONG
config = seek_chapter 1
end
# Skip Back Song/Chapter
begin
prog = mplayer
button = KEY_PREVIOUSSONG
config = seek_chapter -1
end
# Toggle full-screen
begin
prog = mplayer
button = KEY_SELECT
config = vo_fullscreen
end
# Pan-Scan Increase
begin
prog = mplayer
button = KEY_UP
config = panscan 0.1
end
# Pan-Scan Decrease
begin
prog = mplayer
button = KEY_DOWN
config = panscan -0.1
end
# Volume Up
begin
prog = mplayer
button = KEY_VOLUMEUP
repeat = 3
config = volume 10
end
# Volume Down
begin
prog = mplayer
button = KEY_VOLUMEDOWN
repeat = 3
config = volume -10
end
# Power Button Shutdown/Halt System
#begin
# prog = mplayer
# button = KEY_POWER2
# config = sudo halt
#end
###############################################################################
# Xine lirc setup
###############################################################################
begin
prog = xine
button = KEY_PLAY
repeat = 0
config = Play
end
begin
prog = xine
button = KEY_STOP
repeat = 0
config = Stop
end
begin
prog = xine
button = KEY_POWER2
repeat = 0
config = Quit
end
begin
prog = xine
button = KEY_PAUSE
repeat = 0
config = Pause
end
begin
prog = xine
button = KEY_UP
repeat = 0
config = EventUp
end
begin
prog = xine
button = KEY_DOWN
repeat = 0
config = EventDown
end
begin
prog = xine
button = KEY_LEFT
repeat = 0
config = EventLeft
end
begin
prog = xine
button = KEY_RIGHT
repeat = 0
config = EventRight
end
begin
prog = xine
button = KEY_OK
repeat = 0
config = EventSelect
end
begin
prog = xine
button = KEY_EPG
repeat = 0
config = OSDStreamInfos
#config = Menu
#config = OSDWriteText
#config = OSDMenu
end
begin
prog = xine
button = KEY_MENU
repeat = 0
config = Menu
#config = OSDWriteText
#config = OSDMenu
end
begin
prog = xine
button = KEY_FASTFORWARD
repeat = 0
#config = SpeedFaster
config = SeekRelative+30
end
begin
prog = xine
button = KEY_REWIND
repeat = 0
#config = SpeedSlower
config = SeekRelative-30
end
begin
prog = xine
button = KEY_VOLUMEUP
repeat = 10
config = Volume+
end
begin
prog = xine
button = KEY_VOLUMEDOWN
repeat = 10
config = Volume-
end
begin
prog = xine
button = KEY_MUTE
repeat = 0
config = Mute
end
#begin
# prog = xine
# button = KEY_SELECT
# repeat = 0
# config = RootMenu
#end
begin
prog = xine
button = KEY_NEXTSONG
repeat = 0
config = EventNext
end
begin
prog = xine
button = KEY_PREVIOUSSONG
repeat = 0
config = EventPrior
end
#begin
#prog = xine
#button = GO
#repeat = 0
#config = OSDStreamInfos
#end
begin
prog = xine
button = KEY_SELECT
repeat = 0
config = ToggleFullscreen
end
# select next angle
begin
button = KEY_GREEN
prog = xine
config = EventAngleNext
end
# select previous angle
begin
button = KEY_RED
prog = xine
config = EventAnglePrior
end
# visibility toggle of UI windows
begin
button = KEY_BLUE
prog = xine
config = ToggleVisibility
end
# visibility toggle of playlist editor window
begin
button = KEY_YELLOW
prog = xine
config = OSDMenu
end
################################################################################
# urxvt
################################################################################
#begin
#prog = irexec
#button = KEY_OK
#repeat = 0
#config = echo
#end
#begin
#prog = irexec
#button = KEY_OK
#repeat = 0
#config = echo
#end
################################################################################
# System
################################################################################
#begin
#prog = irexec
#button = KEY_POWER2
#repeat = 0
#config = sudo halt
#end
More information about the pvrusb2
mailing list