setup audio card results in codec not registered message

  • Hi all,

    I recently bough an audioinjector octo card to use with my RPi3B running libreELEC 8.95.

    While setting up I ran into a few problems, due to beeing a newbie in the raspberry world.

    I followed the setup guide and adopted the /flash/config.txt while appending following lines:

    Code
    dtparam=spi=on
    dtparam=i2c_arm=on
    dtoverlay=audioinjector-addons
    dtdebug=1

    "aplay -l" still gives me:

    Trying to research the reason the new card is not detected, I called dmesg and got following error messages:

    Code
    [    6.638581] audioinjector-octo soc:sound: ASoC: CODEC DAI cs42448 not registered - will retry
    [    6.638598] audioinjector-octo soc:sound: snd_soc_register_card failed (-517)

    The device tree setup debug messages via "vcdbg log msg" look unsuspecious so far.

    By what I read online, the setup should be pretty self explaining, since all the drivers are already part of the os.

    I guess I missed some settings. Does anyone have experience with setting up an external audio card or even the octo and could give me some advise?

    /shrug

    I would highly appreciate this.

    Thanks, mohawi

  • In general I2S soundcards should work fine, but I'm not familiar with the audioinjector octo card.

    Can you please post the full dmesg and vcdbg log msg output?

    Code
    vcdbg log msg 2>&1 | paste
    dmesg | paste

    You seem to have dtparam=audio=on in config.txt, drop that, it's not needed. Also not sure why you have spi=on and i2c_arm=on in config.txt- the devicetree overlay should enable all components so in general it's enough to add the dtoverlay line.

    so long,

    Hias

  • I just tried to use the card with libreELEC v8.2.5 and with that it works just like a charm.

    After upgrading to 8.95.1 again, same error as before. Seems as if the codec drivers are not compatible maybe?

  • Could you check if the card works in Raspbian with kernel 4.19?

    First install Raspbian Stretch and add the soundcard config, the card should be detected.

    Then run the following command to switch to kernel 4.19

    Code
    sudo BRANCH=next rpi-update

    Then reboot and check if the card is still detected.

    The LibreELEC kernel config looks fine (all drivers should be there) but IIRC the Audioinjector Octo driver was dropped for some time in kernel 4.19 because it didn't compile - maybe the driver isn't fully working yet in kernel 4.19.

    so long,

    Hias

  • Hi Hias,

    I checked and the error messages are exactly the same. So then it seems the removed driver is the reason. Whose responsibility is that? Should I write a bug for the raspberry kernel, since the driver was removed due to, I guess changed interfaces, or the developer who wrote the driver in the first place?

    Or is there a good chance, that this issue is already known and in work?

    best regards,

    Mohawi

  • Thanks a lot for testing!

    It'd be best to contact Matt Flax (who created the card and wrote the driver) and tell him that the driver doesn't work on kernel 4.19. He can then submit the required changes to the RPi kernel where we will pick them up.

    Opening an issue on RPi kernel github would be another possibility, but as probably only Matt has the hardware and knows what to change contacting him directly would probably be easier/quicker.

    so long,

    Hias

  • Hi all,

    I am remote during the holiday period and don't have an octo with me. It seems that all the necessary drivers are present in raspbian :

    snd-soc-audioinjector-octo-soundcard.ko

    snd-soc-cs42xx8*

    audioinjector-addons.dtbo

    This is the first I have heard of problems with the card and libreelec.

    I will validate its operation when I return later this month using the latest raspbian.

    Matt

  • Hi flatmax, thank you for looking into the problem.
    I don't know if I did everything correctly, but I wasn't able to verify your fix. I gonna describe the steps I took:

    1) Verify OctoCard is working with currently released RaspianStretch Kernel 4.14.y

    - set the dtoverlay to audioinjector-addons in /boot/config.txt

    --> worked

    2) Take the provided .deb file from your repo (v0.4) and install this

    - check /boot/config.txt still has the dtoverlay set to audioinjector-addons

    --> worked

    3) update to Kernel 4.19.17 via "sudo BRANCH=next rpi-update"

    - check /boot/config.txt still has the dtoverlay set to audioinjector-addons

    --> octo card was not found (neither after soft, nor hard reset)

    4) take provided .deb file from your repo (v0.4) and install

    --> Kernel was set back to 4.14.y

    --> worked, but basicly same setup as in step 2

    5) - update back to Kernel 4.19.17

    - check /boot/config.txt still has the dtoverlay set to audioinjector-addons

    - copy "audioinjector-addons-overlay.dts" from commit 8f862eec9ff66cbeefeea2b3611f5391ba737e55 to raspberry

    - compile .dtbo via "dtc -O dtb -o audioinjector-addons.dtbo audioinjector-addons-overlay.dts"

    --> got following warnings:

    audioinjector-addons.dtbo: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property

    audioinjector-addons.dtbo: Warning (unit_address_vs_reg): Node /fragment@1 has a unit name, but no reg property

    audioinjector-addons.dtbo: Warning (unit_address_vs_reg): Node /fragment@2 has a unit name, but no reg property

    - copied compiled dtbo to /boot/overlays

    - rebooted

    --> octo card is still not dected (neither after soft, nor hard reset)

    logs of step 5):
    dmesg log: http://ix.io/1zpd

    vcdbg log: http://ix.io/1zpe

    Best regards,

    Mohawi

  • An initial fix is up on the github issue (see message above).

    The fix is to load the snd_soc_cs42xx8_i2c module at boot time. For example add this to your /etc/modules file.

    This makes your modules file look like the following :

    pi@raspberrypi:~ $ cat /etc/modules

    Code
    i2c-dev
    snd_soc_cs42xx8_i2c

    I will update the device tree soon to make sure it autoloads in future releases.