One process per audio channel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everyone,

I have an RME AES-32 PCI board which provides 4 stereo input channels 
and 4 stereo output channels.

(I'm using the hsdpm driver at this time.)

I want to use one process per channel, i.e. process A handles stereo 
input #1 (on the XLR connector #1), process B handles stereo input #2, 
etc.

The processes are independent, in that process A might be started, and 
only several hours later, process B is started, then a few hours later 
process A is killed and restarted.

Is it possible to do that with the ALSA library?

The device driver does not seem too happy when more than one process 
tries to open /dev/snd/pcmC0D0c

$ cat open_device.c
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
int main(void)
{
   int fd = open("/dev/snd/pcmC0D0c", O_RDONLY|O_NONBLOCK);
   if (fd < 0) perror("/dev/snd/pcmC0D0c");
   char buf[40];
   read(0, buf, sizeof buf);
   return 0;
}

# ./testrme
-> First process opens the device

# ./testrme
/dev/snd/pcmC0D0c: Device or resource busy
-> Second process cannot open the device

Do I need a sound server to "mediate" access to the hardware?
(I thought that was the driver's job?)

Perhaps I just need to write the appropriate .asoundrc file?

(References to self)
http://alsa.opensrc.org/.asoundrc
http://alsa.opensrc.org/Asoundrc.txt

Regards.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux