module: eap: rework module to use sink/source api - #11213
Open
softwarecki wants to merge 1 commit into
Open
softwarecki wants to merge 1 commit into
softwarecki wants to merge 1 commit into
Conversation
Rework the eap module to only use the sink/source api to prepare sof for the full transition to pipeline 2.0. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
softwarecki
requested review from
abonislawski,
piotrhoppeintel,
serhiy-katsyuba-intel,
tmleman and
wjablon1
and
a lite review from Copilot
September 17, 2026 16:07
softwarecki
requested review from
dbaluta,
kv2019i,
lbetlej,
lgirdwood,
mmaka1 and
plbossart
as code owners
September 17, 2026 16:07
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Compilation, data-loss, and topology-handling issues remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Reworks the NXP EAP module to use SOF’s sink/source API for the pipeline 2.0 transition.
Changes:
- Migrates EAP preparation and processing callbacks.
- Adds circular-buffer input/output handling.
- Updates module interface registration.
File summaries
| File | Summary | Findings |
|---|---|---|
src/audio/nxp/eap.c |
Converts EAP processing to sink/source buffer APIs. | Critical pointer-arithmetic and topology-validation issues, plus a moderate source-release ordering issue, remain unresolved. |
Review details
Suppressed comments (1)
src/audio/nxp/eap.c:292
snk_buf_startis avoid *, so this addition also relies on GNU void-pointer arithmetic and is rejected by the host build's-Wpointer-arith -Werrorflags. Cast it to a byte pointer before addingbuf_size.
size_to_wrap = cir_buf_bytes_without_wrap(snk_ptr, snk_buf_start + buf_size);
- Files reviewed: 1/1 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+177
to
+180
| if (num_of_sources != 1) { | ||
| comp_err(dev, "invalid number of sources %d", num_of_sources); | ||
| return -EINVAL; | ||
| } |
| return ret; | ||
|
|
||
| /* buf_size is the total ring buffer size; handle wrap when copying to in_buff */ | ||
| size_to_wrap = cir_buf_bytes_without_wrap(src_ptr, src_buf_start + buf_size); |
Comment on lines
+284
to
+289
| source_release_data(sources[0], process_size); | ||
|
|
||
| /* copy produced samples to output buffer */ | ||
| memcpy_s(output_buffers[0].data, eap->mpd.produced, eap->mpd.out_buff, eap->mpd.produced); | ||
| output_buffers[0].size = eap->mpd.produced; | ||
| ret = sink_get_buffer(sinks[0], process_size, &snk_ptr, &snk_buf_start, &buf_size); | ||
| if (ret) | ||
| return ret; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rework the eap module to only use the sink/source api to prepare sof for the full transition to pipeline 2.0.