GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have had a problem quite a while with the remote controls used for the title-listed soundcard. Some while ago, I successfully got the use of both the remote control's and the external control panel's buttons via lirc, on my Gentoo 2008 installation.
It was set up to allow the controls to do things such as starting Kaffeine, or changing the kmix volume via dcop.
Now, however, I have the strange scenario whereby it will not work if I boot my computer straight into Linux, but if I start up in Windows first, restart the computer, then choose Linux, everything works perfectly.
What may be causing this nuisance and how may it be resolved?
Firstly, I'm going to report this post and ask that it be moved to the Gentoo subforum as you might get a better response there. Secondly, could you please post a little more information regarding your system? For instance, are you using ALSA? Also, does your sound work when you boot straight into Linux, or does that fail as well?
I'm using ALSA, yes, but it's unrelated, really. ALSA works perfectly. It's the remote control units that I'm having problems with and as far as lirc is concerned they have nothing to do with sound even though in this circumstance it's the one from my sound card I'm using. I'm using the volume control for just that, but I use other buttons for opening programs and issuing them commands.
lirc is running and looks on the surface to be working perfectly but the buttons do nothing unless I follow the pattern specified above. irw won't see the button presses unless I restart from windows first, either. It's as if Windows activates something in the soundcard that Linux doesn't. It seems to turn on the remote unit, if you will, whereas Linux won't, but will see it if Windows has already done so.
Until now I wasn't able to make my remote work.
While posting in the EMU10K1 devel mailing list, someone said that it was necessary to
"initialize" the MIDI device used by the remote. A SysEx sequence has to be send to
'/dev/snd/midiC0D1'. The sequence is '0xf0, 0x00, 0x20,0x21, 0x61, 0x0, 0x00, 0x00,
0x7f, 0x0, 0xf7'.
The source code bellow is of a program that does just that. After modprobing the
modules with the correct options (the options are the same as the Platinum), just run
this prog to "initialize" the midi device. Voi-lá! The remote works! I think this is
an ugly hack. I'm sure that this can be implemented in the driver itself. Remember
that this "initialization" is only required by the Audigy 2 Platinum eX.
Hope this helps.
Miguel Duarte
Code:
//
// Programmer: Craig Stuart Sapp [EMAIL PROTECTED]
// Creation Date: Mon Dec 21 18:00:42 PST 1998
// Last Modified: Mon Dec 21 18:00:42 PST 1998
// Filename: ...linuxmidi/output/method1.c
// Syntax: C
// $Smake: gcc -O -o devmidiout devmidiout.c && strip devmidiout
//
#include <linux/soundcard.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
int main(void) {
char* device = "/dev/snd/midiC0D1" ;
unsigned char data[11] = {0xf0, 0x00, 0x20, 0x21, 0x61, 0x0, 0x00, 0x00,
0x7f, 0x0, 0xf7};
// step 1: open the OSS device for writing
int fd = open(device, O_WRONLY, 0);
if (fd < 0) {
printf("Error: cannot open %s\n", device);
exit(1);
}
// step 2: write the MIDI information to the OSS device
write(fd, data, sizeof(data));
// step 3: (optional) close the OSS device
close(fd);
return 0;
}
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.