Repository navigation
[SKIP CI] sof_insert.sh: add support for module parameters - #734
Conversation
Also add commented out "snd_sof sof_debug=1" example Signed-off-by: Marc Herbert <marc.herbert@intel.com>
|
https://sof-ci.01.org/softestpr/PR734/build787/devicetest is all green. v2 : small comment rephrase. |
62b9380 to
8bb9549
Compare
| # 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 |
There was a problem hiding this comment.
why is this needed? We can already add module parameters in /etc/modprobe.d/alsa-base.conf
| insert_module() { | ||
|
|
||
| local MODULE="$1" | ||
| local MODULE="$1"; shift |
There was a problem hiding this comment.
Yes to remove the module name from "$@" below
This an alternative for faster changes locally. BTW we should avoid editing files owned by distributions first because scripting file changes is brittle and more importantly because conflicts with |
to run sof-test you need sudo privileges...
we can move this to a separate file e.g. /etc/modprobe.d/sof-module-options.conf I don't think we want to make the use of kernel parameters easier to be honest, and I don't think uncommenting a script would make it significantly better. There are other kernel parameters, e.g. to prevent pm_runtime, change the clock-stop mode, etc. Picking just sof_debug is quite limited. |
Sure but you don't run git or your editor with "sudo".
This is just an example, this change supports any module.
This commit makes local changes much easier to do and track, I know because I've been using it a lot and I will keep using it locally in any case. It's way too easy to forget about /etc/ changes. Speaking of which: this also reduces massively the risk of leaving shared systems inconsistent with each other.
Right now I need the ability to turn the trace ON/OFF quickly and I'm not interested in switching to a different window and editor just for that (and then forget what's there). I can easily imagine having to do the same for other parameters in the future. If some things should be hard to change, why are there parameters for them in the first place? |
|
we could also look for non-tracked conf file in the directory and pick the options from there or have a tracked conf file (with only comments) for the same purpose so we will not need to edit the script itself which might be a pain (sort of) for pull/rebase |
|
To clarify I agree with @plbossart that parameters shared across everyone should come from a single place: |
|
Right, I can see this can be useful in some cases and before pull one can |
ujfalusi
left a comment
There was a problem hiding this comment.
I can see the application and that it can be a time saver for certain use scenarios without side effect to others.
|
@marc-hb, for me editing the |
Do you not use git from your editor? I couldn't live without it... |
Also add commented out "snd_sof sof_debug=1" example
Signed-off-by: Marc Herbert marc.herbert@intel.com