Skip to content

Conversation

@jsarha
Copy link

@jsarha jsarha commented Mar 19, 2025

Add a dev_dbg to sof_ipc4_set_multi_pipeline_state(). The debug print lists the pipeline instance numbers that are included in the SOF_IPC4_GLB_SET_PIPELINE_STATE message. Without this log its very hard to tell what pipelines are affected. This print is very helpful when analyzing SOF logs automatically.

@jsarha jsarha force-pushed the set_multi_pipeline_state_debug branch from 70b57c2 to 2a94158 Compare March 20, 2025 16:23
ranj063
ranj063 previously approved these changes Mar 20, 2025
@jsarha jsarha force-pushed the set_multi_pipeline_state_debug branch from 2a94158 to 6fc5b3a Compare March 20, 2025 17:13
@jsarha
Copy link
Author

jsarha commented Mar 20, 2025

Seems I was too over confident. There was a compile error on previous version. Had to declare enum sof_ipc4_pipeline_state in ipc4-priv.h.

@jsarha jsarha force-pushed the set_multi_pipeline_state_debug branch from 6fc5b3a to f971130 Compare March 24, 2025 20:43
@jsarha
Copy link
Author

jsarha commented Mar 24, 2025

Just on space removed the sof_ipc4_set_multi_pipeline_state_debug() ads space in the beginnig, so we do not need it after "Pipelines".

@jsarha jsarha force-pushed the set_multi_pipeline_state_debug branch from f971130 to bd083f6 Compare March 24, 2025 22:29
@jsarha
Copy link
Author

jsarha commented Mar 24, 2025

... and the rebase.

@jsarha
Copy link
Author

jsarha commented Mar 27, 2025

@ranj063 & @ujfalusi could we get this merged?

@jsarha jsarha force-pushed the set_multi_pipeline_state_debug branch from bd083f6 to cf55bab Compare March 28, 2025 16:15
jsarha pushed a commit to jsarha/sof-test that referenced this pull request Mar 28, 2025
The sof-ipc-timer collects IPC message processing times from
'journalctl -k -o short-precise' output if SOF IPC debug is enabled.

The recognized messages are GLB_CREATE_PIPELINE, GLB_DELETE_PIPELINE,
MOD_INIT_INSTANCE, MOD_LARGE_CONFIG_SET (only with valid module id),
MOD_BIND, MOD_UNBIND, and GLB_SET_PIPELINE_STATE.

Different kind of outputs can be generated with different
flags. Adding just -s gives a summary. Giving full FW side log, using
FW built with CONFIG_DEBUG_IPC_TIMINGS=y, gives more accurate FW
processing times.

With the above flags the output may look like this:

host-copier.2.playback fw init  min 76 us       max 77 us       average 76 us of 10
gain.5.1 fw init        min 49 us       max 51 us       average 49 us of 10
gain.5.1 fw conf        min 23 us       max 23 us       average 23 us of 10
src.5.1 fw init min 33 us       max 43 us       average 37 us of 10
mixin.5.1 fw init       min 38 us       max 44 us       average 39 us of 10
mixout.6.1 fw init      min 31 us       max 38 us       average 32 us of 10
gain.6.1 fw init        min 37 us       max 45 us       average 37 us of 10
gain.6.1 fw conf        min 19 us       max 20 us       average 19 us of 10
dai-copier.SSP.NoCodec-2.playback fw init       min 157 us      max 166 us      average 159 us of 10
pipeline.5: host-copier.2.playback, gain.5.1, src.5.1, mixin.5.1,
pipeline.5 create fw    min 18 us       max 23 us       average 18 us of 10
pipeline.5 1.PAUSED fw  min 26 us       max 31 us       average 28 us of 10
pipeline.5 RUNNING fw   min 823 us      max 1177 us     average 939 us of 10
pipeline.5 PAUSED fw    min 319 us      max 774 us      average 433 us of 10
pipeline.5 delete fw    min 185 us      max 190 us      average 186 us of 10
pipeline.6: mixout.6.1, gain.6.1, dai-copier.SSP.NoCodec-2.playback,
pipeline.6 create fw    min 27 us       max 27 us       average 27 us of 10
pipeline.6 1.PAUSED fw  min 22 us       max 22 us       average 22 us of 10
pipeline.6 RUNNING fw   min 327 us      max 1302 us     average 800 us of 10
pipeline.6 PAUSED fw    min 361 us      max 997 us      average 501 us of 10
pipeline.6 delete fw    min 173 us      max 183 us      average 175 us of 10
host-copier.2.playback>gain.5.1 bind fw         min 43 us       max 45 us       average 44 us of 10
gain.5.1>src.5.1        bind fw         min 38 us       max 46 us       average 40 us of 10
src.5.1>mixin.5.1       bind fw         min 40 us       max 47 us       average 44 us of 10
mixin.5.1>mixout.6.1    bind fw         min 40 us       max 48 us       average 43 us of 10
mixin.5.1>mixout.6.1    unbind fw       min 24 us       max 24 us       average 24 us of 10
mixout.6.1>gain.6.1     bind fw         min 45 us       max 52 us       average 49 us of 10
gain.6.1>dai-copier.SSP.NoCodec-2.playback      bind fw         min 40 us       max 50 us       average 43 us of 10
pipes 6 5: RESET fw     min 230 us      max 231 us      average 230 us of 10

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>

sof-ipc-timer.py: Some more cleaning up

tools/sof-ipc-timer.py: Update to follow latest thesofproject/linux#5366
@jsarha
Copy link
Author

jsarha commented Mar 28, 2025

@ranj063 & @ujfalusi will this do now?

@jsarha jsarha force-pushed the set_multi_pipeline_state_debug branch from cf55bab to bc39252 Compare March 31, 2025 19:54
@jsarha
Copy link
Author

jsarha commented Mar 31, 2025

.. oops, changed =+ to +=

@lgirdwood
Copy link
Member

@ujfalusi @ranj063 ping.

@jsarha jsarha force-pushed the set_multi_pipeline_state_debug branch from bc39252 to 0355ceb Compare April 10, 2025 20:48
@jsarha
Copy link
Author

jsarha commented Apr 15, 2025

@ranj063 & @ujfalusi will this do now?

What about now?

ranj063
ranj063 previously approved these changes Apr 15, 2025
Add sof_ipc4_pipeline_state_str() to translate enum
sof_ipc4_pipeline_state into human readable form.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
@jsarha jsarha force-pushed the set_multi_pipeline_state_debug branch from 0355ceb to 1630f57 Compare April 23, 2025 20:08
@jsarha
Copy link
Author

jsarha commented Apr 24, 2025

@ranj063 & @ujfalusi one more time, please 😅.

Jyri Sarha added 2 commits April 24, 2025 14:41
Add a dev_dbg to sof_ipc4_set_multi_pipeline_state(). The debug print
lists the pipeline instance numbers that are included in the
SOF_IPC4_GLB_SET_PIPELINE_STATE message. Without this log its very
hard to tell what pipelines are affected. This print is very helpful
when analyzing SOF logs automatically.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Harmonize sof_ipc4_set_pipeline_state() dbg print with the new print
in sof_ipc4_set_multi_pipeline_state().

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
@jsarha jsarha force-pushed the set_multi_pipeline_state_debug branch from 1630f57 to e7f4264 Compare April 24, 2025 11:42
@jsarha
Copy link
Author

jsarha commented Apr 24, 2025

@ujfalusi finally?

Copy link
Collaborator

@ujfalusi ujfalusi left a comment

Choose a reason for hiding this comment

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

@jsarha, thank you for the updates, looks good for me

@jsarha
Copy link
Author

jsarha commented Apr 29, 2025

@ranj063 could you click one more approve to get this merged?

@jsarha
Copy link
Author

jsarha commented May 8, 2025

@lyakh , @kv2019i or anybody, this needs one more approving review (or sound suggestion to further improve it)?

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

@ranj063 pls merge if you approve

@ranj063 ranj063 merged commit 12a9259 into thesofproject:topic/sof-dev May 12, 2025
7 of 16 checks passed
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.

5 participants