Lines Matching refs:tokens

17 #include <uapi/sound/sof/tokens.h>
40 * sof_update_ipc_object - Parse multiple sets of tokens within the token array associated with the
59 const struct sof_topology_token *tokens;
72 /* No tokens to match */
76 tokens = token_list[token_id].tokens;
77 if (!tokens) {
78 dev_err(scomp->dev, "Invalid tokens for token id: %d\n", token_id);
87 if (tokens[i].token == tuples[j].token) {
88 switch (tokens[i].type) {
91 u32 *val = (u32 *)((u8 *)object + tokens[i].offset +
100 u16 *val = (u16 *)((u8 *)object + tokens[i].offset +
108 if (!tokens[i].get_token) {
111 tokens[i].token, token_list[token_id].name);
115 tokens[i].get_token((void *)tuples[j].value.s, object,
116 tokens[i].offset + offset);
436 * sof_parse_uuid_tokens - Parse multiple sets of UUID tokens
440 * @tokens: array of struct sof_topology_token containing the tokens to be matched
441 * @num_tokens: number of tokens in tokens array
444 * This function parses multiple sets of string type tokens in vendor arrays
448 const struct sof_topology_token *tokens, int num_tokens,
462 if (tokens[j].type != SND_SOC_TPLG_TUPLE_TYPE_UUID)
466 if (tokens[j].token != le32_to_cpu(elem->token))
470 tokens[j].get_token(elem, object,
471 offset + tokens[j].offset);
481 * sof_copy_tuples - Parse tokens and copy them to the @tuples array
500 const struct sof_topology_token *tokens;
515 tokens = token_list[token_id].tokens;
518 if (!tokens) {
523 /* check if there's space in the tuples array for new tokens */
525 dev_err(sdev->dev, "No space in tuples array for new tokens from %s",
551 if (!(tokens[j].type == SND_SOC_TPLG_TUPLE_TYPE_WORD ||
552 tokens[j].type == SND_SOC_TPLG_TUPLE_TYPE_SHORT ||
553 tokens[j].type == SND_SOC_TPLG_TUPLE_TYPE_BYTE ||
554 tokens[j].type == SND_SOC_TPLG_TUPLE_TYPE_BOOL ||
555 tokens[j].type == SND_SOC_TPLG_TUPLE_TYPE_STRING))
558 if (tokens[j].type == SND_SOC_TPLG_TUPLE_TYPE_STRING) {
564 if (tokens[j].token != le32_to_cpu(elem->token))
567 tuples[*num_copied_tuples].token = tokens[j].token;
575 if (tokens[j].token != le32_to_cpu(elem->token))
578 tuples[*num_copied_tuples].token = tokens[j].token;
603 * sof_parse_string_tokens - Parse multiple sets of tokens
607 * @tokens: array of struct sof_topology_token containing the tokens to be matched
608 * @num_tokens: number of tokens in tokens array
611 * This function parses multiple sets of string type tokens in vendor arrays
615 const struct sof_topology_token *tokens, int num_tokens,
629 if (tokens[j].type != SND_SOC_TPLG_TUPLE_TYPE_STRING)
633 if (tokens[j].token != le32_to_cpu(elem->token))
637 ret = tokens[j].get_token(elem->string, object, offset + tokens[j].offset);
649 * sof_parse_word_tokens - Parse multiple sets of tokens
653 * @tokens: array of struct sof_topology_token containing the tokens to be matched
654 * @num_tokens: number of tokens in tokens array
657 * This function parses multiple sets of word type tokens in vendor arrays
661 const struct sof_topology_token *tokens, int num_tokens,
675 if (!(tokens[j].type == SND_SOC_TPLG_TUPLE_TYPE_WORD ||
676 tokens[j].type == SND_SOC_TPLG_TUPLE_TYPE_SHORT ||
677 tokens[j].type == SND_SOC_TPLG_TUPLE_TYPE_BYTE ||
678 tokens[j].type == SND_SOC_TPLG_TUPLE_TYPE_BOOL))
682 if (tokens[j].token != le32_to_cpu(elem->token))
686 tokens[j].get_token(elem, object, offset + tokens[j].offset);
696 * sof_parse_token_sets - Parse multiple sets of tokens
699 * @tokens: token definition array describing what tokens to parse
700 * @count: number of tokens in definition array
703 * @token_instance_num: number of times the same tokens needs to be parsed i.e. the function
704 * looks for @token_instance_num of each token in the @tokens
707 * This function parses multiple sets of tokens in vendor arrays into
711 void *object, const struct sof_topology_token *tokens,
742 found += sof_parse_uuid_tokens(scomp, object, offset, tokens, count,
747 ret = sof_parse_string_tokens(scomp, object, offset, tokens, count,
760 found += sof_parse_word_tokens(scomp, object, offset, tokens, count,
785 * sof_parse_tokens - Parse one set of tokens
788 * @tokens: token definition array describing what tokens to parse
789 * @num_tokens: number of tokens in definition array
793 * This function parses a single set of tokens in vendor arrays into
797 const struct sof_topology_token *tokens, int num_tokens,
808 return sof_parse_token_sets(scomp, object, tokens, num_tokens, array,
869 dev_err(scomp->dev, "error: parse led tokens failed %d\n",
1231 token_list[object_token_list[i]].tokens,
1417 dev_err(scomp->dev, "failed to parse dapm widget tokens for %s\n",
1426 dev_err(scomp->dev, "failed to parse component pin tokens for %s\n",
1492 /* check we have some tokens - we need at least process type */
1494 dev_err(scomp->dev, "error: process tokens not found\n");
1752 dev_err(scomp->dev, "error: parse stream tokens failed %d\n",
1880 /* check we have some tokens - we need at least DAI type */
1882 dev_err(scomp->dev, "error: expected tokens for DAI, none found\n");
1909 dev_err(scomp->dev, "Failed tp parse common DAI link tokens\n");
1977 if (token_list[SOF_DAI_LINK_TOKENS].tokens) {
1978 /* parse one set of DAI link tokens */
1989 /* nothing more to do if there are no DAI type-specific tokens defined */
1990 if (!token_id || !token_list[token_id].tokens)
1993 /* parse "num_sets" sets of DAI-specific tokens */
2002 /* for DMIC, also parse all sets of DMIC PDM tokens based on active PDM count */