• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/sound/pci/emu10k1/

Lines Matching defs:ctl

322 	struct snd_emu10k1_fx8010_ctl *ctl =
325 if (ctl->min == 0 && ctl->max == 1)
329 uinfo->count = ctl->vcount;
330 uinfo->value.integer.min = ctl->min;
331 uinfo->value.integer.max = ctl->max;
338 struct snd_emu10k1_fx8010_ctl *ctl =
344 for (i = 0; i < ctl->vcount; i++)
345 ucontrol->value.integer.value[i] = ctl->value[i];
353 struct snd_emu10k1_fx8010_ctl *ctl =
361 for (i = 0; i < ctl->vcount; i++) {
363 if (nval < ctl->min)
364 nval = ctl->min;
365 if (nval > ctl->max)
366 nval = ctl->max;
367 if (nval != ctl->value[i])
369 val = ctl->value[i] = nval;
370 switch (ctl->translation) {
372 snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0, val);
375 snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0, db_table[val]);
378 if ((ctl->count % 5) != 0 || (ctl->count / 5) != ctl->vcount) {
383 snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[j * ctl->vcount + i], 0, bass_table[val][j]);
386 if ((ctl->count % 5) != 0 || (ctl->count / 5) != ctl->vcount) {
391 snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[j * ctl->vcount + i], 0, treble_table[val][j]);
394 snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0, onoff_table[val]);
641 struct snd_emu10k1_fx8010_ctl *ctl;
644 list_for_each_entry(ctl, &emu->fx8010.gpr_ctl, list) {
645 kcontrol = ctl->kcontrol;
649 return ctl;
761 struct snd_emu10k1_fx8010_ctl *ctl;
763 ctl = (struct snd_emu10k1_fx8010_ctl *) kctl->private_value;
765 list_del(&ctl->list);
766 kfree(ctl);
776 struct snd_emu10k1_fx8010_ctl *ctl, *nctl;
804 ctl = snd_emu10k1_look_for_ctl(emu, &gctl->id);
829 if (ctl == NULL) {
830 ctl = kmalloc(sizeof(*ctl), GFP_KERNEL);
831 if (ctl == NULL) {
836 knew.private_value = (unsigned long)ctl;
837 *ctl = *nctl;
839 kfree(ctl);
844 ctl->kcontrol = kctl;
845 list_add_tail(&ctl->list, &emu->fx8010.gpr_ctl);
848 nctl->list = ctl->list;
849 nctl->kcontrol = ctl->kcontrol;
850 *ctl = *nctl;
852 SNDRV_CTL_EVENT_MASK_INFO, &ctl->kcontrol->id);
854 snd_emu10k1_gpr_ctl_put(ctl->kcontrol, val);
869 struct snd_emu10k1_fx8010_ctl *ctl;
877 ctl = snd_emu10k1_look_for_ctl(emu, &id);
878 if (ctl)
879 snd_ctl_remove(card, ctl->kcontrol);
891 struct snd_emu10k1_fx8010_ctl *ctl;
898 list_for_each_entry(ctl, &emu->fx8010.gpr_ctl, list) {
903 id = &ctl->kcontrol->id;
909 gctl->vcount = ctl->vcount;
910 gctl->count = ctl->count;
912 gctl->gpr[j] = ctl->gpr[j];
913 gctl->value[j] = ctl->value[j];
915 gctl->min = ctl->min;
916 gctl->max = ctl->max;
917 gctl->translation = ctl->translation;
1063 snd_emu10k1_init_mono_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
1066 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
1067 strcpy(ctl->id.name, name);
1068 ctl->vcount = ctl->count = 1;
1069 ctl->gpr[0] = gpr + 0; ctl->value[0] = defval;
1071 ctl->min = 0;
1072 ctl->max = 0x7fffffff;
1073 ctl->tlv = snd_emu10k1_db_linear;
1074 ctl->translation = EMU10K1_GPR_TRANSLATION_NONE;
1076 ctl->min = 0;
1077 ctl->max = 100;
1078 ctl->tlv = snd_emu10k1_db_scale1;
1079 ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100;
1084 snd_emu10k1_init_stereo_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
1087 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
1088 strcpy(ctl->id.name, name);
1089 ctl->vcount = ctl->count = 2;
1090 ctl->gpr[0] = gpr + 0; ctl->value[0] = defval;
1091 ctl->gpr[1] = gpr + 1; ctl->value[1] = defval;
1093 ctl->min = 0;
1094 ctl->max = 0x7fffffff;
1095 ctl->tlv = snd_emu10k1_db_linear;
1096 ctl->translation = EMU10K1_GPR_TRANSLATION_NONE;
1098 ctl->min = 0;
1099 ctl->max = 100;
1100 ctl->tlv = snd_emu10k1_db_scale1;
1101 ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100;
1106 snd_emu10k1_init_mono_onoff_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
1109 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
1110 strcpy(ctl->id.name, name);
1111 ctl->vcount = ctl->count = 1;
1112 ctl->gpr[0] = gpr + 0; ctl->value[0] = defval;
1113 ctl->min = 0;
1114 ctl->max = 1;
1115 ctl->translation = EMU10K1_GPR_TRANSLATION_ONOFF;
1119 snd_emu10k1_init_stereo_onoff_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
1122 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
1123 strcpy(ctl->id.name, name);
1124 ctl->vcount = ctl->count = 2;
1125 ctl->gpr[0] = gpr + 0; ctl->value[0] = defval;
1126 ctl->gpr[1] = gpr + 1; ctl->value[1] = defval;
1127 ctl->min = 0;
1128 ctl->max = 1;
1129 ctl->translation = EMU10K1_GPR_TRANSLATION_ONOFF;
1167 struct snd_emu10k1_fx8010_control_gpr *controls = NULL, *ctl;
1433 ctl = &controls[nctl + 0];
1434 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
1435 strcpy(ctl->id.name, "Tone Control - Bass");
1436 ctl->vcount = 2;
1437 ctl->count = 10;
1438 ctl->min = 0;
1439 ctl->max = 40;
1440 ctl->value[0] = ctl->value[1] = 20;
1441 ctl->translation = EMU10K1_GPR_TRANSLATION_BASS;
1442 ctl = &controls[nctl + 1];
1443 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
1444 strcpy(ctl->id.name, "Tone Control - Treble");
1445 ctl->vcount = 2;
1446 ctl->count = 10;
1447 ctl->min = 0;
1448 ctl->max = 40;
1449 ctl->value[0] = ctl->value[1] = 20;
1450 ctl->translation = EMU10K1_GPR_TRANSLATION_TREBLE;
1787 struct snd_emu10k1_fx8010_control_gpr *controls = NULL, *ctl;
2136 ctl = &controls[i + 0];
2137 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
2138 strcpy(ctl->id.name, "Tone Control - Bass");
2139 ctl->vcount = 2;
2140 ctl->count = 10;
2141 ctl->min = 0;
2142 ctl->max = 40;
2143 ctl->value[0] = ctl->value[1] = 20;
2144 ctl->translation = EMU10K1_GPR_TRANSLATION_BASS;
2145 ctl = &controls[i + 1];
2146 ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
2147 strcpy(ctl->id.name, "Tone Control - Treble");
2148 ctl->vcount = 2;
2149 ctl->count = 10;
2150 ctl->min = 0;
2151 ctl->max = 40;
2152 ctl->value[0] = ctl->value[1] = 20;
2153 ctl->translation = EMU10K1_GPR_TRANSLATION_TREBLE;