dard
Posts: 3
Joined: Sat May 20, 2017 2:48 pm

Raspberry PI2 I2S ADC

Sat May 20, 2017 11:27 pm

Hi,
I want to connect I2S capable ADC to RPI2 board. I bought board with TI PCM1802 chip, but cannot find additional tutorial on how to mange it to work with RPI2. I read a lot of posts but still cannot figure how to completely manage it to work with the RPI2.
The board with ADC has following pins: SCK(System clock input), PDW(Power-down control), LRCK(Sampling clock input and output), FSY(Frame synchronous clock input and output), BCK(Bit clock input and output), DOUT, GND, 3.3V, 5,5V. I found how to connect few of these pins, but not a complete solution. I have experience with some SPI ADC but I2S is a bit new to me...

dard
Posts: 3
Joined: Sat May 20, 2017 2:48 pm

Re: Raspberry PI2 I2S ADC

Thu Jun 08, 2017 9:28 pm

Just to add a note. Currently I have connected PCM5102A DAC Sound Card Board and it's working well. I'm curious now if I can add my second ADC PCM1802 board in order to have both DAC and ADC connected to RPI at the same time?

User avatar
flatmax
Posts: 336
Joined: Thu May 26, 2016 10:36 pm

Re: Raspberry PI2 I2S ADC

Fri Jun 09, 2017 1:42 pm

Hi there,

To setup your ADC, you will want to implement a machine driver for ALSA or use the simple I2S driver configured in the device tree overlay you will make. There is a very long I2S thread on this forum which can assist you ... they are constantly having successes there :)

Check the supported codecs in Linux here. If you find support for your PCM1802 ADC, then you are in luck !
Personally, I would clone the repo with --depth=1 and grep the codecs directory for any mentions of pcm1802 :

Code: Select all

grep -ri pcm1802 sound/soc/codecs
Regarding running bothe the ADC and DAC off the same I2S bus ... nice idea, and yes I think you can !
Only one clock master shall you have. The Pi, the ADC or the DAC ?
Once you know that, you can craft a machine driver to set up all of your chips to work nicely together.
Examples of machine drivers are in this directory here. Oh and there are probably overlays in arch/arm/boot/overlays which implement the simple machine driver for codecs, check it out !

Matt
Check the Ultra 2 sound card - use our shop instead of Amazon Europe (Amazon USA is live).
Sound card for the Raspberry Pi with inbuilt microphone : www.audioinjector.net
Audio Inector Octo multitrack GPIO sound card

dard
Posts: 3
Joined: Sat May 20, 2017 2:48 pm

Re: Raspberry PI2 I2S ADC

Thu Jun 15, 2017 9:03 pm

Hi,
I will try this as suggested and inform about the progress. Thanks for the helpful reply!
Regards

Lord_potato
Posts: 1
Joined: Tue Nov 28, 2017 4:50 pm

Re: Raspberry PI2 I2S ADC

Tue Nov 28, 2017 4:55 pm

Hi! Did you manage to get it work? I want to do basically the same thing on a zero.

adc_ukr
Posts: 2
Joined: Sat Dec 13, 2014 11:59 am

Re: Raspberry PI2 I2S ADC

Sun Jan 21, 2018 6:43 pm

"Check the supported codecs in Linux here. If you find support for your PCM1802 ADC, then you are in luck !"

If found support codec. Build kernel with this how to https://www.raspberrypi.org/documentati ... uilding.md
And ... what next step?

HiassofT
Posts: 201
Joined: Fri Jun 30, 2017 10:07 pm
Location: Salzburg, Austria
Contact: Website

Re: Raspberry PI2 I2S ADC

Sun Jan 21, 2018 10:26 pm

adc_ukr wrote:
Sun Jan 21, 2018 6:43 pm
If found support codec. Build kernel with this how to https://www.raspberrypi.org/documentati ... uilding.md
And ... what next step?
Create a devicetree overlay to enable the ADC/DAC. Easiest way to do this is via the simple-audio-card driver. Here's a recently added overlay that you can use as an example: https://github.com/raspberrypi/linux/bl ... verlay.dts

Also check the last few pages of the sticky I2S sound thread here where simple-audio-card DT overlays were discussed in detail.

so long,

Hias

Return to “Interfacing (DSI, CSI, I2C, etc.)”