I am getting the following ALSA error when running eiq_genai_flow with asr enabled
Currently we are using the SGTL5000 module, the system can detect it.
Is it possible to configure the default sound card?
root@imx95aom5521a1:~/dm-eiq-genai-flow-demonstrator/eiq_genai_flow# ./eiq_genai_flow
Target Device: i.MX95
LLM used: danube-onnx
TTS model used 16kHz quantized
ALSA lib confmisc.c:855:(parse_card) cannot find card 'default'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_card_inum returned error: No such device
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1342:(snd_func_refer) error evaluating name
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM sysdefault:CARD=default
Exception in thread Thread-5 (handle_playback):
Traceback (most recent call last):
File "threading.py", line 1075, in _bootstrap_inner
File "threading.py", line 1012, in run
File "tts/model.py", line 179, in handle_playback
File "tts/player.py", line 23, in __init__
File "tts/player.py", line 28, in open_pcm_device
alsaaudio.ALSAAudioError: No such device [sysdefault:CARD=default]
root@imx95aom5521a1:~/dm-eiq-genai-flow-demonstrator/eiq_genai_flow# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: soundhdmi [sound-hdmi], device 0: 42670000.sai-i2s-hifi i2s-hifi-0 [42670000.sai-i2s-hifi i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sgtl5000 [sgtl5000], device 0: HiFi sgtl5000-0 [HiFi sgtl5000-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
root@imx95aom5521a1:~/dm-eiq-genai-flow-demonstrator/eiq_genai_flow#
Hi,
As outlined in the hardware requirements, the current demo is limited to EVKs equipped with the WM8962 audio codec. That’s why it doesn’t work with other codecs like the SGTL5000.
The upcoming release, planned for this quarter, will lift this restriction and allow the use of any codec — stay tuned!
Thanks and best regards,
Pierre
this configure file is for audio card and device configuration, maybe you can try to set your own codec here
After modifying "audio_config.sh", another error message occurs
root@imx95aom5521a1:~/dm-eiq-genai-flow-demonstrator/eiq_genai_flow# ./audio_config.sh capture
i.MX95
sysdefault:CARD=sgtl5000
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch cswitch-joined
Capture channels: Front Left - Front Right
Limits: Capture 0 - 15
Front Left: Capture 15 [100%] [on]
Front Right: Capture 15 [100%] [on]
root@imx95aom5521a1:~/dm-eiq-genai-flow-demonstrator/eiq_genai_flow# ./audio_config.sh playback
i.MX95
sysdefault:CARD=sgtl5000
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 127
Mono:
Front Left: Playback 110 [87%] [3.50dB] [on]
Front Right: Playback 110 [87%] [3.50dB] [on]
Here is the configure script I modified:
#!/bin/bash
# Copyright 2025 NXP
# NXP Proprietary.
# This software is owned or controlled by NXP and may only be used strictly in
# accordance with the applicable license terms. By expressly accepting such
# terms or by downloading, installing, activating and/or otherwise using the
# software, you are agreeing that you have read, and that you agree to comply
# with and are bound by, such license terms. If you do not agree to be bound
# by the applicable license terms, then you may not retain, install, activate
# or otherwise use the software.
audio_card_list() {
cards=$(awk -F '[][]' '/\[.*\]/ {print $2}' /proc/asound/cards)
echo "$cards"
}
get_audio_card() {
supported_cards=$1
device_cards=$2
for s_card in $supported_cards; do
for d_card in $device_cards; do
if [[ "$s_card" == "$d_card" ]]; then
echo "$d_card"
return 1
fi
done
done
echo "default"
}
get_device() {
# get architecture type
arch=$(uname -m)
soc_id=/sys/devices/soc0/soc_id
if [ "$arch" == "x86_64" ]; then
echo "PC"
elif [ -f "$soc_id" ]; then
cat $soc_id
else
echo "ERROR"
fi
}
audio_setup() {
mode=$1
device=$(get_device)
echo $(get_device)
#supported_cards="wm8962audio wm8960audio"
supported_cards="sgtl5000 wm8960audio"
cards=$(audio_card_list)
cur_card=$(get_audio_card "$supported_cards" "$cards")
if [[ "$device" != "PC" ]]; then
echo "sysdefault:CARD=$cur_card"
if [[ $mode == "capture" ]]; then
if [[ $cur_card == "sgtl5000" ]]; then
amixer -c sgtl5000 sset 'Capture' 60
elif [[ $cur_card == "wm8960audio" ]]; then
amixer -c micfilaudio cset name='MICFIL Quality Select' 'High'
amixer -c sgtl5000 sset 'Capture' 60
else
echo "'$cur_card' audio card doesn't exist"
fi
elif [[ $mode == "playback" ]]; then
if [[ $cur_card == "sgtl5000" ]]; then
amixer -c sgtl5000 set 'Headphone' 110 on
elif [[ $cur_card == "wm8960audio" ]]; then
amixer -c sgtl5000 set 'Headphone' 125
else
echo "'$cur_card' audio card doesn't exist"
fi
else
echo "'$mode' mode doesn't exist use 'capture' or 'playback'"
fi
else # PC
echo "$cur_card"
fi
}
if [ $# -eq 1 ]; then
audio_setup "$1"
else
echo "ERROR!"
echo "setup audio for capture or playback"
echo "usage: audio_config.sh {capture,playback}"
fi
do you have any local DFAE support? currently, imx95 is still under prepordcution stage, I couldn't share any internal document or code with you, I suggest that you can contact local DFAE to get further support, and what new errors do you get? let me check if I can share anything here with you
Here is the new error message
root@imx95aom5521a1:~/dm-eiq-genai-flow-demonstrator/eiq_genai_flow# ls
LICENSE.txt _internal asr audio_config.sh eiq_genai_flow install.sh llm rag tts
root@imx95aom5521a1:~/dm-eiq-genai-flow-demonstrator/eiq_genai_flow# ./eiq_genai_flow
Target Device: i.MX95
LLM used: danube-onnx
TTS model used 16kHz quantized
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM i.MX95
Exception in thread Thread-5 (handle_playback):
Traceback (most recent call last):
File "threading.py", line 1075, in _bootstrap_inner
File "threading.py", line 1012, in run
File "tts/model.py", line 179, in handle_playback
File "tts/player.py", line 23, in __init__
File "tts/player.py", line 28, in open_pcm_device
alsaaudio.ALSAAudioError: No such file or directory [i.MX95]
Please type your question: