Skip to content

readme: add high level detail around IPC#10592

Open
lgirdwood wants to merge 1 commit intothesofproject:mainfrom
lgirdwood:readme-ipc
Open

readme: add high level detail around IPC#10592
lgirdwood wants to merge 1 commit intothesofproject:mainfrom
lgirdwood:readme-ipc

Conversation

@lgirdwood
Copy link
Member

High level information about how IPC works and some specifics for IPC3 and IPC4 protocols.

Copilot AI review requested due to automatic review settings March 3, 2026 16:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds new high-level documentation for the IPC core layer plus separate architecture overviews for IPC3 and IPC4, intended to help readers understand how mailbox interrupts are routed and how protocol-specific handlers process messages.

Changes:

  • Added src/ipc/readme.md describing the core IPC layer responsibilities and processing flows.
  • Added src/ipc/ipc3/readme.md documenting IPC3 command routing and example flows.
  • Added src/ipc/ipc4/readme.md documenting IPC4 dispatch, pipeline state handling, module binding, and compound messages.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 11 comments.

File Description
src/ipc/readme.md New core IPC architecture/flow documentation with diagrams and helper object notes.
src/ipc/ipc4/readme.md New IPC4-specific overview covering dispatch, pipelines, binding, and compound messaging.
src/ipc/ipc3/readme.md New IPC3-specific overview covering command routing, stream trigger, DAI config, and mailbox validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +30 to +36
subgraph Module Handler
Mod --> InitMod[ipc4_init_module_instance]
Mod --> SetMod[ipc4_set_module_params]
Mod --> GetMod[ipc4_get_module_params]
Mod --> Bind[ipc4_bind]
Mod --> Unbind[ipc4_unbind]
end
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

Several function names in this dispatch diagram don’t exist in the IPC4 implementation (ipc4_bind, ipc4_unbind, ipc4_set_module_params, ipc4_get_module_params). The actual handlers are named ipc4_bind_module_instance, ipc4_unbind_module_instance, and config is handled via ipc4_set_get_config_module_instance / ipc4_get_large_config_module_instance (etc.). Please update the diagram labels to match real symbols or make them intentionally generic (e.g., “bind module instance”).

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Comment on lines +63 to +64
IPC3->>IPC3: ipc_get_comp_dev(stream_id)
IPC3->>Pipe: pipeline_trigger(COMP_TRIGGER_START)
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

The sequence diagram calls ipc_get_comp_dev(stream_id), but the actual call in ipc_stream_trigger() is ipc_get_comp_by_id(ipc, stream.comp_id) (and ipc_get_comp_dev has a different signature). Please adjust the diagram to match the implementation or keep it function-name-agnostic.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Comment on lines +18 to +37
```mermaid
graph TD
Platform[Platform / Mailbox HW] -->|IRQ| CoreIPC[Core IPC Framework]

subgraph CoreIPC [src/ipc/ipc-common.c]
Queue[Msg Queue / Worker Task]
Dispatcher[IPC Message Dispatcher]
PM[Power Management Wait/Wake]

Queue --> Dispatcher
Dispatcher --> PM
end

Dispatcher -->|Version Specific Parsing| IPC3[IPC3 Handler]
Dispatcher -->|Version Specific Parsing| IPC4[IPC4 Handler]

IPC3 -.-> CoreIPC
IPC4 -.-> CoreIPC
CoreIPC -.->|Ack| Platform
```
Copy link
Contributor

Choose a reason for hiding this comment

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

This graph doesn't render nicely. It seems to be missing connections. I know this comment is not very precise, but for me this graph is unreadable.

Copy link
Member Author

@lgirdwood lgirdwood Mar 5, 2026

Choose a reason for hiding this comment

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

Does this link render in your browser. Its rendering for me in Chrome, Antigravity and vscode.

https://github.com/lgirdwood/sof/tree/readme-ipc/src/ipc

Comment on lines +18 to +21
Valid --> Disp[ipc4_process_glb_message]

Disp -->|Global Message| Global[Global Handler]
Disp -->|Module Message| Mod[Module Handler]
Copy link
Contributor

Choose a reason for hiding this comment

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

Disp with description ipc4_process_glb_message makes it appear on this graph that global messages lead to modular ones.

High level information about how IPC works and some specifics for
IPC3 and IPC4 protocols.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants