Lines Matching defs:array
40 * sof_update_ipc_object - Parse multiple sets of tokens within the token array associated with the
44 * @token_id: token ID for the token array to be searched
45 * @tuples: pointer to the tuples array
46 * @num_tuples: number of tuples in the tuples array
49 * looks for @token_instance_num of each token in the token array associated
440 * @tokens: array of struct sof_topology_token containing the tokens to be matched
441 * @num_tokens: number of tokens in tokens array
442 * @array: source pointer to consecutive vendor arrays in topology
449 struct snd_soc_tplg_vendor_array *array)
456 for (i = 0; i < le32_to_cpu(array->num_elems); i++) {
457 elem = &array->uuid[i];
481 * sof_copy_tuples - Parse tokens and copy them to the @tuples array
483 * @array: source pointer to consecutive vendor arrays in topology
484 * @array_size: size of @array
485 * @token_id: Token ID associated with a token array
487 * looks for @token_instance_num of each token in the token array associated
489 * @tuples: tuples array to copy the matched tuples to
491 * @num_copied_tuples: pointer to the number of copied tuples in the tuples array
494 static int sof_copy_tuples(struct snd_sof_dev *sdev, struct snd_soc_tplg_vendor_array *array,
511 dev_err(sdev->dev, "Invalid tuples array\n");
519 dev_err(sdev->dev, "No token array defined for token ID: %d\n", token_id);
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",
531 asize = le32_to_cpu(array->size);
535 dev_err(sdev->dev, "Invalid array size 0x%x\n", asize);
542 dev_err(sdev->dev, "Invalid array size 0x%x\n", asize);
547 for (i = 0; i < le32_to_cpu(array->num_elems); i++) {
561 elem = &array->string[i];
572 elem = &array->value[i];
595 /* next array */
596 array = (struct snd_soc_tplg_vendor_array *)((u8 *)array + asize);
607 * @tokens: array of struct sof_topology_token containing the tokens to be matched
608 * @num_tokens: number of tokens in tokens array
609 * @array: source pointer to consecutive vendor arrays in topology
616 struct snd_soc_tplg_vendor_array *array)
623 for (i = 0; i < le32_to_cpu(array->num_elems); i++) {
624 elem = &array->string[i];
653 * @tokens: array of struct sof_topology_token containing the tokens to be matched
654 * @num_tokens: number of tokens in tokens array
655 * @array: source pointer to consecutive vendor arrays in topology
662 struct snd_soc_tplg_vendor_array *array)
669 for (i = 0; i < le32_to_cpu(array->num_elems); i++) {
670 elem = &array->value[i];
699 * @tokens: token definition array describing what tokens to parse
700 * @count: number of tokens in definition array
701 * @array: source pointer to consecutive vendor arrays in topology
702 * @array_size: total size of @array
712 int count, struct snd_soc_tplg_vendor_array *array,
722 asize = le32_to_cpu(array->size);
725 if (asize < 0) { /* FIXME: A zero-size array makes no sense */
726 dev_err(scomp->dev, "error: invalid array size 0x%x\n",
734 dev_err(scomp->dev, "error: invalid array size 0x%x\n",
740 switch (le32_to_cpu(array->type)) {
743 array);
748 array);
761 array);
765 array->type);
769 /* next array */
770 array = (struct snd_soc_tplg_vendor_array *)((u8 *)array
788 * @tokens: token definition array describing what tokens to parse
789 * @num_tokens: number of tokens in definition array
790 * @array: source pointer to consecutive vendor arrays in topology
791 * @array_size: total size of @array
798 struct snd_soc_tplg_vendor_array *array,
808 return sof_parse_token_sets(scomp, object, tokens, num_tokens, array,
866 ARRAY_SIZE(led_tokens), mc->priv.array,
1207 /* calculate max size of tuples array */
1211 /* allocate memory for tuples array */
1233 private->array, le32_to_cpu(private->size));
1281 ret = sof_copy_tuples(sdev, private->array, le32_to_cpu(private->size),
1343 token_count, priv->array, le32_to_cpu(priv->size),
1348 /* copy pin binding array to swidget only if it is defined in topology */
1415 priv->array, le32_to_cpu(priv->size));
1423 ARRAY_SIZE(comp_pin_tokens), priv->array,
1749 ARRAY_SIZE(stream_tokens), private->array,
1907 private->array, le32_to_cpu(private->size));
1919 /* calculate size of tuples array */
1969 /* allocate memory for tuples array */
1979 ret = sof_copy_tuples(sdev, private->array, le32_to_cpu(private->size),
1994 ret = sof_copy_tuples(sdev, private->array, le32_to_cpu(private->size),
2013 ret = sof_copy_tuples(sdev, private->array, le32_to_cpu(private->size),