Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4848

Device Tree • Re: Using TI PCM3168A audio codec on RP5

$
0
0
Thanks for the swift response!
The chip receives SCLK (24.576 MHz) from an oscillator. The MSAD and MSDA registers on the chip control whether the ADC/DAC are clock consumers/producers and the SCLK:Fs ratio (if producer). The ADC and DAC each have their own LRCK and BCLK pins - when configured as consumer, these are inputs; when configured as producer, they output the I2S clock signals generated by the chip. I have connected the ADC and DAC clock pins together, and to the RPi I2S clock pins (i.e. all 3 LRCKs connected, all 3 BCLKs connected).
For playback, data flows from the Pi I2S_SDO1/2/3/4 to the DIN1/2/3/4 pins on the PCM3168A. For capture, data flows from the PCM3168A DOUT/1/2/3 pins to the Pi's I2S_SDI1/2/3. (I'm assuming by "usage modes" you mean playback and capture).
When I was running this without the snd_soc_pcm3168a driver, I manually configured registers via I2C so that the DAC was producer with Fs ratio of 256 and the ADC was consumer. The Pi was utilising the I2S clock consumer modules (as you see in my DTS) and could simultaneously playback and capture. The challenge is to figure out how to get the driver to configure this correctly, so that it happens automatically (and ALSA can control all the chip's advanced settings like gain).
I hope this is clearer...

Statistics: Posted by gordoste — Fri Nov 22, 2024 11:20 am



Viewing all articles
Browse latest Browse all 4848

Trending Articles