LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   .lircrc and ALSA. (https://www.linuxquestions.org/questions/linux-software-2/lircrc-and-alsa-670475/)

elprawn 09-17-2008 05:47 AM

.lircrc and ALSA.
 
What do I need to put in my .lircrc entries to be able to control ALSA, e.g. mute etc?

At the moment I have the following entry...

Code:

begin
  remote = LiveDrive
  prog = ?
  button = mute
  config = ?
end

Thanks for the help.

elprawn 09-17-2008 08:22 PM

OK, I now have the following as my lircrc...

Code:

begin
  remote = LiveDrive
  prog = irexec
  button = mute
  config = dcop kmix Mixer0 toggleMute 0
  repeat = 0
end
begin
  remote = LiveDrive
  prog = irexec
  button = vol+
  config = dcop kmix Mixer0 increaseVolume 0
  repeat = 1
end
begin
  remote = LiveDrive
  prog = irexec
  button = vol-
  config = dcop kmix Mixer0 decreaseVolume 0
  repeat = 1
end

Not working, though.

When I run "dcop kmix Mixer0 <command> 0" from the console, it produces the desired effect.

Running "ircat LiveDrive" from the console prints out the commands defined by config, when the buttons are pressed. e.g. pressing mute prints "dcop kmix Mixer0 toggleMute 0".

And pressing the buttons whilst irw is running gives the following...

"0000000080000040 00 mute LiveDrive"
"0000000080008082 00 vol- LiveDrive"
"0000000080008082 00 vol+ LiveDrive"

Yet still nothing works and I can't understand why.

elprawn 09-17-2008 08:45 PM

Turns out it couldn't find dcop for some reason, so I set the full paths and then ran the irexec daemon and now it works.

Code:

begin
  remote = LiveDrive
  prog = irexec
  button = mute
  config = /usr/kde/3.5/bin/dcop kmix Mixer0 toggleMute 0
  repeat = 0
end
begin
  remote = LiveDrive
  prog = irexec
  button = vol+
  config = /usr/kde/3.5/bin/dcop kmix Mixer0 increaseVolume 0
  repeat = 1
end
begin
  remote = LiveDrive
  prog = irexec
  button = vol-
  config = /usr/kde/3.5/bin/dcop kmix Mixer0 decreaseVolume 0
  repeat = 1
end



All times are GMT -5. The time now is 04:13 AM.