HummingBoard Pulse & i.MX8M Plus missing audio devices

Hi,

I’m missing the audio devices on my HummingBoard Pulse & i.MX8M Plus.
I’m using the yocto gatesgarth imx8mpsolidrun image provided by solidrun.
aplay -L only display the null and die pulse audio interface, no hardware audio interfaces.

I found some messages around the audio interfaces in dmesg:

[    1.827337] fsl-sai 30c30000.sai: failed to get bus clock: -517
[    1.835206] fsl-easrc 30c90000.easrc: failed to get mem clock
[    1.843562] imx-cdnhdmi sound-hdmi: failed to find SAI platform device
[    1.850122] imx-cdnhdmi: probe of sound-hdmi failed with error -22

[    6.213189] wm8904 1-001a: supply DCVDD not found, using dummy regulator
[    6.218952] basler_camera_driver_vvcam: loading out-of-tree module taints kernel.
[    6.222899] at24 0-0050: 256 byte 24c02 EEPROM, writable, 16 bytes/write
[    6.223725] wm8904 1-001a: supply DBVDD not found, using dummy regulator
[    6.223769] wm8904 1-001a: supply AVDD not found, using dummy regulator
[    6.223807] wm8904 1-001a: supply CPVDD not found, using dummy regulator
[    6.223845] wm8904 1-001a: supply MICVDD not found, using dummy regulator
[    6.230431] wm8904 1-001a: Failed to read ID register: -6

Complete dmesg output:https://pastebin.com/rZ5BkNmf
Did you have any ideas what could be the problem

Best regards, Jonas

Support for this hardware has been added in our upcoming hardknott yocto release, and should be able to be integrated into gategarth as well. The kernel repository is here GitHub - SolidRun/linux-stable at lf-5.10.72-2.2.0-sr and the meta layer and official image will be out this week.

I still get into trouble with audio playback using your pre-built image, imx8mp_yocto_hardknott-5.10.72-2.2.0/imx-image-full-imx8mpsolidrun-20220225.rootfs.wic.bz2. wm8904 is found by gst-device-monitor-1.0

Device found:

        name  : wm8904-audio
        class : Audio/Sink
        caps  : audio/x-raw, format={ (string)S32LE, (string)S24_32LE, (string)S16LE }, layout=interleaved, rate=[ 8000, 96000 ], channels=2, channel-mask=0x0000000000000003
        properties:
                device.api = alsa
                device.class = sound
                alsa.card = 1
                alsa.card_name = wm8904-audio
                alsa.driver_name = wm8904-audio
                alsa.name = wm8904-audio
                alsa.id = wm8904audio
                alsa.mixername = ""
                alsa.components = ""
        gst-launch-1.0 ... ! alsasink device="hw:1\,0"

but the process of playing audio test is failed as below.

root@imx8mpsolidrun:~# gst-launch-1.0 audiotestsrc ! alsasink device="hw:1\,0"
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstAlsaSink:alsasink0: Could not get/set settings from/on resource.
Additional debug info:
../git/ext/alsa/gstalsasink.c(658): set_hwparams (): /GstPipeline:pipeline0/GstAlsaSink:alsasink0:
Unable to set hw params for playback: Invalid argument
ERROR: pipeline doesn't want to preroll.
ERROR: from element /GstPipeline:pipeline0/GstAlsaSink:alsasink0: Could not get/set settings from/on resource.
Setting pipeline to NULL ...
Additional debug info:
../git/ext/alsa/gstalsasink.c(982): gst_alsasink_prepare (): /GstPipeline:pipeline0/GstAlsaSink:alsasink0:
Setting of hwparams failed: Invalid argument
ERROR: pipeline doesn't want to preroll.
Freeing pipeline ...

In addition, pactl doesn’t find wm8904.

root@imx8mpsolidrun:~# pactl list sinks
Sink #0
        State: SUSPENDED
        Name: alsa_output.platform-sound-hdmi.stereo-fallback
        Description: Built-in Audio Stereo
        Driver: module-alsa-card.c
        Sample Specification: s32le 2ch 44100Hz
        Channel Map: front-left,front-right
        Owner Module: 6
        Mute: no
        Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor Source: alsa_output.platform-sound-hdmi.stereo-fallback.monitor
        Latency: 0 usec, configured 0 usec
        Flags: HARDWARE DECIBEL_VOLUME LATENCY
        Properties:
                alsa.resolution_bits = "24"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "imx8 hdmi i2s-hifi-0"
                alsa.id = "imx8 hdmi i2s-hifi-0"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "audio-hdmi"
                alsa.long_card_name = "audio-hdmi"
                alsa.driver_name = "snd_soc_imx_cdnhdmi"
                device.bus_path = "platform-sound-hdmi"
                sysfs.path = "/devices/platform/sound-hdmi/sound/card0"
                device.form_factor = "internal"
                device.string = "hw:0"
                device.buffering.buffer_size = "35264"
                device.buffering.fragment_size = "8816"
                device.access_mode = "mmap"
                device.profile.name = "stereo-fallback"
                device.profile.description = "Stereo"
                device.description = "Built-in Audio Stereo"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card"
        Ports:
                analog-output: Analog Output (type: Analog, priority: 9900, availability unknown)
        Active Port: analog-output
        Formats:
                pcm

Is there any article such as Audio Quick Start in your wiki?