Skip to content

Commit

Permalink
lib.sh: fix debugfs fw_path in get_ldc_subdir() and missing sudo
Browse files Browse the repository at this point in the history
One more fix for commit 992efad ("case-lib: lib.sh: use debugfs for
fw_path when available"). There are so many fallbacks in the code that
these ones were kept hidden for long time.

Signed-off-by: Marc Herbert <[email protected]>
  • Loading branch information
marc-hb committed Jun 3, 2024
1 parent 4114012 commit 6a55123
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions case-lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,11 @@ get_ldc_subdir()
{
local subdir='intel/sof' # default
local fw_path
local fw_path_info='/sys/kernel/debug/sof/fw_path'
local fw_path_info='/sys/kernel/debug/sof/fw_profile/fw_path'

# either $fw_path_info exists, OR we redefine $fw_path_info with
# the backwards-compatible alternative based on kernel parameter
test -e $fw_path_info ||
sudo test -e $fw_path_info ||
fw_path_info='/sys/module/snd_sof_pci/parameters/fw_path'

if fw_path=$(sudo cat $fw_path_info); then
Expand Down

0 comments on commit 6a55123

Please sign in to comment.