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?