Zynthian dac adac light ready for codec development

Yes, DRC should defo have picked that up. I check my boards dozens of times and still mistakes occur.

I have updated the GitHub repo with my current works. You should remove the old codec driver /lib/modules/6.6.51+rpt-rpi-2712/kernel/drivers.spdif_duplex.ko as the current version installs a compressed version with the right name and in the right location. (We learn something new every day!)

I am not sure why the build without source is not working for @stojos. I am fairly sure that I didn’t install kernel sources on my machine. I can’t see them and can’t think why I would have done that. I wonder if there is another package I have that enables building kernel modules.

Try ticking more options. My DRC does throw up errors:

[Edit] It is not the checkboxes (unless “Test for parity between PCB and schematic” did something). I get the errors even without those tickboxes. It must be some lame ruleset!

Yes, I disabled some rules due to 5102 and 1808 footprints from lscs braking some. I will check why that caused to disable such important rule as well.

@riban, did you use at all master clock on pin 7 in the codec ? I assume not and single card should work without pin 7 be connected - right ?

No, the MCLK is generated by the PCM1808 and comsumed by the PCM5102 on the same board. I have fixed the other board now (I too needed to remove the capacitor to cut the track this time) and also configured it as slave so will join the two boards to test 4 channel i/o.

[Edit] BTW, because we are slaving RPi to MCLK, it refuses to start the sound system until the soundcard is attached. This means the system seems to not come up.

1 Like

Here is the full installation how to get zynthian working with this card:

ssh to zynthian box
ssh root@<your-zynthian-ip-address>

Install required build tools
apt install build-essential bc git wget

Install kernel headers
apt-get install raspberrypi-kernel-headers

Install kernel source using rpi-source script following instructions from here. As of time of writing here is what is required to get rpi kernel source:

apt install git bc bison flex libssl-dev
wget https://raw.githubusercontent.com/RPi-Distro/rpi-source/master/rpi-source -O /usr/local/bin/rpi-source && sudo chmod +x /usr/local/bin/rpi-source && /usr/local/bin/rpi-source -q --tag-update
rpi-source

Clone @riban repository with audio codec
git clone https://github.com/riban-bw/zynaudiox8

Go to cloned git repo directory
cd zynaudiox8

Run the following commands

make
make install

In your browser open zynthian web-config page.
Click on audio settings and set the following:

  • click on advance options
  • select Custom Device for Soundcard field drop down
  • enter dtoverlay=zynaudio8x inside Driver Config field
  • enter -P 70 -s -S -d alsa -d hw:zynaudio8x -r 48000 -p 128 -n 2 -i 2 -o 2 -X raw inside jackd options field
  • enter -O complex -t 0.5 -s -88 -p yinfft -l 0.5 inside Aubionotes Options field
  • enter Digital_0,Digital_1 inside Mixer Controls field

Click on Save button
Click on Restart button

@le51 and @tunagenes, here is what you need to fix the left channel audio input wire touching the both pins of the first capacitor C109.

Locate C109 capacitor:

remove capacitor

test capacitor both legs - you will se that they are shorted due to wire going to left pin is also touching the right pin.

make a cut between wire and right capacitor pin

test it again and make sure that capacitors pins are now not shorted

solder the capacitor back

tested again and make sure that it is not shorted

Thks, but I wouldn’t be able to do that hack with the tool I have now. Most important is the driver seems to be working. I will solder the hat with wires to some pcm5102a or pcm1808 ali modules and see if multichannel audio works.

But I still haven’t finished my lunch yet and haven’t installed Oram on my brand new Pi5 …

You can try to cut wire without soldering. For this you just need sharp utility knife

I managed that with one of the cards by getting the point of a scaple as far under the capacitor as I could and carving away at the track until I had shaved enough off. I didn’t have success with this method for the second board so had to desolder the capacitor.

I have two boards connected and getting 4x4 audio, except it loses sync periodically. I currently suspect soldering / wiring so I will double check that.


2 Likes

Maybe master clock is not strong enough when transmitter over long wire to second board.

Did you remove oscillator from another board. I can still see it on top one.

1 Like

It is now! Well spotted. This sounds like success!

2 Likes

A few observations and recommendations:

  • I think the left/right channels may be flipped. Tip is usually left and I think both input and output are reversed.
  • It would have been useful to have the high and low pads indicated on the silkscreen for the configuration solder pads.
  • At least for prototype, it would have been easier for the config pads to not be normalised, i.e. requiring user to solder them.
  • The 40 pin header doesn’t really suit this project were you want to stack the boards with different I2S interfaces used. That could have been done with jumpers to each of the I2S ports.
  • Future design could break out the audio to seperate mono jacks.
  • We could move to a different I2S CODEC chip that supports more ports, like @le51 suggested we could use the PCM 3168 6x8 that gives differential i/o then supplement it with an additional single I2S chip.

This is wrong. Omit the -i 2 and -o 2 parameters. That limits to 2 inputs and 2 outputs. Can also omit -n 2 because that is default.

This is wrong. These chips don’t have mixer controls.

I thought that tip is always right.

Now Google says it should be left. This is easy to fix.

So far, I can confirm that all the kernel sources install procedure, as described by @stojos above, is needed to get @riban driver to be compiled.
But lsmod doesn’t show the driver, jack and zynthian wouldn’t start as aplay and arecord did not show anything too.
I will first check my solderings.

Agreed. Will do next time.

Yes, I rushed it to get produced. You can’t believe how much space normal pin header take. 40 pin is still ok to stack them together.
You can use stacking header and cut https://shop.pimoroni.com/cdn/shop/products/2x20_2_of_2_b5e0faab-d10d-4459-87de-89e54705b268_768x768_crop_center.JPG

Yes for bigger pcb. Not for small hat. I am thinking to add one more input which will be possible to fit into a single hat. I think that there will be a lot of interest to buy raspberry audio hat with two inputs and one output outside of zynthian project fir less than 30£.

Yes, this was never supposed to be for 4 stereo input and 4 stereo output solution. It is more to prove new rpi 5 i2s capabilities. Although it can if stacked. When I add another 1808 input to hat, two hats stacked can give you 2 stereo output and 4 stereo inputs which I think is ideal. I am not sure who would need 4 stereo outputs.

There are many use cases including send / return loops, direct outputs, headphone monitoring feeds, etc. I am looking forward to Christmas when I get 16 inputs and 8 outputs.

Also, think mono, not stereo.

1 Like

Agreed