• Home
  • Raw
  • Download

Lines Matching refs:count

132 		for (idx = 0; idx < control->count; idx++)  in snd_ctl_release()
209 static int snd_ctl_new(struct snd_kcontrol **kctl, unsigned int count, in snd_ctl_new() argument
215 if (count == 0 || count > MAX_CONTROL_COUNT) in snd_ctl_new()
219 size += sizeof(struct snd_kcontrol_volatile) * count; in snd_ctl_new()
225 for (idx = 0; idx < count; idx++) { in snd_ctl_new()
229 (*kctl)->count = count; in snd_ctl_new()
249 unsigned int count; in snd_ctl_new1() local
256 count = ncontrol->count; in snd_ctl_new1()
257 if (count == 0) in snd_ctl_new1()
258 count = 1; in snd_ctl_new1()
270 err = snd_ctl_new(&kctl, count, access, NULL); in snd_ctl_new1()
317 unsigned int count) in snd_ctl_remove_numid_conflict() argument
322 if (card->last_numid >= UINT_MAX - count) in snd_ctl_remove_numid_conflict()
326 if (kctl->id.numid < card->last_numid + 1 + count && in snd_ctl_remove_numid_conflict()
327 kctl->id.numid + kctl->count > card->last_numid + 1) { in snd_ctl_remove_numid_conflict()
328 card->last_numid = kctl->id.numid + kctl->count - 1; in snd_ctl_remove_numid_conflict()
335 static int snd_ctl_find_hole(struct snd_card *card, unsigned int count) in snd_ctl_find_hole() argument
339 while (snd_ctl_remove_numid_conflict(card, count)) { in snd_ctl_find_hole()
367 unsigned int count; in snd_ctl_add() local
375 if (id.index > UINT_MAX - kcontrol->count) in snd_ctl_add()
390 if (snd_ctl_find_hole(card, kcontrol->count) < 0) { in snd_ctl_add()
396 card->controls_count += kcontrol->count; in snd_ctl_add()
398 card->last_numid += kcontrol->count; in snd_ctl_add()
400 count = kcontrol->count; in snd_ctl_add()
402 for (idx = 0; idx < count; idx++, id.index++, id.numid++) in snd_ctl_add()
430 unsigned int count; in snd_ctl_replace() local
457 if (snd_ctl_find_hole(card, kcontrol->count) < 0) { in snd_ctl_replace()
463 card->controls_count += kcontrol->count; in snd_ctl_replace()
465 card->last_numid += kcontrol->count; in snd_ctl_replace()
467 count = kcontrol->count; in snd_ctl_replace()
469 for (idx = 0; idx < count; idx++, id.index++, id.numid++) in snd_ctl_replace()
498 card->controls_count -= kcontrol->count; in snd_ctl_remove()
500 for (idx = 0; idx < kcontrol->count; idx++, id.index++, id.numid++) in snd_ctl_remove()
561 for (idx = 0; idx < kctl->count; idx++) in snd_ctl_remove_user_ctl()
647 card->last_numid += kctl->count; in snd_ctl_rename_id()
673 if (kctl->id.numid <= numid && kctl->id.numid + kctl->count > numid) in snd_ctl_find_numid()
713 if (kctl->id.index + kctl->count <= id->index) in snd_ctl_find_id()
768 list.count = card->controls_count; in snd_ctl_elem_list()
774 if (offset < kctl->count) in snd_ctl_elem_list()
776 offset -= kctl->count; in snd_ctl_elem_list()
783 for (jidx = offset; space > 0 && jidx < kctl->count; jidx++) { in snd_ctl_elem_list()
802 list.count = card->controls_count; in snd_ctl_elem_list()
828 if (members > info->count) in validate_element_member_dimension()
837 return members == info->count; in validate_element_member_dimension()
1251 unsigned int count; in snd_ctl_elem_add() local
1279 count = info->owner; in snd_ctl_elem_add()
1280 if (count == 0) in snd_ctl_elem_add()
1281 count = 1; in snd_ctl_elem_add()
1304 if (info->count < 1 || in snd_ctl_elem_add()
1305 info->count > max_value_counts[info->type]) in snd_ctl_elem_add()
1309 private_size = value_sizes[info->type] * info->count; in snd_ctl_elem_add()
1317 err = snd_ctl_new(&kctl, count, access, file); in snd_ctl_elem_add()
1321 kctl->private_data = kzalloc(sizeof(struct user_element) + private_size * count, in snd_ctl_elem_add()
1561 size_t count, loff_t * offset) in snd_ctl_read() argument
1572 if (count < sizeof(struct snd_ctl_event)) in snd_ctl_read()
1575 while (count >= sizeof(struct snd_ctl_event)) { in snd_ctl_read()
1609 count -= sizeof(struct snd_ctl_event); in snd_ctl_read()
1871 uinfo->count = 1; in snd_ctl_boolean_mono_info()
1891 uinfo->count = 2; in snd_ctl_boolean_stereo_info()
1915 info->count = channels; in snd_ctl_enum_info()