Skip to content

Probe ipc4 info - #9669

Merged
kv2019i merged 2 commits into
thesofproject:mainfrom
jsarha:probe_ipc4_info
Nov 26, 2024
Merged

kv2019i merged 2 commits into
thesofproject:mainfrom
jsarha:probe_ipc4_info

Conversation

@jsarha

@jsarha jsarha commented Nov 20, 2024

Copy link
Copy Markdown
Contributor

Implement probe IPC4 get_config() for IPC4_PROBE_MODULE_PROBE_POINTS_ADD and IPC4_PROBE_MODULE_AVAILABLE_PROBE_POINTS.

Comment thread src/probe/probe.c Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

With Zephyr logging the function name is included in the log message automatically. So including it also explicitly just wastes memory. Are you getting it duplicated in your logs or is it somehow just my configuration? If you do get it twice, let's remove it. Would be great to clean up all Zephyr-only sources from this... In theory probes can be used with XTOS too IIUC? But hardly important enough to keep these names.

Comment thread src/probe/probe.c Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

proper error code? I see that it isn't propagated (for now) but (1) it might get propagated in the future, and (2) -1 just doesn't make much sense - it looks like a magic constant. Something like -ENOMEM or -ENOSPC maybe

Implement IPC4 get_config() for getting currently active probe points,
by using IPC4_PROBE_MODULE_PROBE_POINTS_ADD config_id.

Signed-off-by: Jyri Sarha <[email protected]>
Add new param_id recognized by get_config() for getting all available
probe points.

Signed-off-by: Jyri Sarha <[email protected]>

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Btw, any API that returns IPC4 status to kernel should use the IPC4 return macros.

@jsarha

jsarha commented Nov 21, 2024

Copy link
Copy Markdown
Contributor Author

Btw, any API that returns IPC4 status to kernel should use the IPC4 return macros.

@lgirdwood , sorry I do not follow. Do you refer to module_interface get_configuration() method return values?

@lgirdwood

Copy link
Copy Markdown
Member

Btw, any API that returns IPC4 status to kernel should use the IPC4 return macros.

@lgirdwood , sorry I do not follow. Do you refer to module_interface get_configuration() method return values?

No I mean there is some IPC4 message codes that should be used instead or POSIX result values if any of these functions is returning a result to the host. Pls take a look at the ipc4 code and you should see IPC4_SUCCESS and similar macros that are used to transfer message state to host. This may not be the case here, but just need to check.

@jsarha

jsarha commented Nov 24, 2024

Copy link
Copy Markdown
Contributor Author

Btw, any API that returns IPC4 status to kernel should use the IPC4 return macros.

@lgirdwood , sorry I do not follow. Do you refer to module_interface get_configuration() method return values?

No I mean there is some IPC4 message codes that should be used instead or POSIX result values if any of these functions is
returning a result to the host. Pls take a look at the ipc4 code and you should see IPC4_SUCCESS and similar macros that
are used to transfer message state to host. This may not be the case here, but just need to check.

Oh, I do not need to worry about that, since I am hiding behind module adapter's get_configuration() call-back. That is called from module_adapter_ipc4.c module_get_large_config(), which is in turn called from ipc4_get_large_config_module_instance() which is converting the negative error codes to IPC4_MOD_INVALID_ID. All get_configuration() implementations I have checked use POSIX error codes.

@lgirdwood

Copy link
Copy Markdown
Member

SOFCI TEST

@kv2019i

kv2019i commented Nov 26, 2024 •

Copy link
Copy Markdown
Collaborator

@kv2019i
kv2019i merged commit 7bdf19a into thesofproject:main Nov 26, 2024
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