From 8bb9549ca279eaa1e402e2b4d1009cc3662e6ccc Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Wed, 7 Jul 2021 16:53:40 -0700 Subject: [PATCH] sof_insert.sh: add support for module parameters Also add commented out "snd_sof sof_debug=1" example Signed-off-by: Marc Herbert --- tools/kmod/sof_insert.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tools/kmod/sof_insert.sh b/tools/kmod/sof_insert.sh index d3b2e786..95529a3a 100755 --- a/tools/kmod/sof_insert.sh +++ b/tools/kmod/sof_insert.sh @@ -4,19 +4,29 @@ insert_module() { - local MODULE="$1" + local MODULE="$1"; shift 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 + + # Insert codec drivers first, they are required to register ASoC components insert_module snd_soc_da7213