Lines Matching refs:gctl
741 struct snd_emu10k1_fx8010_control_gpr *gctl; in snd_emu10k1_verify_controls() local
753 gctl = kmalloc(sizeof(*gctl), GFP_KERNEL); in snd_emu10k1_verify_controls()
754 if (! gctl) in snd_emu10k1_verify_controls()
758 if (copy_gctl(emu, gctl, icode->gpr_add_controls, i, in snd_emu10k1_verify_controls()
763 if (snd_emu10k1_look_for_ctl(emu, &gctl->id)) in snd_emu10k1_verify_controls()
765 gctl_id = (struct snd_ctl_elem_id *)&gctl->id; in snd_emu10k1_verify_controls()
781 if (copy_gctl(emu, gctl, icode->gpr_list_controls, i, in snd_emu10k1_verify_controls()
788 kfree(gctl); in snd_emu10k1_verify_controls()
808 struct snd_emu10k1_fx8010_control_gpr *gctl; in snd_emu10k1_add_controls() local
817 gctl = kmalloc(sizeof(*gctl), GFP_KERNEL); in snd_emu10k1_add_controls()
819 if (!val || !gctl || !nctl) { in snd_emu10k1_add_controls()
825 if (copy_gctl(emu, gctl, icode->gpr_add_controls, i, in snd_emu10k1_add_controls()
830 gctl_id = (struct snd_ctl_elem_id *)&gctl->id; in snd_emu10k1_add_controls()
840 ctl = snd_emu10k1_look_for_ctl(emu, &gctl->id); in snd_emu10k1_add_controls()
848 knew.tlv.p = copy_tlv((const unsigned int __user *)gctl->tlv, in_kernel); in snd_emu10k1_add_controls()
855 nctl->vcount = gctl->vcount; in snd_emu10k1_add_controls()
856 nctl->count = gctl->count; in snd_emu10k1_add_controls()
858 nctl->gpr[j] = gctl->gpr[j]; in snd_emu10k1_add_controls()
859 nctl->value[j] = ~gctl->value[j]; /* inverted, we want to write new value in gpr_ctl_put() */ in snd_emu10k1_add_controls()
860 val->value.integer.value[j] = gctl->value[j]; in snd_emu10k1_add_controls()
862 nctl->min = gctl->min; in snd_emu10k1_add_controls()
863 nctl->max = gctl->max; in snd_emu10k1_add_controls()
864 nctl->translation = gctl->translation; in snd_emu10k1_add_controls()
894 kfree(gctl); in snd_emu10k1_add_controls()
928 struct snd_emu10k1_fx8010_control_gpr *gctl; in snd_emu10k1_list_controls() local
932 gctl = kmalloc(sizeof(*gctl), GFP_KERNEL); in snd_emu10k1_list_controls()
933 if (! gctl) in snd_emu10k1_list_controls()
940 memset(gctl, 0, sizeof(*gctl)); in snd_emu10k1_list_controls()
942 gctl->id.iface = (__force int)id->iface; in snd_emu10k1_list_controls()
943 strlcpy(gctl->id.name, id->name, sizeof(gctl->id.name)); in snd_emu10k1_list_controls()
944 gctl->id.index = id->index; in snd_emu10k1_list_controls()
945 gctl->id.device = id->device; in snd_emu10k1_list_controls()
946 gctl->id.subdevice = id->subdevice; in snd_emu10k1_list_controls()
947 gctl->vcount = ctl->vcount; in snd_emu10k1_list_controls()
948 gctl->count = ctl->count; in snd_emu10k1_list_controls()
950 gctl->gpr[j] = ctl->gpr[j]; in snd_emu10k1_list_controls()
951 gctl->value[j] = ctl->value[j]; in snd_emu10k1_list_controls()
953 gctl->min = ctl->min; in snd_emu10k1_list_controls()
954 gctl->max = ctl->max; in snd_emu10k1_list_controls()
955 gctl->translation = ctl->translation; in snd_emu10k1_list_controls()
957 gctl, i)) { in snd_emu10k1_list_controls()
958 kfree(gctl); in snd_emu10k1_list_controls()
965 kfree(gctl); in snd_emu10k1_list_controls()