Skip to content

topology2: Add instance attribute for all classes - #6986

Merged
ranj063 merged 1 commit into
thesofproject:mainfrom
ranj063:fix/tplg2_class_instance
Jan 25, 2023
Merged

topology2: Add instance attribute for all classes#6986
ranj063 merged 1 commit into
thesofproject:mainfrom
ranj063:fix/tplg2_class_instance

Conversation

@ranj063

@ranj063 ranj063 commented Jan 23, 2023

Copy link
Copy Markdown
Collaborator

In preparation for making it easier to write topology conf files that can be conditionally included without having to worry about conflicting node ID's for objects between the included file and the top-level conf file, modify all classes to include an instance attribute. This means that irrespective of the object type, all objects will be instantiated as follows:

Object.Widget.gain.1 {} or Object.Base.pdm_config.2 {} etc

The instance ID's are typically only meant for the alsatplg compiler to differentiate the nodes in the conf file and are not relevant for the kernel or the firmware. This change will allow the alsatplg compiler to be modified to automatically make the node ID's unique before conditionally including conf files.

Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com

@jsarha jsarha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks consistent and I think I even have an idea why this is needed, but I have trouble building the typologies from this PR. I even updated my alsa-utils and run west update, but build-tools.sh -T still fails:

  • cmake --build /home/oku/work/sof-zephyr/sof/tools/build_tools -- -j 28 topologies
    [0/24] Generating cavs-sdw.tplg
    ALSA lib pre-process-object.c:1397:(tplg_construct_object_name) Argument name not set for object 'manifest.sof_manifest'

ALSA lib pre-process-object.c:1715:(tplg_build_object) Failed to construct object name for sof_manifest

ALSA lib pre-process-object.c:1885:(tplg_pre_process_objects) Error building object Base.manifest.sof_manifest

Unable to pre-process configuration
FAILED: topology/topology2/avs-tplg/cavs-sdw.tplg

@ranj063

ranj063 commented Jan 25, 2023

Copy link
Copy Markdown
Collaborator Author

Looks consistent and I think I even have an idea why this is needed, but I have trouble building the typologies from this PR. I even updated my alsa-utils and run west update, but build-tools.sh -T still fails:

@jsarha you dont need any alsautils changes with this PR and the tools build is passing in the PR. Are you sure you dont have any local manual changes that are breaking your build?

@juimonen

Copy link
Copy Markdown

@jsarha this PR builds for me at least.

In preparation for making it easier to write topology conf files that
can be conditionally included without having to worry about conflicting
node ID's for objects between the included file and the top-level conf
file, modify all classes to include an instance attribute. This means
that irrespective of the object type, all objects will be instantiated
as follows:

Object.Widget.gain.1 {} or Object.Base.pdm_config.2 {} etc

The instance ID's are typically only meant for the alsatplg compiler to
differentiate the nodes in the conf file and are not relevant for the
kernel or the firmware. This change will allow the alsatplg compiler to
be modified to automatically make the node ID's unique before
conditionally including conf files.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
@ranj063
ranj063 force-pushed the fix/tplg2_class_instance branch from 90e2a60 to cbd0074 Compare January 25, 2023 18:23
@fredoh9

fredoh9 commented Jan 25, 2023

Copy link
Copy Markdown
Contributor

I can build tools and topologies with the SOF docker image.

@ranj063

ranj063 commented Jan 25, 2023

Copy link
Copy Markdown
Collaborator Author

SOFCI TEST

@jsarha jsarha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Compile problem was just a user error. Fixed with git clean -xdf.

@ranj063
ranj063 merged commit ae8ca22 into thesofproject:main Jan 25, 2023
@ranj063
ranj063 deleted the fix/tplg2_class_instance branch January 25, 2023 20:16
@marc-hb

marc-hb commented Jan 26, 2023

Copy link
Copy Markdown
Collaborator

All the daily tests started failing on MTLP_RVP_NOCODEC today with SOF commit ae8ca22, internal test run 20201.
They were mostly passing yesterday with SOF commit 34b9345, internal test run 20160.

This PR is the only change between these two commits. There was no kernel change.

There's no reproduction and bug filed yet but this is an early heads-up that this PR is the prime suspect for now.

@marc-hb

marc-hb commented Jan 26, 2023

Copy link
Copy Markdown
Collaborator

This PR is the only change between these two commits.

That's wrong sorry. There was also

@marc-hb

marc-hb commented Jan 26, 2023

Copy link
Copy Markdown
Collaborator

False alarm, sorry for the noise. Daily tests landed on a faulty device (internal issue 355)

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.

6 participants