Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cadence: unification of cadence module naming #9287

Merged

Conversation

dnikodem
Copy link
Contributor

@dnikodem dnikodem commented Jul 8, 2024

This change improves and standardizes the naming convention of the cadence module during its creation.

This change improves and standardizes the naming convention of the
cadence module during its creation.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
@dnikodem dnikodem requested a review from andyross July 8, 2024 10:45
@dnikodem dnikodem marked this pull request as ready for review July 8, 2024 12:01
@dnikodem dnikodem changed the title cadence: unification of cadence module naming [DNM] cadence: unification of cadence module naming Jul 8, 2024
@dnikodem
Copy link
Contributor Author

dnikodem commented Jul 8, 2024

Sof CI tests fails - WiP

@dbaluta
Copy link
Collaborator

dbaluta commented Jul 8, 2024

FYI: There is a compilation error problem, existing just before this patch!

                 from /home/nxf25322/work/sof_dir5/sof/src/include/sof/audio/audio_stream.h:23,
                 from /home/nxf25322/work/sof_dir5/sof/src/include/sof/audio/buffer.h:11,
                 from /home/nxf25322/work/sof_dir5/sof/src/include/sof/audio/component.h:19,
                 from /home/nxf25322/work/sof_dir5/sof/src/include/sof/audio/module_adapter/module/generic.h:16,
                 from /home/nxf25322/work/sof_dir5/sof/src/audio/module_adapter/module/cadence.c:14:
/home/nxf25322/work/sof_dir5/sof/src/include/sof/lib/uuid.h:80:31: error: '_cadence_uuid' undeclared here (not in a function); did you mean 'cadence_api'?
   80 | #define _UUID(uuid_name)    (&_##uuid_name)
      |                               ^
/home/nxf25322/work/sof_dir5/sof/zephyr/include/sof/trace/../../../../src/include/sof/trace/trace.h:410:27: note: in definition of macro 'DECLARE_TR_CTX'
  410 |                 .uuid_p = uuid,                                 \
      |                           ^~~~
/home/nxf25322/work/sof_dir5/sof/src/include/sof/lib/uuid.h:148:29: note: in expansion of macro '_UUID'
  148 | #define SOF_UUID(uuid_name) _UUID(uuid_name)
      |                             ^~~~~
/home/nxf25322/work/sof_dir5/sof/src/audio/module_adapter/module/cadence.c:23:28: note: in expansion of macro 'SOF_UUID'
   23 | DECLARE_TR_CTX(cadence_tr, SOF_UUID(cadence_uuid), LOG_LEVEL_INFO);
      |                            ^~~~~~~~
In file included from /home/nxf25322/work/sof_dir5/sof/src/include/sof/audio/buffer.h:18:
/home/nxf25322/work/sof_dir5/sof/src/audio/module_adapter/module/cadence.c:921:43: error: 'cadence_uuid' undeclared here (not in a function); did you mean 'cadence_api'?
  921 | DECLARE_MODULE_ADAPTER(cadence_interface, cadence_uuid, cadence_tr);
      |                                           ^~~~~~~~~~~~
/home/nxf25322/work/sof_dir5/sof/src/include/sof/lib/uuid.h:81:31: note: in definition of macro '_RT_UUID'
   81 | #define _RT_UUID(uuid_name) (&uuid_name)
      |                               ^~~~~~~~~
/home/nxf25322/work/sof_dir5/sof/src/include/sof/audio/module_adapter/module/generic.h:52:16: note: in expansion of macro 'SOF_RT_UUID'
   52 |         .uid = SOF_RT_UUID(uuid), \
      |                ^~~~~~~~~~~
/home/nxf25322/work/sof_dir5/sof/src/audio/module_adapter/module/cadence.c:921:1: note: in expansion of macro 'DECLARE_MODULE_ADAPTER'
  921 | DECLARE_MODULE_ADAPTER(cadence_interface, cadence_uuid, cadence_tr);
      | ^~~~~~~~~~~~~~~~~~~~~~
[24/68] Building C object modules/hal_nxp/hal_nxp/CMakeFiles/..__modules__hal__nxp.dir/mcux/mcux-sdk/drivers/iuart/fsl_uart.c.obj

I think it was introduce by @andyross fdb039e / #9261

commit fdb039ef5f77e37e2566e343c8a831d1436e9d91
Author: Andy Ross <andyross@google.com>
Date:   Sat Jun 22 13:31:39 2024 -0700

    everywhere: Normalize UUID naming
    

@dbaluta
Copy link
Collaborator

dbaluta commented Jul 8, 2024

@dnikodem Your PR not only unifies the cadence module naming! but also fixes a compilation problem!

@dnikodem
Copy link
Contributor Author

dnikodem commented Jul 8, 2024

FYI: There is a compilation error problem, existing just before this patch!

                 from /home/nxf25322/work/sof_dir5/sof/src/include/sof/audio/audio_stream.h:23,
                 from /home/nxf25322/work/sof_dir5/sof/src/include/sof/audio/buffer.h:11,
                 from /home/nxf25322/work/sof_dir5/sof/src/include/sof/audio/component.h:19,
                 from /home/nxf25322/work/sof_dir5/sof/src/include/sof/audio/module_adapter/module/generic.h:16,
                 from /home/nxf25322/work/sof_dir5/sof/src/audio/module_adapter/module/cadence.c:14:
/home/nxf25322/work/sof_dir5/sof/src/include/sof/lib/uuid.h:80:31: error: '_cadence_uuid' undeclared here (not in a function); did you mean 'cadence_api'?
   80 | #define _UUID(uuid_name)    (&_##uuid_name)
      |                               ^
/home/nxf25322/work/sof_dir5/sof/zephyr/include/sof/trace/../../../../src/include/sof/trace/trace.h:410:27: note: in definition of macro 'DECLARE_TR_CTX'
  410 |                 .uuid_p = uuid,                                 \
      |                           ^~~~
/home/nxf25322/work/sof_dir5/sof/src/include/sof/lib/uuid.h:148:29: note: in expansion of macro '_UUID'
  148 | #define SOF_UUID(uuid_name) _UUID(uuid_name)
      |                             ^~~~~
/home/nxf25322/work/sof_dir5/sof/src/audio/module_adapter/module/cadence.c:23:28: note: in expansion of macro 'SOF_UUID'
   23 | DECLARE_TR_CTX(cadence_tr, SOF_UUID(cadence_uuid), LOG_LEVEL_INFO);
      |                            ^~~~~~~~
In file included from /home/nxf25322/work/sof_dir5/sof/src/include/sof/audio/buffer.h:18:
/home/nxf25322/work/sof_dir5/sof/src/audio/module_adapter/module/cadence.c:921:43: error: 'cadence_uuid' undeclared here (not in a function); did you mean 'cadence_api'?
  921 | DECLARE_MODULE_ADAPTER(cadence_interface, cadence_uuid, cadence_tr);
      |                                           ^~~~~~~~~~~~
/home/nxf25322/work/sof_dir5/sof/src/include/sof/lib/uuid.h:81:31: note: in definition of macro '_RT_UUID'
   81 | #define _RT_UUID(uuid_name) (&uuid_name)
      |                               ^~~~~~~~~
/home/nxf25322/work/sof_dir5/sof/src/include/sof/audio/module_adapter/module/generic.h:52:16: note: in expansion of macro 'SOF_RT_UUID'
   52 |         .uid = SOF_RT_UUID(uuid), \
      |                ^~~~~~~~~~~
/home/nxf25322/work/sof_dir5/sof/src/audio/module_adapter/module/cadence.c:921:1: note: in expansion of macro 'DECLARE_MODULE_ADAPTER'
  921 | DECLARE_MODULE_ADAPTER(cadence_interface, cadence_uuid, cadence_tr);
      | ^~~~~~~~~~~~~~~~~~~~~~
[24/68] Building C object modules/hal_nxp/hal_nxp/CMakeFiles/..__modules__hal__nxp.dir/mcux/mcux-sdk/drivers/iuart/fsl_uart.c.obj

I think it was introduce by @andyross

commit fdb039ef5f77e37e2566e343c8a831d1436e9d91
Author: Andy Ross <andyross@google.com>
Date:   Sat Jun 22 13:31:39 2024 -0700

    everywhere: Normalize UUID naming
    

correct, this is why I prepared this PR. The problem is that I see a lot of fails in CI (probably not related to this change) - need to verify it.

Copy link
Contributor

@andyross andyross left a comment

Choose a reason for hiding this comment

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

That's the correct way to adjust the naming. Is this not buildable in CI or otherwise from e.g. xtensa_build_{all,zephyr} or rebuild_testbench.sh? What's the correct way to validate this component? If the validation isn't in-tree, can we add an issue to make sure it gets a test?

(Honestly I sorta worry that there are others like this hiding. SOF has a lot of seemingly dead/zombied code and this was a pretty invasive PR that plays poorly in that kind of bathtub.)

@dnikodem dnikodem changed the title [DNM] cadence: unification of cadence module naming cadence: unification of cadence module naming Jul 9, 2024
@dnikodem
Copy link
Contributor Author

dnikodem commented Jul 9, 2024

Looks like the issues are not related to my PR:

  1. sof-logger failed on all PRs
  2. LNL SDW's failures are also seen on other PRs

I think that this is ready to merge.

@kv2019i
Copy link
Collaborator

kv2019i commented Jul 9, 2024

@dnikodem wrote:

Looks like the issues are not related to my PR:

  1. sof-logger failed on all PRs
  2. LNL SDW's failures are also seen on other PRs

I think that this is ready to merge.

Ack, (1) is fixed in main via sof-test PRs and (2) is tracked as thesofproject/linux#5098

Proceeding with merge.

@kv2019i kv2019i merged commit d3ae43c into thesofproject:main Jul 9, 2024
44 of 47 checks passed
@dbaluta
Copy link
Collaborator

dbaluta commented Jul 9, 2024

That's the correct way to adjust the naming. Is this not buildable in CI or otherwise from e.g. xtensa_build_{all,zephyr} or rebuild_testbench.sh? What's the correct way to validate this component? If the validation isn't in-tree, can we add an issue to make sure it gets a test?

In order to validate this component you will need some proprietary libraries from Cadence. Intel / NXP are using different libraries.

We validate this internally, using our CI - and it usually takes 1 or 2 days until we get signalled about issues.

I think Intel does the same.

@andyross
Copy link
Contributor

andyross commented Jul 9, 2024

In order to validate this component you will need some proprietary libraries from Cadence. Intel / NXP are using different libraries.

The normal pattern for that sort of thing is to provide a "stub" implementation selected via kconfig that emulates the proprietary bits as some kind of noop. Then you build that in a default configuration (the fuzzer seems to be evolving in that direction as the official "enable everything for testing" config) that runs in CI, so you're guaranteed you don't get surprised by this kind of API change.

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