Raspberry Pi DAC with PCM5102

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi,
I want to design a DAC with the PCM5122 for the RPI. All my former designs were 5102 or 1794 that were preconfigured without sda lines.
Now with the 5122 i would like to use hardware mixer and its sda lines for configuration.
Does someone know what the best gpios are to maintain compatibility with hifiberry or iqaudio dacs, so i dont need to write my own driver.
My design is a hobby project, and i would like to skip the eeprom. Is this possible or does volumio or rune need this eeprom to recognize the soundcard ?
Which sda adress should i use ?
 
PCM5242

Ive just built a dac using the pcm 5242 and i2c, see attached pic. signals required from the pi are as follows

I2C
SDA
SCLK

I2S
Data
LRCLK
BCLK

and the correct driver selected in your player software
 

Attachments

  • 20170618_125106.jpg
    20170618_125106.jpg
    1 MB · Views: 650
Thank you, but my problem is the other side. Which GPIOs did you use on the rpi?
I think for i2c i will have to use pin 3 and 5, right?
And what about ADR1 und ADR2 on the pcm5122? Which adress ? Hifiberry is 1,0 if i remember correctly.
Did you use an i2c eeprom ? Is this requiered for proper functioning?
 
adr1 I grounded and adr2 I left floating (I think I should have grounded this to but it didn't have any impact).

i2C pins on the pi were i2c data pin 3 i2c clk pin 5

Bclk pin 12
data pin 40
lrclk pin35

Dac
Mode pins 17 low 18 high for i2c

and a little tip, quality of power rails has an enormous effect on the sound quality. this is where the pre built pi hats fail big time ;-)
 
Last edited:
I have not personally tried the Piano. My initial testing was with the iqaudio dac pro and the odroid hifi shield 2. I did try using super caps but this did not yield the gains made by using silmic II caps around the dac. The Hifi Shield is a very competent dac but it is bettered by the IQaudio Pro. this can be improved by putting big caps on the dac supply lines but makes for a very flimsy easy to break solution. This is why I decided to have a go myself and yes this is my first attempt at a dac. I have done high power mono blocks before...

Now for the sound quality

the light version with just pi and dac was very nice and a notable improvement over the pi hats.

the next step was to introduce the cpld switching and kali. this made a large improvement with very open soundstage awesome bass and a very clean presentation. I see why allo called their dac the piano as Piano is just in a different league.

I have also tried no kali but with separate analogue and digital supply rails. this one had me gobsmacked as I did not expect it to sound any different to the light version however it is easily as good as the kali equipped board and when it comes to percussion and seperation I feel this config is a little ahead.

I have yet to try kali and dual rails but this will be next...

Alas as this is basically an experimental prototype. I don't have any to sell (their are several mistakes on my PCB). and it wasn't cheap as DIY goes (I recon around £250 for all parts on a fully kitted board) plus lots and lots of time .

However sound wise I recon it will easily keep up with a £2k piece of kit (although its not in a cool machined ally case hehe)

This was not as hard to do as I expected and I am tempted to try the AKM4497 for my next attempt :)

DIY Rules
 
@drgnanam:
Nearly all hat dacs are powered by the raspberry, so they receive very bad power. If you power them from external psu they sound much Better.
But seperated analogue and digital power lines with the pcm51xx line of dacs is not recommended. If both voltages drift more than 0.3V apart, your dac ic can get destroyed.
Best results with the pcm51 dacs can be achieved with linear psus.
But as with all raspberry pi dacs, you need to know, that they all suffer from jitter problems. Only if you reclock the i2s lines, you get really highend output.
Second problem is, that ALL voltageout Dacs, like the pcm51 series tend to have a very limited soundstage. If you want a dac that can place instruments in a room, go current out with a nice i/v stage. Even a poor i/v implementation sound often better than a good voltage out dac.

@sparkwizard:
Where do you buy the akm ics ? I cant find them anywhere.
 
Last edited:
@drgnanam:
Nearly all hat dacs are powered by the raspberry, so they receive very bad power. If you power them from external psu they sound much Better.
But seperated analogue and digital power lines with the pcm51xx line of dacs is not recommended. If both voltages drift more than 0.3V apart, your dac ic can get destroyed.
Best results with the pcm51 dacs can be achieved with linear psus.
But as with all raspberry pi dacs, you need to know, that they all suffer from jitter problems. Only if you reclock the i2s lines, you get really highend output.
Second problem is, that ALL voltageout Dacs, like the pcm51 series tend to have a very limited soundstage. If you want a dac that can place instruments in a room, go current out with a nice i/v stage. Even a poor i/v implementation sound often better than a good voltage out dac.

@sparkwizard:
Where do you buy the akm ics ? I cant find them anywhere.

AKM can be got from mouser or digikey I think.

This I dissagree with no seperate power rail statement , a. the reference designs clearly show three independent 3.3v rails and b. the rails are all regulated to 3.3v via ultra low noise regulators so why would they drift. c. in my design the 3.3v regs are fed by 5V pre regulators and these are fed with 9.5v lines x 2 one for digital supplies and 1 for the dac analog supplies. Jitter is taken out with a kali and personally i used a 5242 as differeial out was a must (most certainly not a narrow sound stage I can sure you.).
 
Ive just built a dac using the pcm 5242 and i2c, see attached pic. signals required from the pi are as follows

I2C
SDA
SCLK

I2S
Data
LRCLK
BCLK

and the correct driver selected in your player software


Is there a PCM5242 specific driver for this chip or are you relying on the PCM512x driver that is in the raspberrypi kernel? I'll looking for a PCM5242 specific driver and don't see any on the web.
 
Is there a PCM5242 specific driver for this chip or are you relying on the PCM512x driver that is in the raspberrypi kernel? I'll looking for a PCM5242 specific driver and don't see any on the web.

I suspect that there aren't any, as even IQAudio use the 5122 driver for their 5242 board. which is the same one used by Sparkwizard:

Pi-DAC Pro I2S audiophile sound card for Raspberry Pi

What is it that you think you are missing?
 
What is it that you think you are missing?

I'm not using this driver for my design, I'm looking for example drivers so that i can use it to reference and create my own firmware for a different project. My project is a Teensy 3.6 connected to a PCM5242 DAC. So I will refer to the PPCM512x driver to see if it helps me at all. Thanks for your help!
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.