Skip to content

Instantly share code, notes, and snippets.

@beli-sk
Last active April 5, 2019 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beli-sk/0de597c5d6ae4afb1712bafa6643058b to your computer and use it in GitHub Desktop.
Save beli-sk/0de597c5d6ae4afb1712bafa6643058b to your computer and use it in GitHub Desktop.
LIRC Pulseaudio volume with Creative SB X-Fi Surround 5.1 Pro
[Desktop Entry]
Name=Irexec daemon
Comment=Handle IR command server
Exec=/usr/bin/irexec
Icon=applications-system
Terminal=false
Type=Application
Categories=AudioVideo;Application;X-Fedora-Extra
[lircd]
driver = alsa_usb
device = hw:CARD=Pro
begin
remote = SB_X-Fi_USB
button = KNOB_MUTE
prog = irexec
config = echo KNOB_MUTE
end
begin
remote = SB_X-Fi_USB
button = KNOB_VOLUMEUP
prog = irexec
repeat = 1
config = /usr/bin/pactl set-sink-volume alsa_output.usb-Creative_Technology_Ltd_SB_X-Fi_Surround_5.1_Pro_000001Lm-00.analog-stereo +0.5%
end
begin
remote = SB_X-Fi_USB
button = KNOB_VOLUMEDOWN
prog = irexec
repeat = 1
config = /usr/bin/pactl set-sink-volume alsa_output.usb-Creative_Technology_Ltd_SB_X-Fi_Surround_5.1_Pro_000001Lm-00.analog-stereo -0.5%
end
begin remote
name SB_X-Fi_USB
bits 8
begin codes
POWER 0x29 # Power
MENU 0x1B # Menu
KNOB_MUTE 0x0D # Knob Mute
KNOB_VOLUMEUP 0x10 # Knob Vol_Up
KNOB_VOLUMEDOWN 0x0F # Knob Vol_Down
MUTE 0x2A # Mute
VOLUMEUP 0x2B # Vol_Up
VOLUMEDOWN 0x2C # Vol_Down
UP 0x31 # Up
LEFT 0x27 # Left
RIGHT 0x28 # Right
REW 0x35 # Rew
OK 0x30 # Ok
FWD 0x36 # Fwd
DOWN 0x32 # Down
REPEAT 0x3C # Repeat
SHUFFLE 0x3B # Shuffle
RETURN 0x1A # Return
PLAY 0x2F # Play
end codes
end remote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment