No audio on intel baytrail minipc

  • Hello,

    I installed libreelec v8.90.008 on a cheap chinese minipc (it says Product model: I5).

    The problems are the following:

    • I get is no audio on analog 3.5 mm output.
    • the video begins to play, but stops after a minute or so. (Video played well on 'stable' libreelec releases, I just hoped audio gets better on alpha)

    Dmesg prints many lines "Baytrail Audio Port: ASoC: no backend DAIs enabled for Baytrail Audio Port".

    - Full hardware specs (GPU is most important)

    intel z3735f

    - The LibreELEC version you are running ('latest' is not a version number)

    LibreELEC (official): 8.90.009 (Generic.x86_64)

    - In most cases a full debuglog

    attached: kodilog20181216.zip

    - Tell us the complete steps how to face the issue, so we can try to reproduce

    I try to play any video, I get no sound from it.

    - Name the specific hardware and maybe a link to the manufactor

    pp_365007.html?wid=1527929

    - Get us the output of 'dmesg' while the hardware is connected

    plenty of:

    [ 2358.053029] Baytrail Audio Port: ASoC: no backend DAIs enabled for Baytrail Audio Port

    - Get us the output of 'lspci' if it's about PCI hardware

    minipc:~ # lspci

    00:00.0 Host bridge: Intel Corporation Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register (rev 0f)

    00:02.0 VGA compatible controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display (rev 0f)

    00:14.0 USB controller: Intel Corporation Atom Processor Z36xxx/Z37xxx, Celeron N2000 Series USB xHCI (rev 0f)

    00:1a.0 Encryption controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Trusted Execution Engine (rev 0f)

    00:1f.0 ISA bridge: Intel Corporation Atom Processor Z36xxx/Z37xxx Series Power Control Unit (rev 0f)

    - Get us the output of 'lsusb' if it's about some USB hardware

    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

    Bus 001 Device 005: ID 413c:3016 Dell Computer Corp. Optical 5-Button Wheel Mouse

    Bus 001 Device 004: ID 413c:2003 Dell Computer Corp. Keyboard

    Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. Hub

    Bus 001 Device 002: ID 0bda:8152 Realtek Semiconductor Corp. RTL8152 Fast Ethernet Adapter

    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    Andrius

    Edited once, last by andrius (December 16, 2018 at 4:10 PM).

  • Thanks for the log!

    It looks like we're missing a firmware file:

    Quote

    [ 2.824531] intel_sst_acpi 80860F28:00: Direct firmware load for intel/fw_sst_0f28.bin failed with error -2

    Could you update to LibreELEC 8.90.009 and then run the following 2 commands

    Code
    mkdir -p /storage/.config/firmware/intel
    wget -O /storage/.config/firmware/intel/fw_sst_0f28.bin https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/intel/fw_sst_0f28.bin

    After that reboot so the kernel can pick up the firmware.

    Please post dmesg again and drop us a line if it worked or not.

    so long,

    Hias

  • Sorry, false alarm, the firmware is already included in the image, so it's something else.

    It looks like the audio driver is built into the kernel and at driver probe time the firmwares from the system image aren't available yet. I'll have a look at it and report back - probably building the audio driver as a module should work fine.

    so long,

    Hias

  • I unzipped the windows driver package I got for this device. The directory /DriverPackage/Installer/PlatformInstaller/Drivers/audio/ contains the following files:

    isstrtc.cat

    isstrtc.inf

    isstrtc.sys

    realtek_fw_sst.bin

    rtii2sac.cat

    rtii2sac.inf

    RTII2SAC.sys

    Maybe this realtek_fw_sst.bin can useful?

  • How do I install it? Usually I put the img file into /storage/.updates

    The tar file you sent is not an img. I guess /target directory contains the image files, but how do I install them?

  • Still no sound output.

    dmesg: http://ix.io/1wdi

    kodi.log: kodilog20181217.zip

    Andrius

  • Thanks a lot for the logs, the firmware error is gone which is a good sign!

    I've checked the alsa-devel mailing list and it looks like baytrail needs some userspace configuration in place before the audio device can be used.

    This stuff (alsaucm) is currently missing in LibreELEC, I'll prepare a new build and post an update when it's finished.

    so long,

    Hias

  • Can you test this build: libreelec-generic.x86_64-9.0-devel-20181217224448-658cde5.tar

    It includes the Alsa UCM configuration tool and files needed to manually setup baytrail audio.

    After boot quickly ssh in and stop kodi so dmesg doesn't get spammed with "no backend DAI" messages:

    Code
    systemctl stop kodi

    Then run alsaucm to configure the audio device

    Code
    alsaucm -c bytcr-rt5640 set _verb HiFi

    Now use speaker-test to check if you can get audio from the analog output / Line out:

    Code
    speaker-test -c 2 -t sine

    Abort speaker-test with control-c after a couple of seconds and then post dmesg - if you didn't get audio it could be because something else is still missing and/or you may need a different firmware file (maybe the one from the windows driver you mentioned).

    If you got audio, start kodi again with systemctl start kodi and check if it works there, too. If it does. add the alsaucm command to autostart.sh to make the configuration permanent.

    so long,

    Hias

  • Still no sound after speaker-test.

    How do I try different firmware?

    Andrius

    minipc:~ # dmesg | paste

    http://ix.io/1wka

    minipc:~ # cat /storage/.kodi/temp/kodi.log | paste

    http://ix.io/1wkb

  • Thanks for the logs! dmesg spam seems to be gone, but there are lots of Alsa errors in the kodi log. I think it's best to focus on getting speaker-test working.

    I looked through the alsaucm docs and noticed I missed an important step: after setting the _verb we also need to enable the (output) device. The output devices "Headphones" and "Speaker" look like good candidates.

    Please try these commands:

    Code
    alsaucm -c bytcr-rt5640 set _verb HiFi
    alsaucm -c bytcr-rt5640 set _enadev Headphones

    Then run speaker-test -c 2 -t sine again and upload dmesg.

    If it didn't work try with the Speakers device - but before we need to disable the Headphones device

    Code
    alsaucm -c bytcr-rt5640 set _disdev Headphones
    alsaucm -c bytcr-rt5640 set _enadev Speaker

    According to the manual using the "reset" command should also work, this should allow us to start from scratch:

    Code
    alsaucm -c bytcr-rt5640 reset
    alsaucm -c bytcr-rt5640 set _verb HiFi
    alsaucm -c bytcr-rt5640 set _enadev Speaker

    Try speaker-test again and grab dmesg.

    If you get any errors on the terminal these would be interesting, too.

    so long,

    Hias

  • _enadev and _disdev give me some errors.

    I'll try to read some docs about them.

  • Yes, this seemingly works somehow with Headphones value. speaker-test is just producing beeps in both ears. Shouldn't it make some sines?

    I'll test Speaker and some movie with kodi.

  • "Speaker" does not produce any sound on my headphones.

    "Headphones" always makes beeps in both ears at the same time, even though the speaker-test says "0 - Front Left" or "1 - Front Right".

    Movie playing in Kodi just makes some strange noise.

    But the beeps are definitely a big progress when comparing with the complete silence :)

    Any ideas - what can I try now?

    Vielen Dank Matthias!

    Andrius