mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
topology: Tuple type can have an extenstion
After the type specific string ("uuid", "string", "byte", "short" and
"word"), users may append a string, like "uuidxxx". The topology parser
will check the first few characters to get the tuple type.
This can allow users to put multiple tuples of the same type into one
vendor tuple section (SectionVendorTuples), e.g. parameters of multiple
firmware modules.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
a3683a2ba0
commit
962d006c28
2 changed files with 29 additions and 6 deletions
|
|
@ -534,17 +534,17 @@ static int parse_tuple_set(snd_config_t *cfg,
|
|||
|
||||
snd_config_get_id(cfg, &id);
|
||||
|
||||
if (strcmp(id, "uuid") == 0)
|
||||
if (strncmp(id, "uuid", 4) == 0)
|
||||
type = SND_SOC_TPLG_TUPLE_TYPE_UUID;
|
||||
else if (strcmp(id, "string") == 0)
|
||||
else if (strncmp(id, "string", 5) == 0)
|
||||
type = SND_SOC_TPLG_TUPLE_TYPE_STRING;
|
||||
else if (strcmp(id, "bool") == 0)
|
||||
else if (strncmp(id, "bool", 4) == 0)
|
||||
type = SND_SOC_TPLG_TUPLE_TYPE_BOOL;
|
||||
else if (strcmp(id, "byte") == 0)
|
||||
else if (strncmp(id, "byte", 4) == 0)
|
||||
type = SND_SOC_TPLG_TUPLE_TYPE_BYTE;
|
||||
else if (strcmp(id, "short") == 0)
|
||||
else if (strncmp(id, "short", 5) == 0)
|
||||
type = SND_SOC_TPLG_TUPLE_TYPE_SHORT;
|
||||
else if (strcmp(id, "word") == 0)
|
||||
else if (strncmp(id, "word", 4) == 0)
|
||||
type = SND_SOC_TPLG_TUPLE_TYPE_WORD;
|
||||
else {
|
||||
SNDERR("error: invalid tuple type '%s'\n", id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue