GithubHelp home page GithubHelp logo

mmm444 / eie-pro-linux Goto Github PK

View Code? Open in Web Editor NEW
23.0 19.0 3.0 29 KB

Playground for Akai EIE Pro Linux driver

License: GNU General Public License v2.0

Makefile 2.08% C 94.70% Python 3.07% Shell 0.15%

eie-pro-linux's Introduction

eie-pro-linux

Linux driver for Akai EIE Pro sound interface. The current development status is highly experimental.

The driver is by no means stable or ready to use.

The USB part of the driver is probably nearly finished but the ALSA and (error) state handling require more work.

The exp directory is a libusb "driver" prototype capable of simutaneous playback and capture of all 4 channels at 44.1 kHz.

The driver is heavily inspired by the ua101 driver from the Linux kernel source tree.

USB protocol

The USB device is identified by vednor ID 0x09e8 and product ID 0x0010. It has 1 configuration with 2 interfaces. When alternate setting 1 is applied on both interfaces and an intilization control sequence is sent to endpoint 0 the device becomes fully operational. It sends clock, audio and midi and expects audio and midi. The audio has always 24-bit depth. The audio input and output run at the same frequency. There are 4 possible frequencies: 44100, 48000, 88200 and 96000 Hz.

Initialization sequence

Before any other communication takes place the card is initialized with the following sequence of USB control messages.

RType Req Value Index Len Data Comment
0xc0 0x56 0x0000 0x0000 3 31 01 04 get firmware version, probably, mine FW is 1.04
0xc0 0x56 0x0000 0x0000 5 31 01 04 the same again with larger buffer
0xc0 0x49 0x0000 0x0000 1 32 ? 50 in decimal
0xa2 0x81 0x0100 0x0000 3 44 ac 00 get current sampling rate
0x22 0x01 0x0100 0x0086 3 44 ac 00 set sampling rate
0x22 0x01 0x0100 0x0002 3 ? ?, when sampling rate is sent again nothing bad happens
0x22 0x01 0x0100 0x0086 3 44 ac 00 set sampling rate again
0xa2 0x81 0x0100 0x0086 3 44 ac 00 verify rate
0xc0 0x49 0x0000 0x0000 1 32 ? again 50
0x40 0x49 0x0032 0x0000 0 ? 50 sent using value

The Data column is in hex. When RType is less then 0x80 it means is the data is sent to the card, received otherwise.

The only thing I am sure about is that the sampling rate of the card is set here. The 3 bytes are simply little-endian representation of the sampling rate.

  • 44 ac 00 = 0xac44 = 44100
  • 80 bb 00 = 0xbb80 = 48000
  • 88 58 01 = 0x15888 = 88200
  • 00 17 01 = 0x11700 = 96000

Interface 0 Endpoint 2 Iso Out - Audio Out

The audio is sent interleaved in little-endian byte order. The bytes are tightly packed and all 4 channels are always present so each audio frame has 12 B. The ISO packets are sent every 5ms (USB clock). Each contains 40 USB microframes evenly filled with audio frames. The number of audio frames in each USB frame should be equal to the number of audio frames elapsed as measured by the clock on the card.

Interface 0 Endpoint 3 Bulk In - MIDI In

9 B transfers of raw MIDI data "randomly" interleaved with 0xfd.

Interface 0 Endpoint 4 Bulk Out - MIDI Out

9 B transfers where first 1-4 (usually 3) bytes are raw MIDI data padded with 0xfd and ended with 0xe0.

Interface 1 Endpoint 1 Iso In - Clock

Every microframe received is 3 B long. The first byte contains the number of audio frames processed on the card since the last USB microframe was sent. The 2nd byte contains the number that was first in the previous microframe and the 3rd is the first from one frame before. They just shift.

Interface 1 Endpoint 5 Bulk In - Audio In

Each audio frame (4 channels, 24-bit) is stored in 64 B. In each byte only 2 least significant bits are used. The decoding to 4 24-bit values looks like this:

ch1 = ch2 = ch3 = ch4 = 0;
for (i = 0; i < 24; i++) {
	ch1 |= ( in[i+ 0]       & 1) << (23-i);
	ch2 |= ( in[i+32]       & 1) << (23-i);
	ch3 |= ((in[i+ 0] >> 1) & 1) << (23-i);
	ch4 |= ((in[i+32] >> 1) & 1) << (23-i);
}

eie-pro-linux's People

Contributors

jforberg avatar mmm444 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eie-pro-linux's Issues

Sample rate

How can i change sample rate to 48khz? I have issue that sounds are slowed down and more "bass boosted". It's reminds me issue on windows with my DAW when i set up my card to 44,1khz i had the same problem

How to run or install this driver

Hi,

I'm not a totaly linux freak, far from, but i know the basics, maybe just basics basic, however, even with audio on linux i am new. (Though I am definitly a big linux liker)

So I come from windows, and like to work with reaper, and know I am doubting to give it another shot on linux.

Abvious, I also have the AKAI eie pro.

Can I try this driver, how do I install it and simpliest check it works?

Clearly there is no spellcheck on here, so sorry for my english.

I was thinking to try Ardour3 as a daw, but as it seem I can not even run it, It blocks at creating new session in the begining,
anyhows,
It might be also cool for others if you also get some text on it on how to try/install this driver.

Kind greetings,
Sam.

Integration into mainline Linux?

I've been using this driver for several months now without any real issues. Granted, I only tested audio playback and not recording.

Do you @mmm444 think we could try to get the driver integrated to Linux mainline? It seems to me like some support would be better than none for the Linux community.

Do you see any major roadblocks to mainline support for EIE pro?

(I'm a professional C programmer doing device driver work for Linux but strictly in a proprietary setting. I don't have much experience with mainline as such).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.