Lines Matching refs:array
643 void *snd_array_new(struct snd_array *array);
644 void snd_array_free(struct snd_array *array);
645 static inline void snd_array_init(struct snd_array *array, unsigned int size, in snd_array_init() argument
648 array->elem_size = size; in snd_array_init()
649 array->alloc_align = align; in snd_array_init()
652 static inline void *snd_array_elem(struct snd_array *array, unsigned int idx) in snd_array_elem() argument
654 return array->list + idx * array->elem_size; in snd_array_elem()
657 static inline unsigned int snd_array_index(struct snd_array *array, void *ptr) in snd_array_index() argument
659 return (unsigned long)(ptr - array->list) / array->elem_size; in snd_array_index()
663 #define snd_array_for_each(array, idx, ptr) \ argument
664 for ((idx) = 0, (ptr) = (array)->list; (idx) < (array)->used; \
665 (ptr) = snd_array_elem(array, ++(idx)))