-
Notifications
You must be signed in to change notification settings - Fork 21
adsp_remoteproc: enforce fixed 30s pre-stop #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* Always wait a fixed PRE_STOP_DELAY (default 30s) before stopping ADSP. * Take a quick audio runtime-PM snapshot before the delay; optionally gate the stop after the delay with FATAL_ON_UNSUSPENDED=1: - If enabled and the stack is not suspended/unsupported after the fixed delay, abort the test before issuing the stop. * Print effective tunables at startup for clarity. * Retain dynamic audio driver discovery (no hardcoding), single module status log, and whole-stack PM checks (platform sound, ALSA cards, SoundWire). Accept 'suspended' or 'unsupported' as OK. * Preserve remoteproc stop/start sequencing, transition logs, and optional RPMsg ping. Tunables (env) -------------- * PRE_STOP_DELAY : seconds to wait before stop (default: 30) * FATAL_ON_UNSUSPENDED : 1 to abort if PM not OK after delay (default: 0) * STOP_TO / START_TO / POLL_I remain unchanged. Examples -------- # Always wait 30s; abort if audio not suspended/unsupported afterwards FATAL_ON_UNSUSPENDED=1 ./run.sh # Use a longer fixed delay PRE_STOP_DELAY=45 ./run.sh Signed-off-by: Srikanth Muppandam <[email protected]>
CHECK_NODES="" | ||
if [ -z "$platform_drv" ]; then | ||
log_warn "No suitable platform audio driver found (module+bound); skipping suspend snapshot" | ||
AUDIO_PM_SNAPSHOT_OK=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we append skip to result here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we append skip to result here
AFAIK, we cannot skip the test because the driver does not have the capability to display the PM stats, as it shows unsupported. The message reads: Audio PM snapshot: OK (suspended/unsupported)
. Based on this, we are able to skip the entire test.
log_info "DEBUG: STOP_TO=$STOP_TO START_TO=$START_TO POLL_I=$POLL_I" | ||
if [ -z "$CHECK_NODES" ]; then | ||
log_warn "No runtime_status nodes found for audio stack; treating snapshot as OK" | ||
AUDIO_PM_SNAPSHOT_OK=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can u add skip so that it will show in the result
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can u add skip so that it will show in the result
It's the same here. We can't add SKIP, so instead we're using log_info for debugging purposes.
log_info "Dumping ${base} [${label}] → ${logfile}" | ||
[ -r "$rpath/trace" ] && cat "$rpath/trace" >"$logfile" | ||
dmesg --ctime | grep -i "$base" >>"$logfile" 2>/dev/null || : | ||
dmesg | grep -i "$base" >>"$logfile" 2>/dev/null || : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why --ctime is removed here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why --ctime is removed here
The current dmesg utility does not include this option, so it will display a usage error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tunables (env)
Examples
PRE_STOP_DELAY=45 ./run.sh