ASoC: SOF: ipc4: Add decoder for RESOURCE_EVENT notifications from fi…#5842
ASoC: SOF: ipc4: Add decoder for RESOURCE_EVENT notifications from fi…#5842ujfalusi wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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_EVENThandler that decodes supported event payloads and logs details viadev_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()forSOF_IPC4_NOTIFY_RESOURCE_EVENTnotifications.
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.
| return "resource: EDF_TASK"; | ||
| case SOF_IPC4_INVALID_RESOURCE_TYPE: | ||
| return "INVALID_RESOURCE_TYPE"; |
There was a problem hiding this comment.
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>
5962af2 to
c644ae1
Compare
|
Changes since v1:
|
| } 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); | ||
| } |
There was a problem hiding this comment.
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.
| SOF_IPC4_MODULE_INSTANCE, | ||
| SOF_IPC4_PIPELINE, | ||
| SOF_IPC4_GATEWAY, | ||
| SOF_IPC4_EDF_TASK, | ||
| SOF_IPC4_INVALID_RESOURCE_TYPE, | ||
| }; |
There was a problem hiding this comment.
No, enums are enums.
…rmware
Decode and print out the content of currently supported RESOURCE_EVENT notifications from firmware along with the needed data structures and definitions.