Re: MOTU Fastlane MIDI driver wastes 10-25% CPU
Re: MOTU Fastlane MIDI driver wastes 10-25% CPU
- Subject: Re: MOTU Fastlane MIDI driver wastes 10-25% CPU
- From: Doug Wyatt <email@hidden>
- Date: Thu, 7 Nov 2002 16:41:52 -0800
On Thursday, Nov 7, 2002, at 04:56 US/Pacific, Shaun Wexler wrote:
Hello group,
Well, MOTU hasn't quite got it with their beta USB-MIDI driver,
methinks:
From within Process Viewer, the MIDIServer itself averages 10-25% of
total
CPU capacity on a B&W 500 G3, using the most recent MOTU Fastlane
USB-MIDI
driver (1.0.0-Beta5, current as of 10/31/02). Any ideas? It9s
blocking is
inconsistent, and totally unusable. 50% of its thread time is spent
in the
kernel, mainly blocking, but also fighting various locks, vm, and wait
queues. Doesn9t matter which particular MIDI app spawns the
MIDIServer, nor
which USB port/hub or device connections are used. How heavy should
the
MIDIServer thread(s) REALLY be taxing the system with a normal STABLE
driver, as an estimate of total CPU%? I9ve got frame-rate intensive
displays and many FFT threads competing for every spare cycle...
With no MIDI going in or out, the MIDIServer wakes about once a second
(long story) to do next to no work. top reports 0% CPU usage. With
the USB class driver, one incoming full-bandwidth MIDI stream can cause
occasional peaks of about 15%.
I suspect the FastLane may be using isoc transfer mode, whereas most
other devices use bulk...
I also have another problem. I need to be able to transmit raw MIDI
packets
over a USB-to-serial interface, to external RS-232 or 422/485 devices.
It
looks like I need to plan to write my own internal classes, rather
than an
IOKit driver or kext.
If you want to share this functionality with other apps, you'd write a
MIDI driver plugin. Otherwise you can just put the I/O user client
code in your app.
Are there timing issues to consider, or do I just use
the serial port9s nominal speed and read/write the raw streams? Am I
missing something? Would polling be necessary to read from the port?
The USB user client has asynchronous read/write routines, and this is
preferable to doing your I/O on blocking threads.
Doug
--
Doug Wyatt
work: email@hidden (CoreAudio)
personal: email@hidden
http://www.sonosphere.com
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.