Skip to content

ASoC: SOF: ipc4: Add decoder for RESOURCE_EVENT notifications from fi…#5842

Open
ujfalusi wants to merge 1 commit into
thesofproject:topic/sof-devfrom
ujfalusi:peter/sof/pr/ipc4-resource_event_decode
Open

ASoC: SOF: ipc4: Add decoder for RESOURCE_EVENT notifications from fi…#5842
ujfalusi wants to merge 1 commit into
thesofproject:topic/sof-devfrom
ujfalusi:peter/sof/pr/ipc4-resource_event_decode

Conversation

@ujfalusi

Copy link
Copy Markdown
Collaborator

…rmware

Decode and print out the content of currently supported RESOURCE_EVENT notifications from firmware along with the needed data structures and definitions.

Copilot AI review requested due to automatic review settings July 14, 2026 13:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds decoding support for IPC4 RESOURCE_EVENT notifications in the SOF IPC4 receive path, so driver debug logs include interpreted resource/event information (and raw payload for unknown event types).

Changes:

  • Add a SOF_IPC4_NOTIFY_RESOURCE_EVENT handler that decodes supported event payloads and logs details via dev_dbg().
  • Introduce IPC4 resource/event type enums and event-specific payload structures, replacing the raw u32 data[6] with a typed union.
  • Wire the new handler into sof_ipc4_rx_msg() for SOF_IPC4_NOTIFY_RESOURCE_EVENT notifications.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
sound/soc/sof/ipc4.c Adds a resource event notification handler and connects it in the IPC4 RX notification switch.
include/sound/sof/ipc4/header.h Adds resource/event enums and typed payload definitions for resource event notifications.

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

Comment thread sound/soc/sof/ipc4.c Outdated
Comment on lines +303 to +305
return "resource: EDF_TASK";
case SOF_IPC4_INVALID_RESOURCE_TYPE:
return "INVALID_RESOURCE_TYPE";

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think it needs broader fix, as the INVALID_RESOURCE_TYPE might be saying that the resource_id of the notification is not in use, it is 'invalid'

…rmware

Decode and print out the content of currently supported RESOURCE_EVENT
notifications from firmware along with the needed data structures and
definitions.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
@ujfalusi ujfalusi force-pushed the peter/sof/pr/ipc4-resource_event_decode branch from 5962af2 to c644ae1 Compare July 15, 2026 06:02
Copilot AI review requested due to automatic review settings July 15, 2026 06:02
@ujfalusi

Copy link
Copy Markdown
Collaborator Author

Changes since v1:

  • Do not print out the resource if it is marked invalid

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread sound/soc/sof/ipc4.c
Comment on lines +369 to +373
} else if (data->resource_type != SOF_IPC4_INVALID_RESOURCE_TYPE) {
dev_dbg(sdev->dev, "%s (%u), id %u\n",
sof_ipc4_resource_type_str(data->resource_type),
data->resource_type, data->resource_id);
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don't agree, this is on purpose, if needed one can enable the payload dump for full information.
The resource is invalid, not in use, it carries no information.

Comment on lines +541 to +546
SOF_IPC4_MODULE_INSTANCE,
SOF_IPC4_PIPELINE,
SOF_IPC4_GATEWAY,
SOF_IPC4_EDF_TASK,
SOF_IPC4_INVALID_RESOURCE_TYPE,
};

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No, enums are enums.

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.

3 participants