I2S Interface

Started by Tom, August 05, 2013, 03:51:57 AM

Previous topic - Next topic

Tom

Hello,

can i use the i2s interface on the a20 to connect it to an external dac ? If so, what are the capabilities of this interface (16, 24 or 32 bits and 48Khz, 192Khz or higher? ). My dac is capable of 32bit, 384Khz. Will the olinuxino be able to deliver 24bit at least ? And if so, do i need any drivers for it or is i2s built into linux-kernel like usb-audio ?

Thumbs up for your products !!!
Tom

XFer

Olimex staff is on vacation until 18th I think.

From the I2S specs of the A20, I gather 192KHz/24bit is the max supported rate.

Fernando

Tom

Quote from: XFer on August 05, 2013, 11:21:32 AM
Olimex staff is on vacation until 18th I think.

From the I2S specs of the A20, I gather 192KHz/24bit is the max supported rate.

Fernando

The Question is, is this the build-in solution with the onboard dac or do the same limits apply to the i2s interface and external dacs ? And which are the i2s pins on the a20 board ?

Tom

XFer

The limit of 192/24 applies to the I2S bus as well, not only to the onboard ac97 DAC.
This is from the A20 datasheet.
Unfortunately I don't know which are the I2S pins on the Olinuxino board.  :(

Fernando

Tom

Hope the Olimex guys will be able to help after their vacation. The i2s interface was my number 1 reason for bying the olimex a20.

HeHoPMaJIeH

According to fex file :

i2s_mclk = port:PB05<2><1><default><default>
i2s_bclk = port:PB06<2><1><default><default>
i2s_lrclk = port:PB07<2><1><default><default>
i2s_dout0 = port:PB08<2><1><default><default>
i2s_dout1 =
i2s_dout2 =
i2s_dout3 =
i2s_din = port:PB12<2><1><default><default>

Pins are :
GPIO-3
PB05 = pin 10
PB06 = pin 12
PB07 = pin 14
PB08 = pin 16
PB12 = pin 22

~Best

Tom

Quote from: HeHoPMaJIeH on August 16, 2013, 12:33:31 PM
According to fex file :

i2s_mclk = port:PB05<2><1><default><default>
i2s_bclk = port:PB06<2><1><default><default>
i2s_lrclk = port:PB07<2><1><default><default>
i2s_dout0 = port:PB08<2><1><default><default>
i2s_dout1 =
i2s_dout2 =
i2s_dout3 =
i2s_din = port:PB12<2><1><default><default>

Pins are :
GPIO-3
PB05 = pin 10
PB06 = pin 12
PB07 = pin 14
PB08 = pin 16
PB12 = pin 22

~Best

I did not see this. Thanks for the help.

Tom

mattcamp

#7
Hi,

Was there any progress on this?

I am attempting to do something similar using an mbed audio codec board... this has been successfully used on a Raspberry Pi (http://www.noiseisgood.co.nz/?p=365) so I'm hoping I can also make it work on an OLinuXino A20.

Thanks to this post I've been able to locate most of the necessary I2S pins, but I'm wondering where to find I2C SDAO and SCLK? The fex file doesn't seem to mention i2c.

Does anyone know where the i2c pins are presented on the A20?


Tom

Quote from: mattcamp on October 08, 2013, 05:47:21 PM
Hi,

Was there any progress on this?

I am attempting to do something similar using an mbed audio codec board... this has been successfully used on a Raspberry Pi (http://www.noiseisgood.co.nz/?p=365) so I'm hoping I can also make it work on an OLinuXino A20.

Thanks to this post I've been able to locate most of the necessary I2S pins, but I'm wondering where to find I2C SDAO and SCLK? The fex file doesn't seem to mention i2c.

Does anyone know where the i2c pins are presented on the A20?

At the Moment i am using an xmos controller to convert from i2s to usb, but i will try next week to use i2s directly with my dac. It did not work on the old r2 debian, i hope it will run on r4.
Why do you want to use this board ? The Dac inside a20 is higher quality than the ti dac on this board. On the rpi its an improvement, because the sound of rpi is horrible, but a20 already has a decent dac onboard, so you dont need cheap addon boards like the one you want to use.
If you want high quality-sound use an ess9018 in higher end implementation or an 1541 if you don't need hd sound.

mattcamp

Quote from: Tom on October 09, 2013, 02:03:49 AM

At the Moment i am using an xmos controller to convert from i2s to usb, but i will try next week to use i2s directly with my dac. It did not work on the old r2 debian, i hope it will run on r4.
Why do you want to use this board ? The Dac inside a20 is higher quality than the ti dac on this board. On the rpi its an improvement, because the sound of rpi is horrible, but a20 already has a decent dac onboard, so you dont need cheap addon boards like the one you want to use.
If you want high quality-sound use an ess9018 in higher end implementation or an 1541 if you don't need hd sound.

I need decent quality stereo line-in recording capability, and the on-board port appears to be mono only.

The plan was always to use an ess9018 or similar once I could verify that the A20's I2S implementation was good enough... the mbed TI board was just a cheap and fast way to test this (in theory!)

mattcamp

Hmm... I just realised that LINEINL and LINEINR are represented on GPIO pins 32 and 34... I wonder if I can use those instead.

I'll start another thread about this to avoid hijacking this one.

mattcamp

Actually, following an afternoon spent hanging out in the sunxi irc channel, I now have a patched kernel which works great with the line-in stereo audio on GPIO1.

Big thanks to Oliver for debugging that with me... an official patch should be in the kernel soon.

XFer

Quote from: HeHoPMaJIeH on August 16, 2013, 12:33:31 PM

i2s_dout0 = port:PB08<2><1><default><default>

GPIO-3
PB08 = pin 16

Problem: PB08 (GPIO-3 pin 16) is multiplexed: serves both as I2S_DOUT0 and as SATA_POWER_ENABLE.
How can we manage this?

Thanks

Fernando

neslekkim

got these from ti samples:
http://no.mouser.com/ProductDetail/Texas-Instruments/TAS5760MDDCA/?qs=sGAEpiMZZMtxdzBvM0rKcavhplf%252b7cH9ojUkeZnu%252bQg%3d

can i just connect this to the a20 and get sound out?, is the i2s compatible that way?

Tom

As written above, nobody knows about the i2s implemantation. It seems to be messed up, since it uses the same pin as sata_power_enable. But who know, the guys at Olimex do not respond to this problem. I don't need the sata power enable function and i would even cut the wire if i knew which...
Olimex please help here. What to do about the pb08 multiplex problem ?