• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/alsa-lib-1.0.26/src/mixer/

Lines Matching defs:ctl

237 	snd_ctl_elem_value_t *ctl;
241 snd_ctl_elem_value_alloca(&ctl);
242 if ((err = snd_hctl_elem_read(c->elem, ctl)) < 0)
248 s->str[dir].vol[idx] = to_user(s, dir, c, snd_ctl_elem_value_get_integer(ctl, idx1));
255 snd_ctl_elem_value_t *ctl;
259 snd_ctl_elem_value_alloca(&ctl);
260 if ((err = snd_hctl_elem_read(c->elem, ctl)) < 0)
266 if (!snd_ctl_elem_value_get_integer(ctl, idx1))
274 snd_ctl_elem_value_t *ctl;
278 snd_ctl_elem_value_alloca(&ctl);
279 if ((err = snd_hctl_elem_read(c->elem, ctl)) < 0)
285 if (!snd_ctl_elem_value_get_integer(ctl, idx1 * c->values + idx1))
293 snd_ctl_elem_value_t *ctl;
306 snd_ctl_elem_value_alloca(&ctl);
307 if ((err = snd_hctl_elem_read(c->elem, ctl)) < 0)
313 s->str[0].vol[idx] = snd_ctl_elem_value_get_enumerated(ctl, idx1);
443 snd_ctl_elem_value_t *ctl;
445 snd_ctl_elem_value_alloca(&ctl);
446 err = snd_hctl_elem_read(c->elem, ctl);
453 if (snd_ctl_elem_value_get_enumerated(ctl, idx1) != s->capture_item)
469 snd_ctl_elem_value_t *ctl;
473 snd_ctl_elem_value_alloca(&ctl);
474 if ((err = snd_hctl_elem_read(c->elem, ctl)) < 0)
477 snd_ctl_elem_value_set_integer(ctl, idx, from_user(s, dir, c, s->str[dir].vol[idx]));
478 if ((err = snd_hctl_elem_write(c->elem, ctl)) < 0)
485 snd_ctl_elem_value_t *ctl;
489 snd_ctl_elem_value_alloca(&ctl);
490 if ((err = snd_hctl_elem_read(c->elem, ctl)) < 0)
493 snd_ctl_elem_value_set_integer(ctl, idx, !!(s->str[dir].sw & (1 << idx)));
494 if ((err = snd_hctl_elem_write(c->elem, ctl)) < 0)
501 snd_ctl_elem_value_t *ctl;
505 snd_ctl_elem_value_alloca(&ctl);
506 if ((err = snd_hctl_elem_read(c->elem, ctl)) < 0)
509 snd_ctl_elem_value_set_integer(ctl, idx, !!val);
510 if ((err = snd_hctl_elem_write(c->elem, ctl)) < 0)
517 snd_ctl_elem_value_t *ctl;
521 snd_ctl_elem_value_alloca(&ctl);
522 if ((err = snd_hctl_elem_read(c->elem, ctl)) < 0)
525 snd_ctl_elem_value_set_integer(ctl, idx, 0);
527 snd_ctl_elem_value_set_integer(ctl, idx * c->values + idx, !!(s->str[dir].sw & (1 << idx)));
528 if ((err = snd_hctl_elem_write(c->elem, ctl)) < 0)
535 snd_ctl_elem_value_t *ctl;
548 snd_ctl_elem_value_alloca(&ctl);
549 if ((err = snd_hctl_elem_read(c->elem, ctl)) < 0)
552 snd_ctl_elem_value_set_enumerated(ctl, idx, (unsigned int)s->str[0].vol[idx]);
553 if ((err = snd_hctl_elem_write(c->elem, ctl)) < 0)
628 snd_ctl_elem_value_t *ctl;
630 snd_ctl_elem_value_alloca(&ctl);
631 if ((err = snd_hctl_elem_read(c->elem, ctl)) < 0)
635 snd_ctl_elem_value_set_enumerated(ctl, idx, s->capture_item);
637 if ((err = snd_hctl_elem_write(c->elem, ctl)) < 0)
674 selem_ctl_t *ctl;
687 ctl = &simple->ctls[CTL_SINGLE];
688 if (ctl->elem) {
689 pchannels = cchannels = ctl->values;
690 if (ctl->type == SND_CTL_ELEM_TYPE_INTEGER) {
692 pmin = cmin = ctl->min;
693 pmax = cmax = ctl->max;
697 ctl = &simple->ctls[CTL_GLOBAL_SWITCH];
698 if (ctl->elem) {
699 if (pchannels < ctl->values)
700 pchannels = ctl->values;
701 if (cchannels < ctl->values)
702 cchannels = ctl->values;
705 ctl = &simple->ctls[CTL_GLOBAL_ROUTE];
706 if (ctl->elem) {
707 if (pchannels < ctl->values)
708 pchannels = ctl->values;
709 if (cchannels < ctl->values)
710 cchannels = ctl->values;
713 ctl = &simple->ctls[CTL_GLOBAL_VOLUME];
714 if (ctl->elem) {
715 if (pchannels < ctl->values)
716 pchannels = ctl->values;
717 if (pmin > ctl->min)
718 pmin = ctl->min;
719 if (pmax < ctl->max)
720 pmax = ctl->max;
721 if (cchannels < ctl->values)
722 cchannels = ctl->values;
723 if (cmin > ctl->min)
724 cmin = ctl->min;
725 if (cmax < ctl->max)
726 cmax = ctl->max;
729 ctl = &simple->ctls[CTL_PLAYBACK_SWITCH];
730 if (ctl->elem) {
731 if (pchannels < ctl->values)
732 pchannels = ctl->values;
736 ctl = &simple->ctls[CTL_PLAYBACK_ROUTE];
737 if (ctl->elem) {
738 if (pchannels < ctl->values)
739 pchannels = ctl->values;
743 ctl = &simple->ctls[CTL_CAPTURE_SWITCH];
744 if (ctl->elem) {
745 if (cchannels < ctl->values)
746 cchannels = ctl->values;
750 ctl = &simple->ctls[CTL_CAPTURE_ROUTE];
751 if (ctl->elem) {
752 if (cchannels < ctl->values)
753 cchannels = ctl->values;
757 ctl = &simple->ctls[CTL_PLAYBACK_VOLUME];
758 if (ctl->elem) {
759 if (pchannels < ctl->values)
760 pchannels = ctl->values;
761 if (pmin > ctl->min)
762 pmin = ctl->min;
763 if (pmax < ctl->max)
764 pmax = ctl->max;
768 ctl = &simple->ctls[CTL_CAPTURE_VOLUME];
769 if (ctl->elem) {
770 if (cchannels < ctl->values)
771 cchannels = ctl->values;
772 if (cmin > ctl->min)
773 cmin = ctl->min;
774 if (cmax < ctl->max)
775 cmax = ctl->max;
779 ctl = &simple->ctls[CTL_CAPTURE_SOURCE];
780 if (ctl->elem) {
781 if (cchannels < ctl->values)
782 cchannels = ctl->values;
786 ctl = &simple->ctls[CTL_GLOBAL_ENUM];
787 if (ctl->elem) {
788 if (pchannels < ctl->values)
789 pchannels = ctl->values;
792 ctl = &simple->ctls[CTL_PLAYBACK_ENUM];
793 if (ctl->elem) {
794 if (pchannels < ctl->values)
795 pchannels = ctl->values;
798 ctl = &simple->ctls[CTL_CAPTURE_ENUM];
799 if (ctl->elem) {
800 if (pchannels < ctl->values)
801 pchannels = ctl->values;
1002 selem_ctl_type_t ctl;
1003 for (ctl = CTL_SINGLE; ctl <= CTL_LAST; ctl++)
1004 if (s->ctls[ctl].elem != NULL && s->ctls[ctl].inactive)
1085 static int init_db_range(snd_hctl_elem_t *ctl, struct selem_str *rec);
1087 static int convert_to_dB(snd_hctl_elem_t *ctl, struct selem_str *rec,
1090 if (init_db_range(ctl, rec) < 0)
1098 static int init_db_range(snd_hctl_elem_t *ctl, struct selem_str *rec)
1112 if (snd_hctl_elem_info(ctl, info) < 0)
1119 if (snd_hctl_elem_tlv_read(ctl, tlv, tlv_size) < 0)
1158 static int get_dB_range(snd_hctl_elem_t *ctl, struct selem_str *rec,
1161 if (init_db_range(ctl, rec) < 0)
1181 static int convert_from_dB(snd_hctl_elem_t *ctl, struct selem_str *rec,
1184 if (init_db_range(ctl, rec) < 0)
1346 snd_ctl_elem_value_t *ctl;
1356 snd_ctl_elem_value_alloca(&ctl);
1357 err = snd_hctl_elem_read(helem, ctl);
1359 *itemp = snd_ctl_elem_value_get_enumerated(ctl, channel);
1368 snd_ctl_elem_value_t *ctl;
1390 snd_ctl_elem_value_alloca(&ctl);
1391 err = snd_hctl_elem_read(helem, ctl);
1395 snd_ctl_elem_value_set_enumerated(ctl, channel, item);
1396 return snd_hctl_elem_write(helem, ctl);