Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions tools/kmod/sof_insert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,29 @@

insert_module() {

local MODULE="$1"
local MODULE="$1"; shift

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shift? is this required?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes to remove the module name from "$@" below


if modinfo "$MODULE" &> /dev/null ; then
printf 'MODPROBE\t%s\n' "$MODULE"
sudo modprobe "$MODULE"
printf 'MODPROBE\t%s\t\t' "$MODULE"
printf '%s ' "$@"
printf '\n'
sudo modprobe "$MODULE" "$@"
else
printf 'SKIP \t%s \tnot in tree\n' "$MODULE"
printf 'SKIP \t%s \t(not in tree)\n' "$MODULE"
fi
}

# Test sudo first, not after dozens of SKIP
sudo true


# This is not required unless you want to change the default flags.
# For the list of flags search: git -C linux grep SOF_DBG_
# Warning: the DMA trace can be forced ON in Kconfig and
# the SOF_DBG_ENABLE_TRACE bit ignored here.
# insert_module snd_sof sof_debug=1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed? We can already add module parameters in /etc/modprobe.d/alsa-base.conf



# Insert codec drivers first, they are required to register ASoC components

insert_module snd_soc_da7213
Expand Down