Skip to content

Commit

Permalink
lib.sh: fix SOF card ID acquisition failure
Browse files Browse the repository at this point in the history
The SOF card is renamed in linux kernel,
our regular expression for old nameing style
only works under SoundWire and HDAudio, not SOF.
But SOF card information in /proc/asound/cards
still contains 'sof-[a-z]' pattern.

This patch updates the regular expression for
acquiring SOF card ID.

Fixes: #420

Signed-off-by: Amery Song <[email protected]>
  • Loading branch information
Amery Song authored and xiulipan committed Oct 16, 2020
1 parent 1265273 commit 9875242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion case-lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi

# setup SOFCARD id
if [ ! "$SOFCARD" ]; then
SOFCARD=$(grep '\]: sof-[a-z]' /proc/asound/cards|awk '{print $1;}')
SOFCARD=$(grep 'sof-[a-z]' /proc/asound/cards|awk '{print $1;}')
fi

func_lib_setup_kernel_last_line()
Expand Down

0 comments on commit 9875242

Please sign in to comment.