I just bought a BeagleBoneBlack Rev C, and after flashing SD (with latest release v0.3.8a), flashing eMMC and putting on the Bela cape I have, when I tried to run an example patch, I get the "Error: unable to initialise audio codec".
Following some similar problems I saw on the forum, I checked if the codec was detected on the i2c bus, and here are my findings:
After booting, if I login into Bela and run i2cdetect -y -r 2, I get the correct readings:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
However, if I run a Bela audio program, I get the error. Here is a detailed description:
Running project ...
Starting with period size 16 ;analog enabled
DAC level 0.000000 dB; ADC level 0.000000 dB; headphone level -6.000000 dB
Detected hardware: Bela
Hardware specified by user:
Hardware specified in belaconfig:
Hardware to be used: Bela
fifoFactor: 1
core audioFrames: 16
Project name: exampleTempProject
PRU memory mapped to ARM:
digital: 0xb6154000 0xb6154400
audio: 0xb6155000 0xb6155040 0xb6155080 0xb61550c0
analog: 0xb6145000 0xb6145080 0xb6145100 0xb6145180
analog offset: 0xffff2000 0xffff2080 0xffff2100 0xffff2180
Failed to write register 1 on I2c codec
Failed to reset I2C codec
Error: unable to initialise audio codec
Error: unable to initialise audio
Makefile:595: recipe for target 'runide' failed
make: *** [runide] Error 1
Bela stopped
After this, if I run the i2cdetect -y -r 2 again, it takes A LOT to do the scanning, and it returns:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
So, since I have another BeagleBone board (Wireless version, does not work consistently, that is why I bought the regular Black), I put the cape on that, and it works just fine.
Therefore my guess is that there is something wrong with the actual Bela program on the new board.
Could anybody point me to a solution?
Many thanks!