Skip to content

[RFC]topology: pre-processor: support to include conf block with IncludeByKey - #9

Closed
aiChaoSONG wants to merge 1 commit into
thesofproject:masterfrom
aiChaoSONG:include
Closed

[RFC]topology: pre-processor: support to include conf block with IncludeByKey#9
aiChaoSONG wants to merge 1 commit into
thesofproject:masterfrom
aiChaoSONG:include

Conversation

@aiChaoSONG

Copy link
Copy Markdown

Currently, The IncludeByKey mechanism only supports to conditionally include topology conf file. Even if we only want to conditionally include a small conf block, we have to use a conf file, and in the end, we will have a lot of trivial conf files, with each only contains a small conf block.

This patch extends the use of IncludeByKey, and make it support to include conf block conditionally.

Signed-off-by: Chao Song chao.song@linux.intel.com

Currently, The IncludeByKey mechanism only supports to
conditionally include topology conf file. Even if we only
want to conditionally include a small conf block, we have
to use a conf file, and in the end, we will have a lot of
trivial conf files, with each only contains a small conf block.

This patch extends the use of IncludeByKey, and make it
support to include conf block conditionally.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
@aiChaoSONG aiChaoSONG changed the title topology: pre-processor: support to include conf block with IncludeByKey [RFC]topology: pre-processor: support to include conf block with IncludeByKey Jan 17, 2023

@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.

@ranj063 @juimonen pls review.

Comment thread topology/pre-processor.c
/*
* Check whether the value for the matched key is a conf file or conf block,
* If it ends with '.conf', it is a conf file, otherwise, it is conf block.
*/

@lgirdwood lgirdwood Jan 18, 2023

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.

I would add in the comment what the supported input strings are and how they are converted to the runtime string value.

Comment thread topology/pre-processor.c
snd_input_t *in;
snd_config_t *n;
regex_t regex;
const char *filename;

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.

@aiChaoSONG the code looks good. Can you please add an example of this in the commit message and what the limitations are?

@ranj063

ranj063 commented Jan 24, 2023

Copy link
Copy Markdown
Collaborator

posted upsream alsa-project#187

@ranj063

ranj063 commented Jan 27, 2023

Copy link
Copy Markdown
Collaborator

merged upstream

@ranj063 ranj063 closed this Jan 27, 2023
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.

3 participants