Skip to content

Commit

Permalink
LNL alsabat test to support both USB Codec/AudioPlug loopback setup
Browse files Browse the repository at this point in the history
Signed-off-by: Santosh Avati <[email protected]>
  • Loading branch information
ubuntu authored and ssavati committed Sep 10, 2024
1 parent 172d5a1 commit 6d99d78
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions test-case/check-alsabat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,37 @@ then
exit 2
fi

# Check device for AudioPlug Loopback enabled or not for LNL HDA
if [ "$AUDIOPLUG_LOOPBACK" == "true" ] && [ "$MODEL" == "LNLM_RVP_HDA" ]; then

dlogi "The Device have AUDIO PLUG LOOPBACK enabled for LNLM_RVP_HDA"

# Check for playback/capture used USB codec, if yes replace with headset device
if [ "$pcm_c" == "hw:CODEC,0" ]; then
pcm_c="hw:sofhdadsp,0"
dlogi "Capture device changed to $pcm_c"
else
pcm_p="hw:sofhdadsp,0"
dlogi "Playback device changed to $pcm_p"
fi
fi

# Check device for AudioPlug Loopback enabled or not for LNL SDW
if [ "$AUDIOPLUG_LOOPBACK" == "true" ] && [ "$MODEL" == "LNLM_SDW_AIOC" ]; then

dlogi "The Device have AUDIO PLUG LOOPBACK enabled for LNLM_SDW_AIOC"

# Check for playback/capture used USB codec, if yes replace with headset device
if [ "$pcm_c" == "hw:CODEC,0" ]; then
pcm_c="hw:sofsoundwire,1"
dlogi "Capture device changed to $pcm_c"
else
pcm_p="hw:sofsoundwire,0"
dlogi "Playback device changed to $pcm_p"
fi
fi


check_locale_for_alsabat

# reset sof volume to 0dB
Expand Down

0 comments on commit 6d99d78

Please sign in to comment.