LNL alsabat test to support both USB Codec/AudioPlug loopback setup#1231
LNL alsabat test to support both USB Codec/AudioPlug loopback setup#1231
Conversation
Signed-off-by: Santosh Avati <santosh.kumar.avati@intel.com>
| fi | ||
|
|
||
| # Check device for AudioPlug Loopback enabled or not for LNL SDW | ||
| if [ "$AUDIOPLUG_LOOPBACK" == "true" ] && [ "$MODEL" == "LNLM_SDW_AIOC" ]; then |
There was a problem hiding this comment.
you probably want to avoid using the MODEL, we can use this test on previous generations as well.
There was a problem hiding this comment.
This is a big hack with a lot of ugly hardcoding :-(
I think there is a much simpler, more flexible and more reliable way. Something like this (untested)
usb_audio_found()
{
aplay -l | grep -q 'USB Audio'
}
if [[ "$pcm_p" =~ CODEC ]] && ! usb_audio_found; then
dlogi "No USB audio found, discarding pcm_p=$pcm_p"
unset pcm_p
fi
# <same thing for pcm_c>
# default values for pcm_p
if [ -n "$pcm_p" ]; then
case $MODEL in
*HDA) pcm_p=...;;
...)
*) die "No default pcm_p for MODEL=$MODEL"
esac
dlogi "Using default value pcm_p=$pcm_p for MODEL=$MODEL"
fi
# <default values for pcm_c>
|
BTW do you know why we have all these SKIPs? https://sof-ci.01.org/sofpr/PR9455/build7827/devicetest/index.html?model=LNLM_RVP_HDA&testcase=check-alsabat-nocodec-32bits-599 |
I am not sure why we have an alsa-bat test that's specific to the nocodec mode, but it makes sense that it would only be applied to nocodec platforms and skipped for both HDaudio and SoundWire platforms. |
This is also fragile in that it will fail if there's a USB device connected by accident. |
These loopback setups involve a fair amount of cables and are a bit tedious to install, it's not really something anyone has been connecting "by accident".
The main issue is: we don't have a reliable way to maintain per-device settings (in fact we don't even have a reliable way to maintain consistent settings either). Unlike hardware configuration "accidents", software configuration accidents have been happening regularly. Considering it's impossible for a device to be able to test both configurations, merely echoing the hardware configuration in a configuration file manually seems just error-prone with no value. All this being said, |
No description provided.