Close

It's ALIVE!

A project log for HiFi audio codec module

A very small HiFi audio CODEC module

michele-perlaMichele Perla 12/22/2015 at 23:550 Comments

Hey guys,

yesterday night I managed to build one prototype (at the cost of my sleep and mental sanity), here it is:

FRONT

BACK

Making this only left me 4 hours of sleep before going to work, and I was still nowhere near the end: I NEEDED CODE.

I spent all today making and testing a little add-on for the Teensy Audio Library (which I promptly forked) that lets you (read: me) control the module inside the Audio Library. Right now the AudioControlAK4558 class only has a working enable() method, an internal write() method to perform single register writes, and an internal readInitConfig() method that is run at power-up and copies all the default register values locally (in RAM) and also prints them on the Serial port. This allows us to:

1) Check if the chip is alive (if we receive all the correct default values, it is alive)

2) Edit the registers copy in RAM as you would with any AVR/ARM register (bit-wise operations) and then write them on the CODEC

I already mapped all registers (luckily there's only 10 of 'em) as well as all bit names so to easily perform such operations.

The "sanity test" is passed correctly (the Teensy 3.0 I'm using for the tests correctly read all registers) but there's something strange going on the MISO/MOSI lines; while the three clocks lines are all set properly, the MISO/SDTI and MOSI/SDTO lines show a 1.4circa MHz about 600 mV p/p , centered at 200ish mV above ground. The most strange thing is that the issue persists even if I detach the HiFi Audio CODEC Module and program the Teensy to a pre-existing Audio Library example using I2S (anyone using the SGTL5000 CODEC).

Here's a video for the lazy guys who don't want to read:


TL:DR:

I built one prototype, it powers up and works correctly but it does not output any sound due to some stange bug on the MISO/MOSI lines.

Conclusions:

I tried to stay within the 23.59 UCT limit set to today and I think I did it (after all, the module IS working), but the deadline has been postponed (woohoo) and I would have never left this bug unresolved anyway, because it makes the CODEC useless (no ins, no outs? no party).

Stay tuned.

Discussions