However signal is maybe not right. It is too jittery (could be due to primitive hantek not being able to sample it fast enough. LRCK amplitude is 1.8V while BCK is 3.6V. Last time when I used oscilloscope properly was in University lab in late 80s so I could be wrong.
I did not measure master clock frequency because my Hantek can not cope over 20MHz. However it must be correct when pcm1808 is producing proper BCK and LRCK frequencies from it.
Ah, it looks like that LDO is very important. I can see it even on a cheap pcm5102 cards from aliexpress. I though that they only put it there so that only 5V need to be supplied.
That looks good. It occurs to me now that my osciloscope may have struggled with the bandwidth. It is a 100MHz scope but I didnât pay much attention to that side so maybe the leads or config I used could have been flawed⌠or maybe using the RPi as the PSU may influence results.
You could now test a round-loop audio path to see if both ADC & DAC are working. With the board isolated and powered like you have done, you could connect the DIN to the DOUT and then see if audio fed into the analogue input appears at the analogue output.
if you plug card to zynthian do not enable non USB audio when testing signals. If you enable non USB audio card they will probably set rpi to be i2s master and they will produce LRCK and BCK that will clash with what PCM1808 is producing and you will hear clicking.
Here is LRCK when used with hifiberry-dac audio card setting where raspberry codec is set as is2 master and producing LRCK that is clashing with PCM1808 LRCK clock.
Also if you ground master clock on PIN 7 PCM1808 will not produce anything because there is no master clock and you can use hifiberry-dac driver because there will be no clash and it will play without clicking on cards PCM5102. So I think what we need is still just a proper codec to be developed and hardware is OK.
[EDIT] I donât have any audio source at the moment to plug in to test what happens if you short data in and out pins which should link digital data form PCM1808 into PCM5102. I have tested it simple by plugin cable into audio in jack and touching the right or left channel on another end of cable. I hear promising common buzz either on left or right speaker when you do that without again any clicking. Which means all this clicking is only related to codec that must be slave and listen without producing any clocks and not to hardware.
Yay! That sounds really good news. We need to enable the I2S in clock consumer (slave) mode. The simple audio thingy that you previously mentioned seems like a good starting point. I hope we can do this with overlays and not need to develop a driver. Indeed, the kernel I2S driver seems to support 8 channels already. I look forward to playing with it further when I am back in the wrokshop.
add that Digital in and out will be for both stacked boards routed to the same pins 39 and 40.
But some dirty hacking with wires or Dupont (and/or Dupond) cables should do the trick.
If you cut data in and out pins (39 and 40) it would not be propagated (connected) to other stacked card(s) that will reroute their 39 and 40 pins to appropriate pins.
Pin 7 will be used for propagating master clock required by pcm1808 but this is just for testing.
Final design will be different once we get this working. Probably we will add LDOs, missing oscillator caps and multiple pairs of this on a single card.
If we get this working a figure out how to add bias for instrument input and fantom power for microphone we can get zynthian to be very rich 8 channel mixer with effects and recording.
this is another story, but itâs in my long term objectives too
For multichannel audio, this base makes sense IMO for intermidiate setup (like 2 stereo IN + 2 stereo out), for a full 8 ins+outs, pcm3168 should be a better option (one pcm3168 + one pcm1808 chip vs 8 chips),.
Weâre not quiet there âŚ
To build and install: dtc -@ -H epapr -O dtb -o zyndacadclite.dtbo -Wno-unit_address_vs_reg test4.dts && cp zyndacadclite.dtbo /boot/firmware/overlays/
I started to work on making 8 outputs work but got stuck. The GPIO are enabled in this dts but I havenât yet figured out how to make multiple outputs.
We should actually get the input working next. There isnât an overlay for the PCM1808 and I do not have time now to investigate further but I have clean tone coming our of my zyndacadc-lite card so can stop for a few hours and do some real work.