Skip to content

fix: skip DSP_AudioPD when AudioPD FastRPC prerequisites are missing#428

Merged
vnarapar merged 1 commit intoqualcomm-linux:mainfrom
smuppand:audio_pd
Apr 29, 2026
Merged

fix: skip DSP_AudioPD when AudioPD FastRPC prerequisites are missing#428
vnarapar merged 1 commit intoqualcomm-linux:mainfrom
smuppand:audio_pd

Conversation

@smuppand
Copy link
Copy Markdown
Contributor

This PR improves DSP_AudioPD validation by adding an AudioPD FastRPC allocator pre-check before running adsprpcd validation.

Why this PR is needed:

  • On targets such as qcs615-ride, the kernel exposes only the secure ADSP FastRPC device and does not provide the non-secure /dev/fastrpc-adsp path or ADSP RPC remote heap reserved-memory required for AudioPD validation.
  • Running the existing test on such targets triggers repeated FastRPC kernel errors such as "dsp information is incorrect err: -1".
  • The previous logic also used adsprpcd wchan as a hard PASS/FAIL gate, which can be flaky because the daemon may legitimately move between poll, epoll, or nanosleep states depending on timing.

Changes included:

  • Add a pre-check for AudioPD FastRPC allocator prerequisites:
    • /dev/fastrpc-adsp must be present
    • ADSP remoteproc must be running
    • ADSP RPC remote heap reserved-memory must be available
  • Mark the test SKIP when these prerequisites are missing instead of running AudioPD validation and producing kernel error spam.
  • Keep existing adsprpcd validation for supported targets such as RB3GEN2.
  • Treat unexpected adsprpcd wchan values as debug-only instead of failing the test.

@smuppand
Copy link
Copy Markdown
Contributor Author

Here the results looks like on qcs615-ride and RB3GEN2

root@qcs615-ride:/tmp/Runner/suites/Multimedia/DSP_AudioPD# ./run.sh
[INFO] 1970-01-01 03:55:19 - -----------------------------------------------------------------------------------------
[INFO] 1970-01-01 03:55:19 - -------------------Starting DSP_AudioPD Testcase----------------------------
[INFO] 1970-01-01 03:55:19 - === Test Initialization ===
[INFO] 1970-01-01 03:55:19 - Checking dependencies: adsprpcd tr awk grep sleep find cat
[INFO] 1970-01-01 03:55:19 - === AudioPD FastRPC allocator pre-check ===
[WARN] 1970-01-01 03:55:19 - [audiopd] Non-secure ADSP FastRPC device missing: /dev/fastrpc-adsp
[INFO] 1970-01-01 03:55:19 - [audiopd] Secure-only ADSP FastRPC device present: /dev/fastrpc-adsp-secure
[INFO] 1970-01-01 03:55:19 - [audiopd] ADSP remoteproc: /sys/class/remoteproc/remoteproc1 state=running
[SKIP] 1970-01-01 03:55:19 - [audiopd] AudioPD requires /dev/fastrpc-adsp, but only secure/no ADSP FastRPC device is available.
[SKIP] 1970-01-01 03:55:19 - [audiopd] ADSP RPC remote heap reserved-memory is not available.
[SKIP] 1970-01-01 03:55:19 - DSP_AudioPD SKIP - AudioPD FastRPC allocator prerequisites are not available on this target
[INFO] 1970-01-01 03:55:19 - -------------------Completed DSP_AudioPD Testcase----------------------------
root@qcs615-ride:/tmp/Runner/suites/Multimedia/DSP_AudioPD#
root@rb3gen2-core-kit:/tmp/Runner/suites/Multimedia/DSP_AudioPD# ./run.sh
[INFO] 1970-01-01 00:09:54 - -----------------------------------------------------------------------------------------
[INFO] 1970-01-01 00:09:54 - -------------------Starting DSP_AudioPD Testcase----------------------------
[INFO] 1970-01-01 00:09:54 - === Test Initialization ===
[INFO] 1970-01-01 00:09:54 - Checking dependencies: adsprpcd tr awk grep sleep find cat
[INFO] 1970-01-01 00:09:54 - === AudioPD FastRPC allocator pre-check ===
[INFO] 1970-01-01 00:09:54 - [audiopd] Non-secure ADSP FastRPC device present: /dev/fastrpc-adsp
[INFO] 1970-01-01 00:09:54 - [audiopd] ADSP remoteproc: /sys/class/remoteproc/remoteproc1 state=running
[INFO] 1970-01-01 00:09:54 - [audiopd] ADSP RPC remote heap symbol present: /proc/device-tree/__symbols__/adsp_rpc_remote_heap_mem
[INFO] 1970-01-01 00:09:54 - [audiopd] ADSP RPC remote heap reserved-memory node: /proc/device-tree/reserved-memory/adsp-rpc-remote-heap@9cb80000
[INFO] 1970-01-01 00:09:54 - [audiopd] ADSP RPC remote heap reg property present: /proc/device-tree/reserved-memory/adsp-rpc-remote-heap@9cb80000/reg
[INFO] 1970-01-01 00:09:54 - [audiopd] ADSP RPC remote heap symbol present: /sys/firmware/devicetree/base/__symbols__/adsp_rpc_remote_heap_mem
[INFO] 1970-01-01 00:09:54 - [audiopd] ADSP RPC remote heap reserved-memory node: /sys/firmware/devicetree/base/reserved-memory/adsp-rpc-remote-heap@9cb80000
[INFO] 1970-01-01 00:09:54 - [audiopd] ADSP RPC remote heap reg property present: /sys/firmware/devicetree/base/reserved-memory/adsp-rpc-remote-heap@9cb80000/reg
[PASS] 1970-01-01 00:09:54 - [audiopd] AudioPD FastRPC allocator prerequisites are available.
[INFO] 1970-01-01 00:09:55 - Process 'adsprpcd' is running.
[INFO] 1970-01-01 00:09:55 - Process 'adsprpcd' instances: 684 685
[INFO] 1970-01-01 00:09:55 - Process 'adsprpcd' PID 684 cmdline: /usr/bin/adsprpcd
[INFO] 1970-01-01 00:09:55 - Process 'adsprpcd' PID 685 cmdline: /usr/bin/adsprpcd audiopd
[INFO] 1970-01-01 00:09:56 - PID is 684
[INFO] 1970-01-01 00:09:56 - adsprpcd PID 684 wchan='poll_schedule_timeout.constprop.0' (accepted)
[INFO] 1970-01-01 00:09:56 - adsprpcd PID 685 wchan='poll_schedule_timeout.constprop.0' (accepted)
[PASS] 1970-01-01 00:09:56 - DSP_AudioPD : Test Passed
[INFO] 1970-01-01 00:09:56 - -------------------Completed DSP_AudioPD Testcase----------------------------
root@rb3gen2-core-kit:/tmp/Runner/suites/Multimedia/DSP_AudioPD#

@smuppand smuppand added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Apr 27, 2026
@smuppand
Copy link
Copy Markdown
Contributor Author

Comment thread Runner/suites/Multimedia/DSP_AudioPD/run.sh Outdated
Comment thread Runner/suites/Multimedia/DSP_AudioPD/run.sh
Comment thread Runner/suites/Multimedia/DSP_AudioPD/run.sh
Add an AudioPD FastRPC allocator pre-check before validating adsprpcd. The
test now verifies that the target exposes the non-secure ADSP FastRPC device
(/dev/fastrpc-adsp), an active ADSP remoteproc, and ADSP RPC remote heap
reserved-memory before running AudioPD validation.

This prevents unsupported targets such as qcs615-ride from triggering repeated
FastRPC kernel errors and marks them SKIP with a clear reason instead. Supported
targets such as RB3GEN2 continue through the existing adsprpcd validation path.

Also make adsprpcd wchan checks debug-only for non-poll states, since wchan can
legitimately vary between poll/epoll/nanosleep depending on daemon timing.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
@smuppand
Copy link
Copy Markdown
Contributor Author

Please refer to the lava job on QCS615-ride https://lava.infra.foundries.io/scheduler/job/190885#L2132 that includes the recent changes, and review the stdout output.

Copy link
Copy Markdown
Contributor

@vnarapar vnarapar left a comment

Choose a reason for hiding this comment

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

LGTM

@vnarapar vnarapar merged commit a3baf46 into qualcomm-linux:main Apr 29, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants