I submitted two pull request to make the Elk Pi Hat work again with 1.1.0 / Xenomai 4 / EVL.
Nothing special about it, I just changed the deprecated gpio calls to the newer gpiod stuff.
Here are the Github links:
BTW, the drivers are full of bugs and inconsistencies. I might clean them up eventually.
Also I’m looking forward to get sensei going again. I think the idea is really smart. But I don’t think that a real time driver running at 1 kHz is necessary. I wrote some user space code for the Ek Pi Hat and tested it with the Blackboard. Seems to work fine. I just have to find out how to integrate it the best way with the other software.
I’m trying to get the Elk Pi working as an ALSA soundcard, but somehow the CPLD gets in the way.
The Elk guys obviously refuse to give out the CPLD source code (or maybe they even don’t have it anymore).
In the so called drivers the PCM3168a codec is configured as clock master with TDM format. Eight channels are multiplexed into one LRCK frame of 256 BCKLs, 128 hi, 128 lo. The CPLD is there to demultiplex the TDM LRCK into 32 clock chunks.
The last days I have been running JTAG boundary tests on the CPLD, but I have not been able to figure out the exact logic when the clock chunking kicks in.
What I can confirm is:
Once the clock chunking kicks in, you can clock in random bits on the LR clock input and you will get a stable 32 LR clock output. But it is not necessarily aligned with the TDM frame.
I have no idea how this thing is even able to have I2S data synced at all.
I see…
Let’s hope that they can eventually release it once they see the new requests.
It looks like they are busy with other things going on, which sadly happens quite often even if other projects depend on them.
Could you maybe please try to dump the CPLD flash memory and make a .jed image from the JTAG ?
You sound way more competent in this field than I am but I’d be happy to help in any way.
Some messing with ChatGPT told me that this should work if the security fuse of the CPLD is not active.
This would be of great help for my project, as I only aim to get a working elkpi/pcm3168a board on elkos 1.1 and pi4. Though I get that it wouldn’t help you use it as alsa so if you don’t have time for this no worries.
Cheers and wish you success !!
Hi there, I ordered an elkpi from someone on Reverb, once I receive it I’ll try to dump the CPLD memory in hope to be able to flash my own boards once I have them made.
I’ll try your patches out to see what’s up