Source-Changes archive

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

CVS commit: [chap-midi] src/sys/dev



Module Name:    src
Committed By:   chap
Date:           Sat May 20 03:17:43 UTC 2006

Modified Files:
        src/sys/dev [chap-midi]: midi.c midivar.h sequencer.c

Log Message:
The DFA (well, technically it's really a FST - a DFA with output) is now
used for transmit as well as receive; it's run at the upstream end of
each pipe (the receive interrupt for receive, the write call for transmit)
so that protocol errors can be detected as soon as possible, and erroneous
data won't fill the buffer. Implemented a guarantee that read(2) on the
raw device returns as many complete messages as will fit in the read
request, so the user program does not have to parse around read boundaries
(except for SysEx). Required a new buffer scheme that preserves message
boundaries. (A little like reinventing STREAMS, hmm...) Implemented
FIONREAD. New approach to sharing the cpu during output to interrupt-
challenged devices.

umidi happens to work now even in the presence of Active Sense, as the
transmit FST ensures the Active Sense doesn't appear in the midst of
another message, and right now the FST is always in canonicalizing mode
so there is no running status to disturb. That's half accident though, and
doesn't work for midisyn (which treats any System Common message as SysEx,
argh). The right solution will be to allow message-based drivers like umidi
and midisyn to get their data via a message-at-a-time interface, rather
than splitting the messages into bytes for lower drivers to reassemble
wrong.


To generate a diff of this commit:
cvs rdiff -r1.43.2.6 -r1.43.2.7 src/sys/dev/midi.c
cvs rdiff -r1.11.14.6 -r1.11.14.7 src/sys/dev/midivar.h
cvs rdiff -r1.30.14.6 -r1.30.14.7 src/sys/dev/sequencer.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index