A comment from the peanut gallery, which is eagerly (trying)-following this discussion:
Could it be a matter of setting FMT (pin 12) high, so that the PCM1808 will treat the audio data as left justified? Although I am concerned that that is somehow regarded as an alternative to I2S and I understand that we want I2S.
I donāt think that will help. The problem is that the driver is taking 32 bit words from the ADC but the ADC is only providing 24 bits so it wraps into the next sample and causes the noise. We need to change the driver to accept 24-bit words. The parameters already exists but the driver is not honouring this. I have cloned the driver and am debugging but it uses various helpers so itās more challenging to debug than I had hoped.
I wondered whether the I2S signal was bad but, I just checked and it looks fine. The left and right audio data populates the first 24 bits of each TDM slot. This is true of both input and output.
I have spent a lot of time trying to get the driver to work⦠but so far have failed.
[Edit] Ah! I removed my audio source and grounded the audio inputs and the I2S waveform shows noise!!! So - maybe my effort to fix the driver is in vain. Maybe there is an issue with the board. The noise (with no input signal) is not audible so possibly sub/super-sonic but it is there and could be contributing with the input signal to create the audible noise on input. I tested the output and it is perfectly clean, with zero signal in each TDM slot as each channel is muted.
So we should turn our attention to the circuit design.
Hey! I got clean audio (tone) input⦠There is something odd with the ground. If I plug in my 1/4" jack then i get the noise but if I connect RPi gnd to sleeve and tip to jack input, I get clean tone. So - letās try to forget the hours I spent trying to get the driver to work⦠we need to look at the circuit board!
My dev machine has lots of more code than I have published but I think we donāt need any of that. I will revert to the version on my github and start looking at the circuit design.
@stojos you said that my codec driver would not compile and that you had to do more steps. I donāt understand this. I donāt have the kernel source installed on the RPi5 and it compiles for me. Will you please detail the exact steps you took to make it work for you?
[Edit] I also get white noise if I ground an input.
It seems to be putting a ground on the ring causes the noise (using a mono jack in the stereo socket). If I put a ground on the tip, I donāt get the same issue.
It looks like that input jack is wrongly wired. When I was testing direct i2s link form input to output (no rpi in between) I had the same problem when I plug stereo jack to Macās headphone output - I heard noise. I thought this was because of the microphone 3rd sleeve.
It appears consistent across all the geographically diverse constructed versions�
Buzz the tracks. I fixed a Marshall Amp for someone. in complete track. Could see nothing that didnāt look great, but no circuit. Itās amazing how reconnecting the +12V supply to three quarters of the amps input circuitry helps a design. This turned it from a fascinating device for spontaneous music concrete performances with the compressor controls into a very decent bass amp.