Re: [linux-audio-dev] [ot] rawmidi && alsa

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] [ot] rawmidi && alsa
From: Tim Goetze (tim_AT_quitte.de)
Date: Tue Apr 24 2001 - 03:08:13 EEST


On Apr 23 Abramo Bagnara wrote:

>Tim Goetze wrote:
>>
>> the following method is known to work since alsa-0.6.x (as has been
>> said on alsa-devel):
>>
>> fd = open ("/dev/snd/midiCxDy", O_RDONLY); /* x = card, y = device */
>>
>> while (!done)
>> {
>> if (read (fd, &data, 1) == 1)
>> parse (data);
>> }
>>
>> O_NONBLOCK with poll(2) and O_WRONLY/O_RDWR with write(2) work, too.
>>
>> the only drawback is that due to a long-standing bug alsa does not
>> route MIDI data you write to this fd to hardware MIDI (wavetable/FM),
>> so for a emu8k, /dev/snd/midiCxDy with y > 0 is dead.
>>
>> external connectors work well here with emu8k, ice1712 and an isa
>> mpu401.
>>
>> actually, i regard this method not as a workaround but as superior
>> since a) it is easier to implement and read, and b) you can use it
>> with sockets and pipes, too.
>>
>> there's code that implements this method in pbd's libmidi++ or my
>> midithing (quitte.de/midithing.html).
>>
>> hope this lessens the frustration,
>
>Please avoid to use direct access to ALSA kernel API, this means to ask
>for troubles.
>
>Please understand that we'll have no hesitation to break compatibility
>of your applications with future releases.
>
>You've no drawbacks to use alsa-lib API.

don't you think having this sort of connectivity is a just a very
*good* thing to have in alsa?

tim


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Apr 24 2001 - 03:48:53 EEST