audio: asrc: fix runtime params validation#10803
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request fixes incorrect runtime PCM rate validation in the ASRC module by making stream-parameter validation IPC-protocol specific, avoiding bogus errors for IPC4 where the runtime params rate is not mode-dependent (PULL/PUSH) in the same way as IPC3.
Changes:
- Split ASRC stream params verification into
asrc_verify_stream_params()with IPC3/IPC4-specific implementations. - Update ASRC params handling to call the new verification function and keep buffer parameter verification (
comp_verify_params) inasrc.c. - Add the new verification function prototype to the ASRC public header.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/audio/asrc/asrc.h | Adds the asrc_verify_stream_params() declaration used by the common ASRC params path. |
| src/audio/asrc/asrc.c | Replaces the old monolithic verification with IPC-specific verification + comp_verify_params(). |
| src/audio/asrc/asrc_ipc4.c | Implements IPC4 verification as a no-op to avoid mode-dependent false failures. |
| src/audio/asrc/asrc_ipc3.c | Moves the mode-dependent PCM rate validation logic into the IPC3-specific implementation. |
kv2019i
left a comment
There was a problem hiding this comment.
The IPC3 variant doesn't build after the changes:
https://github.com/thesofproject/sof/actions/runs/26281359601/job/77358062049?pr=10803
IPC4 params do not provide a PCM sampling rate that is dynamically selected based on the mode (PULL/PUSH). Instead, the received params contain only a copy of the source rate already stored in ipc4_asrc_module_cfg. As a result, mode-dependent validation can trigger a bogus error. Fix this by splitting params validation into IPC protocol-specific functions. Signed-off-by: Wojciech Jablonski <wojciech.jablonski@intel.com>
ccad2ba to
fc757b0
Compare
|
@kv2019i IPC3 builds fixed, thanks |
| */ | ||
| ARG_UNUSED(mod); | ||
| ARG_UNUSED(params); |
There was a problem hiding this comment.
Remember also about testbench: https://github.com/thesofproject/sof/actions/runs/26401755902/job/77715479520?pr=10803
IPC4 params do not provide a PCM sampling rate that is dynamically selected based on the mode (PULL/PUSH). Instead, the received params contain only a copy of the source rate already stored in ipc4_asrc_module_cfg. As a result, mode-dependent validation can trigger a bogus error. Fix this by splitting params validation into IPC protocol-specific functions.