Motu 828mkII driver development
Being the owner of a Motu 828mkII, I was disappointed that there are no Linux drivers available for it. Furthermore, Motu does not seems to be interested in supporting Linux:
"MOTU have been hostile to the idea of Linux driver development for their FireWire products. It is unlikely we will ever support these unless they change their minds."
(source:Freebob wiki at http://freebob.sourceforge.net/index.php/List_of_Supported_Devices)
So I started collecting information about the device's hardware and the ieee1394 traffic.
Changelog for this document
2006-05-22 Minor updates, deprecated pre-alpha jack driver
2006-03-28 Added links and jack driver
2006-01-11 stream connection update, added useful tools
2005-11-22 SPH, connection management / configuration section, stream connection, motuplay-0.1.tar.bz2, dumpisochannels-0.1.tar.bz2
2005-11-17 initial version
Links
Useful tools
Hardware
- Controller Chips (IMG)
- A/D Converters (IMG)
- AKM AK4528VF: 24bit 96kHz Audio CODEC
IEEE1394 traffic analysis
I hooked my Linux box in beetween a Windoze box and the Motu 828mkII:

grey cable: Motu 828mkII
black cable: Windoze box
Having the Motu already connected and plugging in the Windoze box, results in these syslog entries: motu_connection1.log
I don't know what exactly happens there, but it looks like the negotiation of SelfIDs, the bus master and IRManager.
After this, the isochronous channels 0 and 1 are occupied. It seems that channel 0 is used by the Windoze driver and channel 1 is used by the Motu device.
NOTE: The following only applies, if Motu's Optical IN/OUT is set to NONE!
Playing out a 44k1 Hz stream from my Windoze box, I can obtain these logs with dumpiso -c 0 dumpiso_44100_playmains.log
Formatted, it looks like this:
channel=0 length= 8 tag=1 cycle=2818 sy=0 dropped=0
000d04208222ffff
channel=0 length= 424 tag=1 cycle=2819 sy=0 dropped=0
000d04288222ffff00b0407800000000000000000000000000000000000000000000000000000000
0000000000000000fa2afff9b6ff00000000000000b042a500000000000000000000000000000000
0000000000000000000000000000000000000000f9d300f95b0000000000000000b044d200000000
0000000000000000000000000000000000000000000000000000000000000000f97700f8feff0000
0000000000b047000000000000000000000000000000000000000000000000000000000000000000
00000000f91c00f89fff00000000000000b0492d0000000000000000000000000000000000000000
00000000000000000000000000000000f8bdfff841ff00000000000000b04b5a0000000000000000
00000000000000000000000000000000000000000000000000000000f86000f7df00000000000000
00b05188000000000000000000000000000000000000000000000000000000000000000000000000
f800fff77f0000000000000000b053b5000000000000000000000000000000000000000000000000
000000000000000000000000f7a000f71c00000000000000
After some reformatting it looks like this:
channel=0 length= 8 tag=1 cycle=2818 sy=0 dropped=0
CIP: 000d0420 8222ffff
channel=0 length= 424 tag=1 cycle=2819 sy=0 dropped=0
CIP: 000d0428 8222ffff
SPH ???
HeadpL HeadpR 1
2
3
4
5
6
7
8 MainL
MainR SPD L SPD R
00b04078
000000000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 fa2aff f9b6ff 000000 000000
00b042a5
000000000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 f9d300 f95b00 000000 000000
00b044d2
000000000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 f97700 f8feff 000000 000000
00b04700
000000000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 f91c00 f89fff 000000 000000
00b0492d
000000000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 f8bdff f841ff 000000 000000
00b04b5a
000000000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 f86000 f7df00 000000 000000
00b05188
000000000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 f800ff f77f00 000000 000000
00b053b5
000000000000 000000 000000 000000 000000 000000 000000 000000 000000
000000 000000 f7a000 f71c00 000000 000000
Note
that the blue parts and blanks were inserted by me.
The CIP header is almost the same for all packets:
SID: 0x02 (Source Node ID: Windoze)
FN: 0x00
QPC: 0x00
SPH: 0x01 (Packet contains source packet header)
FMT: 0x02
FDF: 0x22 (Basic format for 32-bit Floating Point Data)(somehow WRONG! see comment below)
DBS: 0x0d (CLUSTER_DIMENSION = DBS = 0x0d = 13)
SYT: 0xffff
DBC: data block count: changes with every packet
FDF/DBS: Each source code block (each line in the above) is 0x0d (DBS) * 32 bit (FDF) = 416 bits = 52 bytes long
The first 4 byes of each line seem to represent the wordclock or the SYT. (See Jonathan's protocol document for this.)
The following 6 bytes were always 0 during my tests (maybe MIDI is transferred here...).
The following 3 byte columns represent each of the channels playable by the motu: Headphones L/R, analog channels 1-8, MainOuts L/R, S/PDIF L/R (?).
When dumping the MainOuts L/R data to Linux's audio system, I can listen to the music transferred on the wire. The audio data format is Signed 24bit RAW PCM Big Endian.
ISO channel 1 seems to be formatted accordingly.
The SPH (Source Packet Header) contains these fields:
|_______|___________________|
7 bits 25 bits
rsv time stamp
Connection management / Configuration
Have a look at these great logs (local mirror) by Jody McIntyre.
Based on these, I found out the following things:
sampling rate
Write to register 0xFFFFF0000b14:
0x00000000 SR = 44100Hz
0x00000008 SR = 48000Hz
0x00000010 SR = 88200Hz
0x00000018 SR = 96000Hz
Optical I/O, Phones assignment
Write to register 0xFFFFF0000c04:
0x00000x0y
where x is
0 Optical In: None
1 Optical In: Adat
2 Optical In: TOS Link
added to
0 Optical Out: None
4 Optical Out: Adat
8 Optical Out: TOS Link
and y is
1 Phones -> Phones
2 Phones -> Analog 1-2
3 Phones -> Analog 3-4
4 Phones -> Analog 5-6
5 Phones -> Analog 7-8
6 Phones -> Main Outs
7 Phones -> SPDIF
Clock source
I annotated Jody's logs: 2005-11-19.3_comments. Please note the data written to offsets 0xc60 - 0xc6c containing the ASCII values of the clock source. These registers are written a lot of times - often with the value "Internal".
stream connection
To get the Motu streaming out/reading in data, use the following sequence:
R c18: 0x00000000
W b2c (0x00000c01)
R b14: 0x00000000
R c04: 0x03000006
W b04 (0xffc20001)
W b08 (0x00000000)
W b14 (0x21000000)
W c60 (0x496e7465)
W c64 (0x726e616c)
W c68 (0x20202020)
W c6c (0x20202020)
W b10 (0x000000c2)
W b14 (0x00000000)
W b00 (0xc0c10000)
W c60 (0x496e7465)
W c64 (0x726e616c)
W c68 (0x20202020)
W c6c (0x20202020)
W b14 (0x20000000)
W b14 (0x21000000)
W b00 (0x80810000)
W c60 (0x496e7465)
W c64 (0x726e616c)
W c68 (0x20202020)
W c6c (0x20202020)
W b10 (0x000000c2)
W b14 (0x00000000)
W b00 (0xc0c10000)
W c60 (0x496e7465)
W c64 (0x726e616c)
W c68 (0x20202020)
W c6c (0x20202020)
W b14 (0x20000000)
1. column: R/W: Read/Write
2. column: register offset from 0xFFFFF0000000
3. column: data read from/sent to device
This tiny app is able to send exactly this sequence: motuplay-0.1.tar.bz2
Then, use this dirty app to dump audio channels from your Motu: dumpisochannels-0.1.tar.bz2
dumpisochannels -c 1 | ecasound -i:-
Update: Seems like only one write access is necessary to make the 828mkII stream iso data:
W b00 (0xc0c10000)
This command could be interpreted as:
ISO CHANNEL PC->MOTU 0: c0
ISO CHANNEL MOTU->PC 1: c1
Enable transmission by writing:
0xb00 <= 0xc0c00000 & ((PC2MOTUchan & 0x3f) << 24) & ((MOTU2PCchan & 0x3f) << 16)
Disable transmission by writing:
0xb00 <= 0x80800000
Or in a generic way:
Register 0xb00: 0xAABB0000
AA = A1 A2 A3 A4 A5 A6 A7 A8 Controls PC->MOTU iso channel
A1 = 0 Ignore AA completely
A2 = 1 enable reception on iso channel specified, 0 disable
A3..A8 = iso channel (0..63)
BB = B1 B2 B3 B4 B5 B6 B7 B8 Controls MOTU->PC iso channel
B1 = 0 Ignore BB completely
B2 = 1 enable transmission on iso channel specified, 0 disable
B3..B8 = iso channel (0..63)
DEPRECATED
Jack driver
motu_client.tar.bz2
Note that this driver is PRE-ALPHA and useful for testing only! It has only been proved to work with Motu's 828mkII. Furthermore only recording is available, yet.
You will need to have jack, libraw1394 and 1394commander (see above) installed.
Here's a short post-compile HOWTO:
- modprobe raw1394
- motu settings: 44.1khz
- start 1394commander:
w . 0 0xfffff0000b00 4 0xc0c10000
to make the motu stream iso data
Note: Replace the 0 with the nodeID of your 828mkII (find it via gscanbus)
- start jack server: (I use QJackCtl.)
Frames/Period: 4096
Sample Rate: 44100
Periods/Buffer: 2
- start motu_client
- connect an audio source to Mic/Git 1/2.
- listen to it from your alsa soundcard output
Please send any comments to olaf at solutionworks.de.