• Home
  • Raw
  • Download

Lines Matching refs:grp

77     struct mixer_ctl_group *grp;  member
124 static void mixer_grp_close(struct mixer *mixer, struct mixer_ctl_group *grp) in mixer_grp_close() argument
128 if (!grp) in mixer_grp_close()
131 if (grp->ctl) { in mixer_grp_close()
132 for (n = 0; n < grp->count; n++) in mixer_grp_close()
133 mixer_cleanup_control(&grp->ctl[n]); in mixer_grp_close()
134 free(grp->ctl); in mixer_grp_close()
137 free(grp); in mixer_grp_close()
178 static int add_controls(struct mixer *mixer, struct mixer_ctl_group *grp) in add_controls() argument
183 const unsigned int old_count = grp->count; in add_controls()
188 if (grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_LIST, &elist) < 0) in add_controls()
197 ctl = mixer_realloc_z(grp->ctl, old_count, elist.count, in add_controls()
202 grp->ctl = ctl; in add_controls()
218 if (grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_LIST, &elist) < 0) in add_controls()
222 struct snd_ctl_elem_info *ei = &grp->ctl[n].info; in add_controls()
224 if (grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_INFO, ei) < 0) in add_controls()
227 ctl[n].grp = grp; in add_controls()
230 grp->count = new_count; in add_controls()
243 grp->count = n; /* keep controls we successfully added */ in add_controls()
253 struct mixer_ctl_group *grp = NULL; in mixer_grp_open() local
258 grp = calloc(1, sizeof(*grp)); in mixer_grp_open()
259 if (!grp) in mixer_grp_open()
270 mixer->h_grp = grp; in mixer_grp_open()
277 mixer->v_grp = grp; in mixer_grp_open()
280 grp->ops = ops; in mixer_grp_open()
281 grp->data = data; in mixer_grp_open()
284 ret = grp->ops->ioctl(data, SNDRV_CTL_IOCTL_CARD_INFO, in mixer_grp_open()
291 ret = add_controls(mixer, grp); in mixer_grp_open()
298 grp->ops->close(grp->data); in mixer_grp_open()
301 free(grp); in mixer_grp_open()
416 struct mixer_ctl_group *grp; in mixer_get_num_ctls_by_name() local
426 grp = mixer->h_grp; in mixer_get_num_ctls_by_name()
427 ctl = grp->ctl; in mixer_get_num_ctls_by_name()
429 for (n = 0; n < grp->count; n++) in mixer_get_num_ctls_by_name()
435 grp = mixer->v_grp; in mixer_get_num_ctls_by_name()
436 ctl = grp->ctl; in mixer_get_num_ctls_by_name()
438 for (n = 0; n < grp->count; n++) in mixer_get_num_ctls_by_name()
456 struct mixer_ctl_group *grp; in mixer_subscribe_events() local
463 grp = mixer->h_grp; in mixer_subscribe_events()
464 if (grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS, &subscribe) < 0) in mixer_subscribe_events()
470 grp = mixer->v_grp; in mixer_subscribe_events()
471 if (grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS, &subscribe) < 0) in mixer_subscribe_events()
489 struct mixer_ctl_group *grp; in mixer_wait_event() local
516 grp = mixer->v_grp; in mixer_wait_event()
517 if (!grp->ops->get_poll_fd(grp->data, pfd, count)) { in mixer_wait_event()
544 grp = mixer->h_grp; in mixer_wait_event()
545 grp->event_cnt++; in mixer_wait_event()
549 grp = mixer->v_grp; in mixer_wait_event()
550 grp->event_cnt++; in mixer_wait_event()
594 struct mixer_ctl_group *grp = NULL; in mixer_read_event() local
604 grp = mixer->h_grp; in mixer_read_event()
610 grp = mixer->v_grp; in mixer_read_event()
614 if (grp) { in mixer_read_event()
615 grp->event_cnt--; in mixer_read_event()
616 bytes = grp->ops->read_event(grp->data, &ev, sizeof(ev)); in mixer_read_event()
631 static unsigned int mixer_grp_get_count(struct mixer_ctl_group *grp) in mixer_grp_get_count() argument
633 if (!grp) in mixer_grp_get_count()
636 return grp->count; in mixer_grp_get_count()
723 struct mixer_ctl_group *grp; in mixer_get_ctl_by_name_and_index() local
732 grp = mixer->h_grp; in mixer_get_ctl_by_name_and_index()
733 ctl = grp->ctl; in mixer_get_ctl_by_name_and_index()
735 for (n = 0; n < grp->count; n++) in mixer_get_ctl_by_name_and_index()
747 grp = mixer->v_grp; in mixer_get_ctl_by_name_and_index()
748 ctl = grp->ctl; in mixer_get_ctl_by_name_and_index()
750 for (n = 0; n < grp->count; n++) in mixer_get_ctl_by_name_and_index()
770 struct mixer_ctl_group *grp; in mixer_ctl_update() local
775 grp = ctl->grp; in mixer_ctl_update()
776 grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_INFO, &ctl->info); in mixer_ctl_update()
942 struct mixer_ctl_group *grp; in mixer_ctl_get_value() local
949 grp = ctl->grp; in mixer_ctl_get_value()
952 ret = grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_READ, &ev); in mixer_ctl_get_value()
990 struct mixer_ctl_group *grp; in mixer_ctl_get_array() local
1000 grp = ctl->grp; in mixer_ctl_get_array()
1011 ret = grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_READ, &ev); in mixer_ctl_get_array()
1033 ret = grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_TLV_READ, tlv); in mixer_ctl_get_array()
1042 ret = grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_READ, &ev); in mixer_ctl_get_array()
1051 ret = grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_READ, &ev); in mixer_ctl_get_array()
1079 struct mixer_ctl_group *grp; in mixer_ctl_set_value() local
1087 grp = ctl->grp; in mixer_ctl_set_value()
1090 ret = grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_READ, &ev); in mixer_ctl_set_value()
1115 return grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_WRITE, &ev); in mixer_ctl_set_value()
1130 struct mixer_ctl_group *grp; in mixer_ctl_set_array() local
1139 grp = ctl->grp; in mixer_ctl_set_array()
1171 ret = grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_TLV_WRITE, tlv); in mixer_ctl_set_array()
1192 return grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_WRITE, &ev); in mixer_ctl_set_array()
1245 struct mixer_ctl_group *grp = ctl->grp; in mixer_ctl_fill_enum_string() local
1261 if (grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_INFO, &tmp) < 0) in mixer_ctl_fill_enum_string()
1312 struct mixer_ctl_group *grp; in mixer_ctl_set_enum_by_string() local
1325 grp = ctl->grp; in mixer_ctl_set_enum_by_string()
1332 ret = grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_WRITE, &ev); in mixer_ctl_set_enum_by_string()