Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/tplg_parser/tokens.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ int sof_parse_token_sets(void *object, const struct sof_topology_token *tokens,

array = MOVE_POINTER_BY_BYTES(array, array->size);

if (found >= count) {
total += found;
if (found > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@singalsu why should we care about found at all then? We should just get rid of it altogether no?

Copy link
Collaborator Author

@singalsu singalsu Oct 3, 2024

Choose a reason for hiding this comment

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

Then none of the parsed tokens would be applied (or like now apply them to 1st format entry only). Please try topologies with multiple format PCMs with SOF plugin to see if you have this issue. I'm running topologies sof-hda-benchmark-comp/wordlength.tplg:

sof-hda-benchmark-eqiir32

Without this I could not load 16 bit topology versions, since the PCM formats are introduced in order s16/s24/s32, so I get only s32 to the formats array. And same with components like SRC with multiple formats, where array of 42 has only 1st set with last format (192 kHz). If I would have pin index tokens set for them then the parsing would work, but they are optional for simple one sink one source components.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: I don't use those HDMI pipelines but there's no simple way to get rid of them in these test toplogies based on hda-generic. I can run these in both a real HDA device and with testbench to run both capture and playback (use -p 1,2,3,4 or - p 1,2 for playback or -p 3,4 for capture as currently there is no automatic discovery for pipelines to enable).

total += count;
offset += object_size;
found = 0;
}
Expand Down