Lines Matching refs:i
23 #define MASK_OFS(i) ((i) >> 5) argument
24 #define MASK_BIT(i) (1U << ((i) & 31)) argument
38 int i; in snd_mask_empty() local
39 for (i = 0; i < SNDRV_MASK_SIZE; i++) in snd_mask_empty()
40 if (mask->bits[i]) in snd_mask_empty()
47 int i; in snd_mask_min() local
48 for (i = 0; i < SNDRV_MASK_SIZE; i++) { in snd_mask_min()
49 if (mask->bits[i]) in snd_mask_min()
50 return __ffs(mask->bits[i]) + (i << 5); in snd_mask_min()
57 int i; in snd_mask_max() local
58 for (i = SNDRV_MASK_SIZE - 1; i >= 0; i--) { in snd_mask_max()
59 if (mask->bits[i]) in snd_mask_max()
60 return __fls(mask->bits[i]) + (i << 5); in snd_mask_max()
85 unsigned int i; in snd_mask_set_range() local
86 for (i = from; i <= to; i++) in snd_mask_set_range()
87 mask->bits[MASK_OFS(i)] |= MASK_BIT(i); in snd_mask_set_range()
93 unsigned int i; in snd_mask_reset_range() local
94 for (i = from; i <= to; i++) in snd_mask_reset_range()
95 mask->bits[MASK_OFS(i)] &= ~MASK_BIT(i); in snd_mask_reset_range()
109 int i; in snd_mask_intersect() local
110 for (i = 0; i < SNDRV_MASK_SIZE; i++) in snd_mask_intersect()
111 mask->bits[i] &= v->bits[i]; in snd_mask_intersect()
140 int i, c = 0; in snd_mask_single() local
141 for (i = 0; i < SNDRV_MASK_SIZE; i++) { in snd_mask_single()
142 if (! mask->bits[i]) in snd_mask_single()
144 if (mask->bits[i] & (mask->bits[i] - 1)) in snd_mask_single()
215 static inline void snd_interval_any(struct snd_interval *i) in snd_interval_any() argument
217 i->min = 0; in snd_interval_any()
218 i->openmin = 0; in snd_interval_any()
219 i->max = UINT_MAX; in snd_interval_any()
220 i->openmax = 0; in snd_interval_any()
221 i->integer = 0; in snd_interval_any()
222 i->empty = 0; in snd_interval_any()
225 static inline void snd_interval_none(struct snd_interval *i) in snd_interval_none() argument
227 i->empty = 1; in snd_interval_none()
230 static inline int snd_interval_checkempty(const struct snd_interval *i) in snd_interval_checkempty() argument
232 return (i->min > i->max || in snd_interval_checkempty()
233 (i->min == i->max && (i->openmin || i->openmax))); in snd_interval_checkempty()
236 static inline int snd_interval_empty(const struct snd_interval *i) in snd_interval_empty() argument
238 return i->empty; in snd_interval_empty()
241 static inline int snd_interval_single(const struct snd_interval *i) in snd_interval_single() argument
243 return (i->min == i->max || in snd_interval_single()
244 (i->min + 1 == i->max && (i->openmin || i->openmax))); in snd_interval_single()
247 static inline int snd_interval_value(const struct snd_interval *i) in snd_interval_value() argument
249 if (i->openmin && !i->openmax) in snd_interval_value()
250 return i->max; in snd_interval_value()
251 return i->min; in snd_interval_value()
254 static inline int snd_interval_min(const struct snd_interval *i) in snd_interval_min() argument
256 return i->min; in snd_interval_min()
259 static inline int snd_interval_max(const struct snd_interval *i) in snd_interval_max() argument
262 v = i->max; in snd_interval_max()
263 if (i->openmax) in snd_interval_max()
268 static inline int snd_interval_test(const struct snd_interval *i, unsigned int val) in snd_interval_test() argument
270 return !((i->min > val || (i->min == val && i->openmin) || in snd_interval_test()
271 i->max < val || (i->max == val && i->openmax))); in snd_interval_test()
279 static inline int snd_interval_setinteger(struct snd_interval *i) in snd_interval_setinteger() argument
281 if (i->integer) in snd_interval_setinteger()
283 if (i->openmin && i->openmax && i->min == i->max) in snd_interval_setinteger()
285 i->integer = 1; in snd_interval_setinteger()