1 (edited by djrecipe 2012-04-26 09:33:25)

Topic: Chumby Hacker (v2) MIDI & I2S Help?

Hey all, just wondering if anyone has attempted to use the I2S interface on the Chumby Hacker Board.  I have verified that all the pins I need are broken-out to one of the connectors (shared with the LCD pins)...  Has anyone successfully utilized I2S? Any tips/pointers, before I dive into the Linux kernel?

EDIT:
thanks to this wonderful link: http://forum.chumby.com/viewtopic.php?id=5448 ... I have found a listing of all of the registers and their associated memory location.

It seems that the I2S interface (referred to in the IMX23 Reference Manual as the Serial Audio Interface [SAIF]) registers begin at 0x80042000.

HW_SAIF1_CTRL @ 0x80042000
HW_SAIF1_CTRL_SET @ 0x80042004
HW_SAIF1_CTRL_CLR @ 0x80042008
HW_SAIF1_CTRL_TOG @ 0x8004200C
HW_SAIF1_STAT @ 0x80042010
HW_SAIF1_STAT_SET @ 0x80042014
HW_SAIF1_STAT_CLR @ 0x80042018
HW_SAIF1_STAT_TOG @ 0x8004201C
HW_SAIF1_DATA @ 0x80042020
HW_SAIF1_DATA_SET @ 0x80042024
HW_SAIF1_DATA_CLR @ 0x80042028
HW_SAIF1_DATA_TOG @ 0x8004202C
HW_SAIF1_VERSION @ 0x80042030

I will be using code examples to combine my already operational Chumby Hacker MIDI interface with some I2S output to an external DAC so-as to have my own custom synthesizer! I will update later.  If you're interested, I got my DACs for FREE from TI's website (http://www.ti.com/product/pcm1795).

... and for the pinouts:

SAIF1_DATA0 -> LCD_D09 -> LCD_T_G3 -> P401, pin 12            [audio data]
SAIF_MCLK_BITCLK -> LCD_D10 -> LCD_T_G4 -> P401, pin 13  [bit clock]
SAIF_LRCLK -> LCD_D11 -> LCD_T_G5 -> P401, pin 14              [left/right clock]
SAIF_ALT_BITCLK -> LCD_D16 -> LCD_T_R4 -> P401, pin 20      [alternate bit clock?]

2 (edited by guyc 2012-05-07 19:49:58)

Re: Chumby Hacker (v2) MIDI & I2S Help?

Interesting.  Until you posted this I wasn't even aware of the I2S interface.  I would be grateful if you kept us up to date.  When you have it sorted, I'd love to add your code to the collection of CHB I/O samples I've been collecting.

If you are doing register access on the CHB in C++ you might find the gpio class here useful - gives you a clean abstraction and #defines for symbolic names for the pins.