Skip to content

readme: add high level detail around IPC#10592

Merged
lgirdwood merged 1 commit intothesofproject:mainfrom
lgirdwood:readme-ipc
Mar 30, 2026
Merged

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

Conversation

@lgirdwood
Copy link
Copy Markdown
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
Copy Markdown
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 +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
Copy Markdown
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
Copy Markdown
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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@tmleman does above link render now ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The graph renders, I'm using the "rich diff" function for preview. The preview looks the same when I use https://mermaid.live/

I think it renders strangely because connections to individual IPC3/4 versions run from "Dispatcher", and the return path to "CoreIPC" within which "Dispatcher" is located.

In the graph I also don't understand why one path from "Dispatcher" leads to "PM". If this is about IPC related to power management such as SetDx, SetD0iX etc, these are handled under specific IPC3/4 variants.

@lgirdwood lgirdwood force-pushed the readme-ipc branch 2 times, most recently from 049fb6c to cdb4ea3 Compare March 6, 2026 18:08
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The graph renders, I'm using the "rich diff" function for preview. The preview looks the same when I use https://mermaid.live/

I think it renders strangely because connections to individual IPC3/4 versions run from "Dispatcher", and the return path to "CoreIPC" within which "Dispatcher" is located.

In the graph I also don't understand why one path from "Dispatcher" leads to "PM". If this is about IPC related to power management such as SetDx, SetD0iX etc, these are handled under specific IPC3/4 variants.

graph TD
Mailbox[IPC Mailbox Interrupt] --> CoreIPC[ipc_cmd]

CoreIPC --> TypeSel[Decode IPC Message Target]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a good place for decision block (with diamond shape), I would also change the name (shorter description).

TypeSel{Decode IPC Message Target}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Both fixed.

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>
@lgirdwood
Copy link
Copy Markdown
Member Author

Not tested by CI.

@lgirdwood
Copy link
Copy Markdown
Member Author

All review comments fixed.

@lgirdwood lgirdwood merged commit e9c1669 into thesofproject:main Mar 30, 2026
46 of 50 checks passed
@lgirdwood lgirdwood deleted the readme-ipc branch March 30, 2026 16:25
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