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

Lines Matching refs:voice

85 static int      opl3_kill_note(int dev, int voice, int note, int velocity);
94 devc->cmask = 0x3f; /* Connect all possible 4 OP voice operators */
268 static int opl3_kill_note (int devno, int voice, int note, int velocity)
272 if (voice < 0 || voice >= devc->nr_voice)
275 devc->v_alloc->map[voice] = 0;
277 map = &pv_map[devc->lv_map[voice]];
278 DEB(printk("Kill note %d\n", voice));
283 opl3_command(map->ioaddr, KEYON_BLOCK + map->voice_num, devc->voc[voice].keyon_byte & ~0x20);
284 devc->voc[voice].keyon_byte = 0;
285 devc->voc[voice].bender = 0;
286 devc->voc[voice].volume = 64;
287 devc->voc[voice].panning = 0xffff; /* Not set */
288 devc->voc[voice].bender_range = 200;
289 devc->voc[voice].orig_freq = 0;
290 devc->voc[voice].current_freq = 0;
291 devc->voc[voice].mode = 0;
311 static int opl3_set_instr (int dev, int voice, int instr_no)
313 if (voice < 0 || voice >= devc->nr_voice)
318 devc->act_i[voice] = &devc->i_map[instr_no];
371 static void set_voice_volume(int voice, int volume, int main_vol)
377 if (voice < 0 || voice >= devc->nr_voice)
380 map = &pv_map[devc->lv_map[voice]];
381 instr = devc->act_i[voice];
389 if (devc->voc[voice].mode == 0)
392 if (devc->voc[voice].mode == 2)
410 * 4 OP voice
458 static int opl3_start_note (int dev, int voice, int note, int volume)
465 if (voice < 0 || voice >= devc->nr_voice)
468 map = &pv_map[devc->lv_map[voice]];
469 pan = devc->voc[voice].panning;
478 set_voice_volume(voice, volume, devc->voc[voice].volume);
507 instr = devc->act_i[voice];
514 printk(KERN_WARNING "opl3: Initializing voice %d with undefined instrument\n", voice);
600 * If the voice is a 4 OP one, initialize the operators 3 and 4 also
645 devc->voc[voice].mode = voice_mode;
646 set_voice_volume(voice, volume, devc->voc[voice].volume);
648 freq = devc->voc[voice].orig_freq = note_to_freq(note) / 1000;
655 freq = compute_finetune(devc->voc[voice].orig_freq, devc->voc[voice].bender, devc->voc[voice].bender_range, 0);
656 devc->voc[voice].current_freq = freq;
670 devc->voc[voice].keyon_byte = data;
850 static void opl3_panning(int dev, int voice, int value)
852 devc->voc[voice].panning = value;
865 static void opl3_aftertouch(int dev, int voice, int pressure)
871 if (voice < 0 || voice >= devc->nr_voice)
874 map = &pv_map[devc->lv_map[voice]];
876 DEB(printk("Aftertouch %d\n", voice));
885 instr = devc->act_i[voice];
890 if (devc->voc[voice].mode == 4)
934 static void bend_pitch(int dev, int voice, int value)
940 map = &pv_map[devc->lv_map[voice]];
945 devc->voc[voice].bender = value;
948 if (!(devc->voc[voice].keyon_byte & 0x20))
953 freq = compute_finetune(devc->voc[voice].orig_freq, devc->voc[voice].bender, devc->voc[voice].bender_range, 0);
954 devc->voc[voice].current_freq = freq;
964 devc->voc[voice].keyon_byte = data;
968 static void opl3_controller (int dev, int voice, int ctrl_num, int value)
970 if (voice < 0 || voice >= devc->nr_voice)
976 bend_pitch(dev, voice, value);
980 devc->voc[voice].bender_range = value;
984 devc->voc[voice].volume = value / 128;
988 devc->voc[voice].panning = (value * 2) - 128;
993 static void opl3_bender(int dev, int voice, int value)
995 if (voice < 0 || voice >= devc->nr_voice)
998 bend_pitch(dev, voice, value - 8192);
1037 * Now try to find a free voice
1067 static void opl3_setup_voice(int dev, int voice, int chn)
1072 opl3_set_instr(dev, voice, info->pgm_num);
1074 devc->voc[voice].bender = 0;
1075 devc->voc[voice].bender_range = info->bender_range;
1076 devc->voc[voice].volume = info->controllers[CTL_MAIN_VOLUME];
1077 devc->voc[voice].panning = (info->controllers[CTL_PAN] * 2) - 128;