On Thu, 24 May 2001, Miller Puckette wrote:
Hi Guenter et al.,
Well, I downloaded "pd-0.32newrme.tar.gz" and looked at s_linux.c...
The new code is in s_linux_blocked.c:
What it does is, just aquiring as much channels as possible from each device. This is compatible with the "old" OSS API as well as with "my new one", where you can aquire more than two channels from each device.
With this scheme, as Alexander reported, the OSS multichannel emulation that ALSA does even works ! (Although it does format conversion from 16 to 32 bit internally, which is bad).
Take a look at s_linux_blocked.c. Performance is an issue here, and with the current implementation it is not "that" good, because it blocks upon the write call to the device. (This could be changed with a select call or non blocking writes .... but in this case there is a high chance that some drivers don't properly implement the select ... )
Some things like the audiobuf flag are not implemented yet, you can only set the fragsize (fragment number is fixed at two).
Something about the rationale behind it:
Not all sound cards deliver an exact pointer to the data they have already sent to the dacs, so sometimes it is only possible to tell if a fragment has been sent (which is done by the card by sending an interrupt). That is why the nice es1370 approach doesn't always work.
I hope everything is clear, ... (some of the above is based on guessing .. let me know if you think I'm wrong)
Guenter
It seems that if you ask for 8 channels, for instance, the code opens four devices for 2 channels each. But that isn't how the driver seems to work (from your comments at least it seemed that you had to open one device for all the channels you wanted.) In my own code, I tried opening the 4 devices and failes, and then opened one device for all 8 channels and that worked. Is this the way I should be doing it???
thanks Miller
Ok, for that purpose I will put a new version of the driver (0.5) on my ftp site. I just realized yesterday that closing of the device fails with newer cards (I have an old card with broken firmware).
Generally I really ask anyone who tries the driver to send me feedback, I don't mind if you shout at me that it doesn't work ..
My plan is to include the driver in the stock linux kernel, therefore I need ppl testing it.
For the driver I have rewritten the pd audio I/O code (that is, it's basically a cleaned up version of the "very-old-blocking-IO" code, which is under most situations not as "fast", but it works with "all" cards and even with ALSA OSS emulation).
Advantage of testing the driver:
- You will have support for standard OSS stereo devices, so you will be
able to play back any sound with 44.1, 48, (even 88.2 and 96) kHz sampling rate with every program that supports the OSS API. (Even "stock" pd with the -frags switch works).
- You can use more than one RME card