Lines Matching defs:array
51 * sof_update_ipc_object - Parse multiple sets of tokens within the token array associated with the
55 * @token_id: token ID for the token array to be searched
56 * @tuples: pointer to the tuples array
57 * @num_tuples: number of tuples in the tuples array
60 * looks for @token_instance_num of each token in the token array associated
457 * @tokens: array of struct sof_topology_token containing the tokens to be matched
458 * @num_tokens: number of tokens in tokens array
459 * @array: source pointer to consecutive vendor arrays in topology
466 struct snd_soc_tplg_vendor_array *array)
473 for (i = 0; i < le32_to_cpu(array->num_elems); i++) {
474 elem = &array->uuid[i];
498 * sof_copy_tuples - Parse tokens and copy them to the @tuples array
500 * @array: source pointer to consecutive vendor arrays in topology
501 * @array_size: size of @array
502 * @token_id: Token ID associated with a token array
504 * looks for @token_instance_num of each token in the token array associated
506 * @tuples: tuples array to copy the matched tuples to
508 * @num_copied_tuples: pointer to the number of copied tuples in the tuples array
511 static int sof_copy_tuples(struct snd_sof_dev *sdev, struct snd_soc_tplg_vendor_array *array,
528 dev_err(sdev->dev, "Invalid tuples array\n");
536 dev_err(sdev->dev, "No token array defined for token ID: %d\n", token_id);
540 /* check if there's space in the tuples array for new tokens */
542 dev_err(sdev->dev, "No space in tuples array for new tokens from %s",
548 asize = le32_to_cpu(array->size);
552 dev_err(sdev->dev, "Invalid array size 0x%x\n", asize);
559 dev_err(sdev->dev, "Invalid array size 0x%x\n", asize);
564 for (i = 0; i < le32_to_cpu(array->num_elems); i++) {
578 elem = &array->string[i];
593 elem = &array->value[i];
616 /* next array */
617 array = (struct snd_soc_tplg_vendor_array *)((u8 *)array + asize);
628 * @tokens: array of struct sof_topology_token containing the tokens to be matched
629 * @num_tokens: number of tokens in tokens array
630 * @array: source pointer to consecutive vendor arrays in topology
637 struct snd_soc_tplg_vendor_array *array)
644 for (i = 0; i < le32_to_cpu(array->num_elems); i++) {
645 elem = &array->string[i];
674 * @tokens: array of struct sof_topology_token containing the tokens to be matched
675 * @num_tokens: number of tokens in tokens array
676 * @array: source pointer to consecutive vendor arrays in topology
683 struct snd_soc_tplg_vendor_array *array)
690 for (i = 0; i < le32_to_cpu(array->num_elems); i++) {
691 elem = &array->value[i];
720 * @tokens: token definition array describing what tokens to parse
721 * @count: number of tokens in definition array
722 * @array: source pointer to consecutive vendor arrays in topology
723 * @array_size: total size of @array
733 int count, struct snd_soc_tplg_vendor_array *array,
743 if (array_size < (int)sizeof(*array))
746 asize = le32_to_cpu(array->size);
749 if (asize < (int)sizeof(*array)) {
750 dev_err(scomp->dev, "error: invalid array size 0x%x\n",
758 dev_err(scomp->dev, "error: invalid array size 0x%x\n",
764 switch (le32_to_cpu(array->type)) {
767 array);
772 array);
785 array);
789 le32_to_cpu(array->type));
793 /* next array */
794 array = (struct snd_soc_tplg_vendor_array *)((u8 *)array
812 * @tokens: token definition array describing what tokens to parse
813 * @num_tokens: number of tokens in definition array
814 * @array: source pointer to consecutive vendor arrays in topology
815 * @array_size: total size of @array
822 struct snd_soc_tplg_vendor_array *array,
832 return sof_parse_token_sets(scomp, object, tokens, num_tokens, array,
890 ARRAY_SIZE(led_tokens), mc->priv.array,
1243 /* calculate max size of tuples array */
1247 /* allocate memory for tuples array */
1269 private->array, le32_to_cpu(private->size));
1317 ret = sof_copy_tuples(sdev, private->array, le32_to_cpu(private->size),
1379 token_count, priv->array, le32_to_cpu(priv->size),
1384 /* copy pin binding array to swidget only if it is defined in topology */
1451 priv->array, le32_to_cpu(priv->size));
1459 ARRAY_SIZE(comp_pin_tokens), priv->array,
1791 ARRAY_SIZE(stream_tokens), private->array,
1943 private->array, le32_to_cpu(private->size));
1954 /* calculate size of tuples array */
2013 /* allocate memory for tuples array */
2022 ret = sof_copy_tuples(sdev, private->array, le32_to_cpu(private->size),
2037 ret = sof_copy_tuples(sdev, private->array, le32_to_cpu(private->size),
2056 ret = sof_copy_tuples(sdev, private->array, le32_to_cpu(private->size),
2396 priv->array, le32_to_cpu(priv->size));
2421 priv->array, le32_to_cpu(priv->size));