• Home
  • Raw
  • Download

Lines Matching refs:ctl

334 	struct snd_emu10k1_fx8010_ctl *ctl =  in snd_emu10k1_gpr_ctl_info()  local
337 if (ctl->min == 0 && ctl->max == 1) in snd_emu10k1_gpr_ctl_info()
341 uinfo->count = ctl->vcount; in snd_emu10k1_gpr_ctl_info()
342 uinfo->value.integer.min = ctl->min; in snd_emu10k1_gpr_ctl_info()
343 uinfo->value.integer.max = ctl->max; in snd_emu10k1_gpr_ctl_info()
350 struct snd_emu10k1_fx8010_ctl *ctl = in snd_emu10k1_gpr_ctl_get() local
356 for (i = 0; i < ctl->vcount; i++) in snd_emu10k1_gpr_ctl_get()
357 ucontrol->value.integer.value[i] = ctl->value[i]; in snd_emu10k1_gpr_ctl_get()
365 struct snd_emu10k1_fx8010_ctl *ctl = in snd_emu10k1_gpr_ctl_put() local
373 for (i = 0; i < ctl->vcount; i++) { in snd_emu10k1_gpr_ctl_put()
375 if (nval < ctl->min) in snd_emu10k1_gpr_ctl_put()
376 nval = ctl->min; in snd_emu10k1_gpr_ctl_put()
377 if (nval > ctl->max) in snd_emu10k1_gpr_ctl_put()
378 nval = ctl->max; in snd_emu10k1_gpr_ctl_put()
379 if (nval != ctl->value[i]) in snd_emu10k1_gpr_ctl_put()
381 val = ctl->value[i] = nval; in snd_emu10k1_gpr_ctl_put()
382 switch (ctl->translation) { in snd_emu10k1_gpr_ctl_put()
384 snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0, val); in snd_emu10k1_gpr_ctl_put()
387 snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0, db_table[val]); in snd_emu10k1_gpr_ctl_put()
390 if ((ctl->count % 5) != 0 || (ctl->count / 5) != ctl->vcount) { in snd_emu10k1_gpr_ctl_put()
395 … snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[j * ctl->vcount + i], 0, bass_table[val][j]); in snd_emu10k1_gpr_ctl_put()
398 if ((ctl->count % 5) != 0 || (ctl->count / 5) != ctl->vcount) { in snd_emu10k1_gpr_ctl_put()
403 …snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[j * ctl->vcount + i], 0, treble_table[val][j]); in snd_emu10k1_gpr_ctl_put()
406 snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0, onoff_table[val]); in snd_emu10k1_gpr_ctl_put()
653 struct snd_emu10k1_fx8010_ctl *ctl; in snd_emu10k1_look_for_ctl() local
656 list_for_each_entry(ctl, &emu->fx8010.gpr_ctl, list) { in snd_emu10k1_look_for_ctl()
657 kcontrol = ctl->kcontrol; in snd_emu10k1_look_for_ctl()
661 return ctl; in snd_emu10k1_look_for_ctl()
774 struct snd_emu10k1_fx8010_ctl *ctl; in snd_emu10k1_ctl_private_free() local
776 ctl = (struct snd_emu10k1_fx8010_ctl *) kctl->private_value; in snd_emu10k1_ctl_private_free()
778 list_del(&ctl->list); in snd_emu10k1_ctl_private_free()
779 kfree(ctl); in snd_emu10k1_ctl_private_free()
789 struct snd_emu10k1_fx8010_ctl *ctl, *nctl; in snd_emu10k1_add_controls() local
817 ctl = snd_emu10k1_look_for_ctl(emu, &gctl->id); in snd_emu10k1_add_controls()
842 if (ctl == NULL) { in snd_emu10k1_add_controls()
843 ctl = kmalloc(sizeof(*ctl), GFP_KERNEL); in snd_emu10k1_add_controls()
844 if (ctl == NULL) { in snd_emu10k1_add_controls()
849 knew.private_value = (unsigned long)ctl; in snd_emu10k1_add_controls()
850 *ctl = *nctl; in snd_emu10k1_add_controls()
852 kfree(ctl); in snd_emu10k1_add_controls()
857 ctl->kcontrol = kctl; in snd_emu10k1_add_controls()
858 list_add_tail(&ctl->list, &emu->fx8010.gpr_ctl); in snd_emu10k1_add_controls()
861 nctl->list = ctl->list; in snd_emu10k1_add_controls()
862 nctl->kcontrol = ctl->kcontrol; in snd_emu10k1_add_controls()
863 *ctl = *nctl; in snd_emu10k1_add_controls()
865 SNDRV_CTL_EVENT_MASK_INFO, &ctl->kcontrol->id); in snd_emu10k1_add_controls()
867 snd_emu10k1_gpr_ctl_put(ctl->kcontrol, val); in snd_emu10k1_add_controls()
882 struct snd_emu10k1_fx8010_ctl *ctl; in snd_emu10k1_del_controls() local
890 ctl = snd_emu10k1_look_for_ctl(emu, &id); in snd_emu10k1_del_controls()
891 if (ctl) in snd_emu10k1_del_controls()
892 snd_ctl_remove(card, ctl->kcontrol); in snd_emu10k1_del_controls()
904 struct snd_emu10k1_fx8010_ctl *ctl; in snd_emu10k1_list_controls() local
911 list_for_each_entry(ctl, &emu->fx8010.gpr_ctl, list) { in snd_emu10k1_list_controls()
916 id = &ctl->kcontrol->id; in snd_emu10k1_list_controls()
922 gctl->vcount = ctl->vcount; in snd_emu10k1_list_controls()
923 gctl->count = ctl->count; in snd_emu10k1_list_controls()
925 gctl->gpr[j] = ctl->gpr[j]; in snd_emu10k1_list_controls()
926 gctl->value[j] = ctl->value[j]; in snd_emu10k1_list_controls()
928 gctl->min = ctl->min; in snd_emu10k1_list_controls()
929 gctl->max = ctl->max; in snd_emu10k1_list_controls()
930 gctl->translation = ctl->translation; in snd_emu10k1_list_controls()
1077 snd_emu10k1_init_mono_control(struct snd_emu10k1_fx8010_control_gpr *ctl, in snd_emu10k1_init_mono_control() argument
1080 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; in snd_emu10k1_init_mono_control()
1081 strcpy(ctl->id.name, name); in snd_emu10k1_init_mono_control()
1082 ctl->vcount = ctl->count = 1; in snd_emu10k1_init_mono_control()
1083 ctl->gpr[0] = gpr + 0; ctl->value[0] = defval; in snd_emu10k1_init_mono_control()
1085 ctl->min = 0; in snd_emu10k1_init_mono_control()
1086 ctl->max = 0x7fffffff; in snd_emu10k1_init_mono_control()
1087 ctl->tlv = snd_emu10k1_db_linear; in snd_emu10k1_init_mono_control()
1088 ctl->translation = EMU10K1_GPR_TRANSLATION_NONE; in snd_emu10k1_init_mono_control()
1090 ctl->min = 0; in snd_emu10k1_init_mono_control()
1091 ctl->max = 100; in snd_emu10k1_init_mono_control()
1092 ctl->tlv = snd_emu10k1_db_scale1; in snd_emu10k1_init_mono_control()
1093 ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100; in snd_emu10k1_init_mono_control()
1098 snd_emu10k1_init_stereo_control(struct snd_emu10k1_fx8010_control_gpr *ctl, in snd_emu10k1_init_stereo_control() argument
1101 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; in snd_emu10k1_init_stereo_control()
1102 strcpy(ctl->id.name, name); in snd_emu10k1_init_stereo_control()
1103 ctl->vcount = ctl->count = 2; in snd_emu10k1_init_stereo_control()
1104 ctl->gpr[0] = gpr + 0; ctl->value[0] = defval; in snd_emu10k1_init_stereo_control()
1105 ctl->gpr[1] = gpr + 1; ctl->value[1] = defval; in snd_emu10k1_init_stereo_control()
1107 ctl->min = 0; in snd_emu10k1_init_stereo_control()
1108 ctl->max = 0x7fffffff; in snd_emu10k1_init_stereo_control()
1109 ctl->tlv = snd_emu10k1_db_linear; in snd_emu10k1_init_stereo_control()
1110 ctl->translation = EMU10K1_GPR_TRANSLATION_NONE; in snd_emu10k1_init_stereo_control()
1112 ctl->min = 0; in snd_emu10k1_init_stereo_control()
1113 ctl->max = 100; in snd_emu10k1_init_stereo_control()
1114 ctl->tlv = snd_emu10k1_db_scale1; in snd_emu10k1_init_stereo_control()
1115 ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100; in snd_emu10k1_init_stereo_control()
1120 snd_emu10k1_init_mono_onoff_control(struct snd_emu10k1_fx8010_control_gpr *ctl, in snd_emu10k1_init_mono_onoff_control() argument
1123 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; in snd_emu10k1_init_mono_onoff_control()
1124 strcpy(ctl->id.name, name); in snd_emu10k1_init_mono_onoff_control()
1125 ctl->vcount = ctl->count = 1; in snd_emu10k1_init_mono_onoff_control()
1126 ctl->gpr[0] = gpr + 0; ctl->value[0] = defval; in snd_emu10k1_init_mono_onoff_control()
1127 ctl->min = 0; in snd_emu10k1_init_mono_onoff_control()
1128 ctl->max = 1; in snd_emu10k1_init_mono_onoff_control()
1129 ctl->translation = EMU10K1_GPR_TRANSLATION_ONOFF; in snd_emu10k1_init_mono_onoff_control()
1133 snd_emu10k1_init_stereo_onoff_control(struct snd_emu10k1_fx8010_control_gpr *ctl, in snd_emu10k1_init_stereo_onoff_control() argument
1136 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; in snd_emu10k1_init_stereo_onoff_control()
1137 strcpy(ctl->id.name, name); in snd_emu10k1_init_stereo_onoff_control()
1138 ctl->vcount = ctl->count = 2; in snd_emu10k1_init_stereo_onoff_control()
1139 ctl->gpr[0] = gpr + 0; ctl->value[0] = defval; in snd_emu10k1_init_stereo_onoff_control()
1140 ctl->gpr[1] = gpr + 1; ctl->value[1] = defval; in snd_emu10k1_init_stereo_onoff_control()
1141 ctl->min = 0; in snd_emu10k1_init_stereo_onoff_control()
1142 ctl->max = 1; in snd_emu10k1_init_stereo_onoff_control()
1143 ctl->translation = EMU10K1_GPR_TRANSLATION_ONOFF; in snd_emu10k1_init_stereo_onoff_control()
1181 struct snd_emu10k1_fx8010_control_gpr *controls = NULL, *ctl; in _snd_emu10k1_audigy_init_efx() local
1448 ctl = &controls[nctl + 0]; in _snd_emu10k1_audigy_init_efx()
1449 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; in _snd_emu10k1_audigy_init_efx()
1450 strcpy(ctl->id.name, "Tone Control - Bass"); in _snd_emu10k1_audigy_init_efx()
1451 ctl->vcount = 2; in _snd_emu10k1_audigy_init_efx()
1452 ctl->count = 10; in _snd_emu10k1_audigy_init_efx()
1453 ctl->min = 0; in _snd_emu10k1_audigy_init_efx()
1454 ctl->max = 40; in _snd_emu10k1_audigy_init_efx()
1455 ctl->value[0] = ctl->value[1] = 20; in _snd_emu10k1_audigy_init_efx()
1456 ctl->translation = EMU10K1_GPR_TRANSLATION_BASS; in _snd_emu10k1_audigy_init_efx()
1457 ctl = &controls[nctl + 1]; in _snd_emu10k1_audigy_init_efx()
1458 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; in _snd_emu10k1_audigy_init_efx()
1459 strcpy(ctl->id.name, "Tone Control - Treble"); in _snd_emu10k1_audigy_init_efx()
1460 ctl->vcount = 2; in _snd_emu10k1_audigy_init_efx()
1461 ctl->count = 10; in _snd_emu10k1_audigy_init_efx()
1462 ctl->min = 0; in _snd_emu10k1_audigy_init_efx()
1463 ctl->max = 40; in _snd_emu10k1_audigy_init_efx()
1464 ctl->value[0] = ctl->value[1] = 20; in _snd_emu10k1_audigy_init_efx()
1465 ctl->translation = EMU10K1_GPR_TRANSLATION_TREBLE; in _snd_emu10k1_audigy_init_efx()
1812 struct snd_emu10k1_fx8010_control_gpr *controls = NULL, *ctl; in _snd_emu10k1_init_efx() local
2161 ctl = &controls[i + 0]; in _snd_emu10k1_init_efx()
2162 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; in _snd_emu10k1_init_efx()
2163 strcpy(ctl->id.name, "Tone Control - Bass"); in _snd_emu10k1_init_efx()
2164 ctl->vcount = 2; in _snd_emu10k1_init_efx()
2165 ctl->count = 10; in _snd_emu10k1_init_efx()
2166 ctl->min = 0; in _snd_emu10k1_init_efx()
2167 ctl->max = 40; in _snd_emu10k1_init_efx()
2168 ctl->value[0] = ctl->value[1] = 20; in _snd_emu10k1_init_efx()
2169 ctl->tlv = snd_emu10k1_bass_treble_db_scale; in _snd_emu10k1_init_efx()
2170 ctl->translation = EMU10K1_GPR_TRANSLATION_BASS; in _snd_emu10k1_init_efx()
2171 ctl = &controls[i + 1]; in _snd_emu10k1_init_efx()
2172 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; in _snd_emu10k1_init_efx()
2173 strcpy(ctl->id.name, "Tone Control - Treble"); in _snd_emu10k1_init_efx()
2174 ctl->vcount = 2; in _snd_emu10k1_init_efx()
2175 ctl->count = 10; in _snd_emu10k1_init_efx()
2176 ctl->min = 0; in _snd_emu10k1_init_efx()
2177 ctl->max = 40; in _snd_emu10k1_init_efx()
2178 ctl->value[0] = ctl->value[1] = 20; in _snd_emu10k1_init_efx()
2179 ctl->tlv = snd_emu10k1_bass_treble_db_scale; in _snd_emu10k1_init_efx()
2180 ctl->translation = EMU10K1_GPR_TRANSLATION_TREBLE; in _snd_emu10k1_init_efx()