IQaudio Codec Zero

  • Hello,

    I'm new to LibreELEC. I have just installed it on a Raspberry Pi 4 and I'm having troubles getting my DAC to work, this is an IQaudio Codec Zero (IQaudio Codec Zero).

    I have used this in the past with Raspbian and ALSA without issues.

    In the config.txt I have added the following line:

    Code
    dtoverlay=iqaudio-codec

    When I go to Setup > System > Audio I see the DAC listed under the Audio output device. The options I have there are:

    - ALSA: Default (IQaudIOCODEC IQaudIO CODEC HiFi v1.2 da7213-hifi-0)

    - ALSA: IQaudIOCODEC, IQaudIO CODEC HiFi v1.2 da7213-hifi-0

    - PI: HDMI

    - PI: Analogue

    - PI HDMI and Analogue

    - PULSE: Default, Bluetooth Audio (PULSEAUDIO)

    However, I select the first or the second option I have no sound... with the 3rd option I have the sound through my TV speakers.

    Logging in via SSH I can see the audio card with aplay -l:

    And with aslamixer I can adjust the volumes. However, If I run the speaker test from the command line I do not hear any sound and this ends with the following error:

    Modules seem to be ok:

    Code
    LibreELEC:~ # lsmod | grep snd
    snd_soc_da7213         40960  1
    snd_soc_iqaudio_codec    16384  0
    snd_soc_bcm2835_i2s    20480  2

    However, seems there is a problem with the codec:

    Any idea on what I could try to solve this?

    Thank you!

  • Sorry, but RTFM. It says you have to comment out dtparam=audio=on at config.txt and reboot.

    I forgot to mentioned I have commented out the dtparam=audio=on line in the config.txt file.

    Below is my full config.txt file:

    And below is my distroconfig.txt file:

    Code: distroconfig.txt
    # SPDX-License-Identifier: GPL-2.0-or-later
    # Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
    
    # WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!
    dtoverlay=vc4-fkms-v3d
    disable_overscan=1
  • It's an I2S device, so activate dtparam=i2s=on at config.txt.

    I had that uncommented yesterday and just tried to uncomment it right now. With  dtparam=i2s=on activated it's still the same.

    I still get the same error when trying to run a speaker test from the command line:

    Modules seem to be ok:

    Code
    LibreELEC:~ # lsmod | grep snd
    snd_soc_da7213         40960  1
    snd_soc_iqaudio_codec    16384  0
    snd_soc_bcm2835_i2s    20480  2

    But still issues with the codec:

  • I have used this same HAT for more than a year with a RPi3B+ with Raspbian and was working without issues. I will try with Raspbian on the RPi4B and see if this is an hardware issue with the RPi4B.

  • Hi all,

    Today I managed to get IQaudio Codec Zero DAC to work on RPi4 with the latest version of LibreELEC. Below are the steps needed to make this work in case somebody else has the same issue.

    First of all in the config.txt file there is no need to add dtoverlay=iqaudio-codec nor dtparam=i2s=on. Just comment out dtparam=audio=on.

    In /storage/.config/ create the asound.conf with the following content:

    Download from https://github.com/iqaudio/Pi-Codecone of the example configuration file, edit this as needed and copy it over to the /storage/.config/ folder.

    In the /storage/.config/ folder create a file named autostart.sh with the following content:

    Code: /storage/.config/autostart.sh
    (
    sleep 20
    alsactl restore -f /storage/.config/IQaudIO_Codec_OnBoardMIC_record_and_HP_playback.state
    )&

    Make the autostart.sh scrip executable (chmod +x) and then reboot. :)