A question for DAC builders using the SRC4392

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi folks,

I'm working on my second DAC project, and I've run into a problem working with the SRC4392. Maybe someone here has some insight.

I'm sending I2S from a Raspberry Pi into the Port B serial port, but it only works with 24-bit data and there doesn't appear to be a register option for 16-bit I2S. I could tell Volumio to upsample to 24-bit, but that kinda defeats the purpose of the SRC. Port B is set up as a slave.

Background:
My first DAC was a simple PCM5142 driven via I2S from a Raspberry Pi. It worked well and sounded surprisingly good. It is compatible with the Allo Piano DAC driver, so I used that.

https://www.diyaudio.com/forums/digital-line-level/313760-starting-simple-dac.html

The PCM5142 seems to be happy receiving 16- or 24-bit data at any speed from 44.1 to 192 , but the SRC4392 isn't so accommodating.

The new one has an SRC4392 between the RPi and the PCM5142, with the DAC driven at 192kHz 24-bit by a better clock. I'm programming the 4392 from an Arduino Uno, thinking I might eventually add other inputs to the 4392 and make it a digital pre.

The format options for Port B (Register 05) are:

24 bit Left Justified
24 bit I2S - this works perfectly for 24-bit files
16, 18, 20, or 24 bit right justified

I thought 24-bit I2S would work with different data lengths, since it's MSB first. But no.

Has anyone made 16-bit work with the SRC4392 serial ports?

BTW, this forum is an amazing resource and a great community!

Thanks,
Peter
 
It works with up to 24 bits. In slave mode, it is for you to format the data accordingly, as the attached device is now bus master. There is no need to explicitly define the word length with Left-Justified or I2S data as the MSB does not move with word length unlike Right-Justified data.
Perhaps MarcelvdG can chime in. His valve dac uses the SRC4392.
 
Last edited:
MarcelvdG and rfbrw,

Thanks for the replies. Sounds like your expectations were the same as mine :)

I have Port B running as a slave driven by the RPi over I2S. The SRC takes the data from Port B and then Port A outputs it at a fixed 24-bit 192kHz to the PCM5142.

Playing a 24-bit music file on the Pi works fine, but playing a 16-bit file there is no output.

One interesting thing is that I have an LED driven from the RDY pin, which will light when the SRC completes the rate estimation process. It blinks when I change file type, but lights just fine for both 16-bit and 24-bit signals. Does that imply that Port B is correctly receiving the data, or does it mean only that the clock is being received correctly?

Thanks for your help,
Peter
 
Does no output mean complete silence or -48 dB?

Page 25 of the datasheet says explicitly that a bit clock rate of two times the wordlength times the LRCK frequency should suffice in slave mode.

The not-RDY signal goes low when both sample rate tracking loops have switched to slow mode, so that means that the SRC4392 recognizes the word clock LRCK and its frequency is OK. It doesn't say anything about the data.
 
A little more info:

If I play 24-bit or 32-bit files at any sample rate from 44.1-192 it works fine. 16-bit files at 44.1 or 48kHz result in silence. As far as I can tell it's zero output rather than -48dB.

I made a mistake on the PCB; I was so worried about keeping the signals from the SRC4392 to the PCM5142 as clean as possible that I didn't add any test points and there's nowhere I can easily connect logic probes to look at the data flowing between them. I can't find test clips that will work on either chip.

But I did take a look at the PCM5142 registers, and they all stay the same even when I'm trying to play 16-bit files. In other words, the 5142 thinks it's receiving a valid clock from the 4392, and isn't indicating any problem.

As far as I can tell this all implies that the SCR4392 is refusing to output a 24-bit version of the 16-bit data. Either the SRC isn't converting it, or Port A won't output it.

I have posted a question in the TI forums, so hopefully I get some insight from there.

Peter
 
And one more piece of info:

I'm using the Allo Piano DAC driver on the Raspberry Pi, since the Piano also uses a PCM5142. I suppose it's possible that there is something funky about the way that particular driver is communicating when it sends the 16-bit files. Eventually I will attempt to create an overlay driver file for my own DACs.

The driver is talking directly to the PCM5142 via I2C for things like volume control, but the I2S is being intercepted by the SRC4392.

I'm going to take another look at the I2C data sent from the Pi when file type is changed.

Peter
 
Update:

I have a workaround that seems fine. I told Volumio on the RPi to upsample everything to 32-bit but keep the native sample rate. I chose 32-bit rather than 24-bit since Volumio reports some 24-bit files as 32-bit when playing them back, and I didn't want to have it down-sampling anything. Probably a small overhead since it's just stuffing zeros onto the end of shorter samples. Works flawlessly and sounds great :)

I posted the same question on the TI forums, but with no apparent resolution. When I send 16-bit I2S into Port B (set up as a slave) the SRC4392 locks OK, but what comes out Port A is bit clock and word clock but no data.

It's a mystery, but solving it is now on the back burner.

Peter
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.