audio: mux: fix IPC4 configuration and use blob handler#10348
audio: mux: fix IPC4 configuration and use blob handler#10348kv2019i merged 2 commits intothesofproject:mainfrom
Conversation
Use IPC4_SINK_QUEUE_ID() macro to properly extract the queue ID from buffer ID in IPC4 mux implementation. This ensures correct indexing into the streams[] array when mapping source buffers to their corresponding stream configurations. Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
There was a problem hiding this comment.
Pull Request Overview
This PR fixes IPC4 configuration for the audio mux component by implementing proper blob handler usage and correcting data structure access patterns. The changes enable basic IPC4 mux tests to pass by ensuring configuration data is accessed through the blob handler rather than directly from component data.
Key changes:
- Introduced blob handler usage for configuration data access in IPC4 implementation
- Moved blob data handling from common prepare function to IPC-specific parameter functions
- Added proper buffer ID handling for IPC4 with queue ID macros
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/audio/mux/mux_ipc4.c | Updated to use blob handler for configuration access and fixed buffer ID handling |
| src/audio/mux/mux_ipc3.c | Added blob data handling moved from common prepare function |
| src/audio/mux/mux.h | Added conditional blob size definition for IPC4 vs IPC3 |
| src/audio/mux/mux.c | Removed blob handling from common prepare function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4e5b08b to
e4492c4
Compare
lgirdwood
left a comment
There was a problem hiding this comment.
Just one open to check a pointer before use.
src/audio/mux/mux_ipc4.c
Outdated
| int mask = 1; | ||
| int i; | ||
|
|
||
| cfg = comp_get_data_blob(cd->model_handler, NULL, NULL); |
There was a problem hiding this comment.
initially blob is validated in init and prepare stages but this PR moves IPC3 checks so I also added now checks to ipc4 prepare
|
|
||
| comp_dev_for_each_producer(dev, source) { | ||
| j = buf_get_id(source); | ||
| j = IPC4_SINK_QUEUE_ID(buf_get_id(source)); |
There was a problem hiding this comment.
just to check - it does have to be IPC4_SINK_QUEUE_ID(), not IPC4_SRC_QUEUE_ID()?
There was a problem hiding this comment.
Yes, Its easy to make mistake around sink/src macros but based on the latest fixes this is the correct approach
#10298
This patch will fix IPC4 configuration. Move configuration blob handling from common mux_prepare() to IPC-specific mux_params() implementations to better separate IPC3 and IPC4 code paths. Changes: - Remove config blob retrieval and validation from mux_prepare() in mux.c - Move blob handling to mux_params() in mux_ipc3.c for IPC3 path - Update mux_ipc4.c to use blob handler for config blob instead of storing in comp_data->md - Define MUX_BLOB_MAX_SIZE conditionally based on IPC version: * IPC4: sizeof(struct mux_data) * IPC3: sizeof(struct sof_mux_config) + MUX_BLOB_STREAMS_SIZE Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
e4492c4 to
ca200ed
Compare
|
@abonislawski can you check Ci thanks ! |
|
looks like CI has got stuck - nodata reported for all target. rerun. |
|
SOFCI TEST |
This PR will fix IPC4 build for mux and allow basic IPC4 mux tests to pass.