/linux-4.4.14/include/uapi/linux/ |
H A D | ultrasound.h | 29 * Each command affects one voice defined in byte 3. 33 * _GUS_VOICEON - Starts voice (P1=voice mode) 34 * _GUS_VOICEOFF - Stops voice (no parameters) 35 * _GUS_VOICEFADE - Stops the voice smoothly. 36 * _GUS_VOICEMODE - Alters the voice mode, don't start or stop voice (P1=voice mode) 37 * _GUS_VOICEBALA - Sets voice balance (P1, 0=left, 7=middle and 15=right, default 7) 38 * _GUS_VOICEFREQ - Sets voice (sample) playback frequency (P1=Hz) 39 * _GUS_VOICEVOL - Sets voice volume (P1=volume, 0xfff=max, 0xeff=half, 0x000=off) 40 * _GUS_VOICEVOL2 - Sets voice volume (P1=volume, 0xfff=max, 0xeff=half, 0x000=off) 42 * volume. It just updates volume in the voice table). 75 #define _GUS_CMD(chn, voice, cmd, p1, p2) \ 78 _seqbuf[_seqbufptr+3] = voice;\ 84 #define GUS_VOICESAMPLE(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICESAMPLE, (p1), 0) /* OBSOLETE */ 85 #define GUS_VOICEON(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEON, (p1), 0) 86 #define GUS_VOICEOFF(chn, voice) _GUS_CMD(chn, voice, _GUS_VOICEOFF, 0, 0) 87 #define GUS_VOICEFADE(chn, voice) _GUS_CMD(chn, voice, _GUS_VOICEFADE, 0, 0) 88 #define GUS_VOICEMODE(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEMODE, (p1), 0) 89 #define GUS_VOICEBALA(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEBALA, (p1), 0) 90 #define GUS_VOICEFREQ(chn, voice, p) _GUS_CMD(chn, voice, _GUS_VOICEFREQ, \ 92 #define GUS_VOICEVOL(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEVOL, (p1), 0) 93 #define GUS_VOICEVOL2(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEVOL2, (p1), 0) 94 #define GUS_RAMPRANGE(chn, voice, low, high) _GUS_CMD(chn, voice, _GUS_RAMPRANGE, (low), (high)) 95 #define GUS_RAMPRATE(chn, voice, p1, p2) _GUS_CMD(chn, voice, _GUS_RAMPRATE, (p1), (p2)) 96 #define GUS_RAMPMODE(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_RAMPMODE, (p1), 0) 97 #define GUS_RAMPON(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_RAMPON, (p1), 0) 98 #define GUS_RAMPOFF(chn, voice) _GUS_CMD(chn, voice, _GUS_RAMPOFF, 0, 0) 99 #define GUS_VOLUME_SCALE(chn, voice, p1, p2) _GUS_CMD(chn, voice, _GUS_VOLUME_SCALE, (p1), (p2)) 100 #define GUS_VOICE_POS(chn, voice, p) _GUS_CMD(chn, voice, _GUS_VOICE_POS, \
|
H A D | sound.h | 14 #define SND_DEV_DSP 3 /* Digitized voice /dev/dsp */
|
H A D | tty.h | 31 #define N_V253 19 /* Codec control over voice modem */
|
H A D | soundcard.h | 1125 * Midi voice messages 1205 #define SEQ_V2_X_CONTROL(dev, voice, controller, value) {_SEQ_NEEDBUF(8);\ 1209 _seqbuf[_seqbufptr+3] = (voice);\ 1219 #define SEQ_PITCHBEND(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value) 1220 #define SEQ_BENDER_RANGE(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value) 1221 #define SEQ_EXPRESSION(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_EXPRESSION, value*128) 1222 #define SEQ_MAIN_VOLUME(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_MAIN_VOLUME, (value*16383)/100) 1223 #define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2)
|
/linux-4.4.14/sound/pci/trident/ |
H A D | trident_main.c | 49 struct snd_trident_voice * voice, 52 struct snd_trident_voice * voice, 67 static void snd_trident_print_voice_regs(struct snd_trident *trident, int voice) 71 dev_dbg(trident->card->dev, "Trident voice %i:\n", voice); 72 outb(voice, TRID_REG(trident, T4D_LFO_GC_CIR)); 288 void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice) 290 Description: Start a voice, any channel 0 thru 63. 294 Parameters : voice - Voice number 0 thru n. 301 void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice) snd_trident_start_voice() argument 303 unsigned int mask = 1 << (voice & 0x1f); snd_trident_start_voice() 304 unsigned int reg = (voice & 0x20) ? T4D_START_B : T4D_START_A; snd_trident_start_voice() 312 void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice) 314 Description: Stop a voice, any channel 0 thru 63. 318 Parameters : voice - Voice number 0 thru n. 325 void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice) snd_trident_stop_voice() argument 327 unsigned int mask = 1 << (voice & 0x1f); snd_trident_stop_voice() 328 unsigned int reg = (voice & 0x20) ? T4D_STOP_B : T4D_STOP_A; snd_trident_stop_voice() 440 voice - synthesizer voice structure 446 struct snd_trident_voice * voice) snd_trident_write_voice_regs() 451 regs[1] = voice->LBA; snd_trident_write_voice_regs() 452 regs[4] = (voice->GVSel << 31) | snd_trident_write_voice_regs() 453 ((voice->Pan & 0x0000007f) << 24) | snd_trident_write_voice_regs() 454 ((voice->CTRL & 0x0000000f) << 12); snd_trident_write_voice_regs() 455 FmcRvolCvol = ((voice->FMC & 3) << 14) | snd_trident_write_voice_regs() 456 ((voice->RVol & 0x7f) << 7) | snd_trident_write_voice_regs() 457 (voice->CVol & 0x7f); snd_trident_write_voice_regs() 461 regs[4] |= voice->number > 31 ? snd_trident_write_voice_regs() 462 (voice->Vol & 0x000003ff) : snd_trident_write_voice_regs() 463 ((voice->Vol & 0x00003fc) << (16-2)) | snd_trident_write_voice_regs() 464 (voice->EC & 0x00000fff); snd_trident_write_voice_regs() 465 regs[0] = (voice->CSO << 16) | ((voice->Alpha & 0x00000fff) << 4) | snd_trident_write_voice_regs() 466 (voice->FMS & 0x0000000f); snd_trident_write_voice_regs() 467 regs[2] = (voice->ESO << 16) | (voice->Delta & 0x0ffff); snd_trident_write_voice_regs() 468 regs[3] = (voice->Attribute << 16) | FmcRvolCvol; snd_trident_write_voice_regs() 471 regs[4] |= ((voice->Vol & 0x000003fc) << (16-2)) | snd_trident_write_voice_regs() 472 (voice->EC & 0x00000fff); snd_trident_write_voice_regs() 473 regs[0] = (voice->CSO << 16) | ((voice->Alpha & 0x00000fff) << 4) | snd_trident_write_voice_regs() 474 (voice->FMS & 0x0000000f); snd_trident_write_voice_regs() 475 regs[2] = (voice->ESO << 16) | (voice->Delta & 0x0ffff); snd_trident_write_voice_regs() 479 regs[4] |= ((voice->Vol & 0x000003fc) << (16-2)) | snd_trident_write_voice_regs() 480 (voice->EC & 0x00000fff); snd_trident_write_voice_regs() 481 regs[0] = (voice->Delta << 24) | (voice->CSO & 0x00ffffff); snd_trident_write_voice_regs() 482 regs[2] = ((voice->Delta << 16) & 0xff000000) | snd_trident_write_voice_regs() 483 (voice->ESO & 0x00ffffff); snd_trident_write_voice_regs() 484 regs[3] = (voice->Alpha << 20) | snd_trident_write_voice_regs() 485 ((voice->FMS & 0x0000000f) << 16) | FmcRvolCvol; snd_trident_write_voice_regs() 492 outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); snd_trident_write_voice_regs() 500 dev_dbg(trident->card->dev, "written %i channel:\n", voice->number); snd_trident_write_voice_regs() 523 voice - synthesizer voice structure 529 struct snd_trident_voice * voice, snd_trident_write_cso_reg() 532 voice->CSO = CSO; snd_trident_write_cso_reg() 533 outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); snd_trident_write_cso_reg() 535 outw(voice->CSO, TRID_REG(trident, CH_DX_CSO_ALPHA_FMS) + 2); snd_trident_write_cso_reg() 537 outl((voice->Delta << 24) | snd_trident_write_cso_reg() 538 (voice->CSO & 0x00ffffff), TRID_REG(trident, CH_NX_DELTA_CSO)); snd_trident_write_cso_reg() 549 voice - synthesizer voice structure 555 struct snd_trident_voice * voice, snd_trident_write_eso_reg() 558 voice->ESO = ESO; snd_trident_write_eso_reg() 559 outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); snd_trident_write_eso_reg() 561 outw(voice->ESO, TRID_REG(trident, CH_DX_ESO_DELTA) + 2); snd_trident_write_eso_reg() 563 outl(((voice->Delta << 16) & 0xff000000) | (voice->ESO & 0x00ffffff), snd_trident_write_eso_reg() 571 Description: This routine will write the new voice volume 575 voice - synthesizer voice structure 576 Vol - new voice volume 581 struct snd_trident_voice * voice, snd_trident_write_vol_reg() 584 voice->Vol = Vol; snd_trident_write_vol_reg() 585 outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); snd_trident_write_vol_reg() 589 outb(voice->Vol >> 2, TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC + 2)); snd_trident_write_vol_reg() 592 /* dev_dbg(trident->card->dev, "voice->Vol = 0x%x\n", voice->Vol); */ snd_trident_write_vol_reg() 593 outw((voice->CTRL << 12) | voice->Vol, snd_trident_write_vol_reg() 602 Description: This routine will write the new voice pan 606 voice - synthesizer voice structure 612 struct snd_trident_voice * voice, snd_trident_write_pan_reg() 615 voice->Pan = Pan; snd_trident_write_pan_reg() 616 outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); snd_trident_write_pan_reg() 617 outb(((voice->GVSel & 0x01) << 7) | (voice->Pan & 0x7f), snd_trident_write_pan_reg() 628 voice - synthesizer voice structure 634 struct snd_trident_voice * voice, snd_trident_write_rvol_reg() 637 voice->RVol = RVol; snd_trident_write_rvol_reg() 638 outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); snd_trident_write_rvol_reg() 639 outw(((voice->FMC & 0x0003) << 14) | ((voice->RVol & 0x007f) << 7) | snd_trident_write_rvol_reg() 640 (voice->CVol & 0x007f), snd_trident_write_rvol_reg() 652 voice - synthesizer voice structure 658 struct snd_trident_voice * voice, snd_trident_write_cvol_reg() 661 voice->CVol = CVol; snd_trident_write_cvol_reg() 662 outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); snd_trident_write_cvol_reg() 663 outw(((voice->FMC & 0x0003) << 14) | ((voice->RVol & 0x007f) << 7) | snd_trident_write_cvol_reg() 664 (voice->CVol & 0x007f), snd_trident_write_cvol_reg() 824 struct snd_trident_voice *voice = runtime->private_data; snd_trident_allocate_pcm_mem() local 831 if (voice->memblk) snd_trident_allocate_pcm_mem() 832 snd_trident_free_pages(trident, voice->memblk); snd_trident_allocate_pcm_mem() 833 voice->memblk = snd_trident_alloc_pages(trident, substream); snd_trident_allocate_pcm_mem() 834 if (voice->memblk == NULL) snd_trident_allocate_pcm_mem() 844 Description: Allocate extra voice as interrupt generator 858 struct snd_trident_voice *voice = runtime->private_data; snd_trident_allocate_evoice() local 859 struct snd_trident_voice *evoice = voice->extra; snd_trident_allocate_evoice() 861 /* voice management */ snd_trident_allocate_evoice() 868 voice->extra = evoice; snd_trident_allocate_evoice() 874 voice->extra = evoice = NULL; snd_trident_allocate_evoice() 919 struct snd_trident_voice *voice = runtime->private_data; snd_trident_hw_free() local 920 struct snd_trident_voice *evoice = voice ? voice->extra : NULL; snd_trident_hw_free() 923 if (voice && voice->memblk) { snd_trident_hw_free() 924 snd_trident_free_pages(trident, voice->memblk); snd_trident_hw_free() 925 voice->memblk = NULL; snd_trident_hw_free() 931 voice->extra = NULL; snd_trident_hw_free() 951 struct snd_trident_voice *voice = runtime->private_data; snd_trident_playback_prepare() local 952 struct snd_trident_voice *evoice = voice->extra; snd_trident_playback_prepare() 958 voice->Delta = snd_trident_convert_rate(runtime->rate); snd_trident_playback_prepare() 959 voice->spurious_threshold = snd_trident_spurious_threshold(runtime->rate, runtime->period_size); snd_trident_playback_prepare() 962 if (voice->memblk) snd_trident_playback_prepare() 963 voice->LBA = voice->memblk->offset; snd_trident_playback_prepare() 965 voice->LBA = runtime->dma_addr; snd_trident_playback_prepare() 967 voice->CSO = 0; snd_trident_playback_prepare() 968 voice->ESO = runtime->buffer_size - 1; /* in samples */ snd_trident_playback_prepare() 969 voice->CTRL = snd_trident_control_mode(substream); snd_trident_playback_prepare() 970 voice->FMC = 3; snd_trident_playback_prepare() 971 voice->GVSel = 1; snd_trident_playback_prepare() 972 voice->EC = 0; snd_trident_playback_prepare() 973 voice->Alpha = 0; snd_trident_playback_prepare() 974 voice->FMS = 0; snd_trident_playback_prepare() 975 voice->Vol = mix->vol; snd_trident_playback_prepare() 976 voice->RVol = mix->rvol; snd_trident_playback_prepare() 977 voice->CVol = mix->cvol; snd_trident_playback_prepare() 978 voice->Pan = mix->pan; snd_trident_playback_prepare() 979 voice->Attribute = 0; snd_trident_playback_prepare() 981 voice->Attribute = (1<<(30-16))|(2<<(26-16))| snd_trident_playback_prepare() 984 voice->Attribute = 0; snd_trident_playback_prepare() 987 snd_trident_write_voice_regs(trident, voice); snd_trident_playback_prepare() 990 evoice->Delta = voice->Delta; snd_trident_playback_prepare() 991 evoice->spurious_threshold = voice->spurious_threshold; snd_trident_playback_prepare() 992 evoice->LBA = voice->LBA; snd_trident_playback_prepare() 995 evoice->CTRL = voice->CTRL; snd_trident_playback_prepare() 1054 struct snd_trident_voice *voice = runtime->private_data; snd_trident_capture_prepare() local 1066 voice->LBA = runtime->dma_addr; snd_trident_capture_prepare() 1067 outl(voice->LBA, TRID_REG(trident, LEGACY_DMAR0)); snd_trident_capture_prepare() 1068 if (voice->memblk) snd_trident_capture_prepare() 1069 voice->LBA = voice->memblk->offset; snd_trident_capture_prepare() 1103 voice->Delta = snd_trident_convert_rate(runtime->rate); snd_trident_capture_prepare() 1104 voice->spurious_threshold = snd_trident_spurious_threshold(runtime->rate, runtime->period_size); snd_trident_capture_prepare() 1105 voice->isync = 1; snd_trident_capture_prepare() 1106 voice->isync_mark = runtime->period_size; snd_trident_capture_prepare() 1107 voice->isync_max = runtime->buffer_size; snd_trident_capture_prepare() 1109 // Set voice parameters snd_trident_capture_prepare() 1110 voice->CSO = 0; snd_trident_capture_prepare() 1111 voice->ESO = voice->isync_ESO = (runtime->period_size * 2) + 6 - 1; snd_trident_capture_prepare() 1112 voice->CTRL = snd_trident_control_mode(substream); snd_trident_capture_prepare() 1113 voice->FMC = 3; snd_trident_capture_prepare() 1114 voice->RVol = 0x7f; snd_trident_capture_prepare() 1115 voice->CVol = 0x7f; snd_trident_capture_prepare() 1116 voice->GVSel = 1; snd_trident_capture_prepare() 1117 voice->Pan = 0x7f; /* mute */ snd_trident_capture_prepare() 1118 voice->Vol = 0x3ff; /* mute */ snd_trident_capture_prepare() 1119 voice->EC = 0; snd_trident_capture_prepare() 1120 voice->Alpha = 0; snd_trident_capture_prepare() 1121 voice->FMS = 0; snd_trident_capture_prepare() 1122 voice->Attribute = 0; snd_trident_capture_prepare() 1124 snd_trident_write_voice_regs(trident, voice); snd_trident_capture_prepare() 1168 struct snd_trident_voice *voice = runtime->private_data; snd_trident_si7018_capture_hw_free() local 1169 struct snd_trident_voice *evoice = voice ? voice->extra : NULL; snd_trident_si7018_capture_hw_free() 1174 voice->extra = NULL; snd_trident_si7018_capture_hw_free() 1194 struct snd_trident_voice *voice = runtime->private_data; snd_trident_si7018_capture_prepare() local 1195 struct snd_trident_voice *evoice = voice->extra; snd_trident_si7018_capture_prepare() 1199 voice->LBA = runtime->dma_addr; snd_trident_si7018_capture_prepare() 1200 voice->Delta = snd_trident_convert_adc_rate(runtime->rate); snd_trident_si7018_capture_prepare() 1201 voice->spurious_threshold = snd_trident_spurious_threshold(runtime->rate, runtime->period_size); snd_trident_si7018_capture_prepare() 1203 // Set voice parameters snd_trident_si7018_capture_prepare() 1204 voice->CSO = 0; snd_trident_si7018_capture_prepare() 1205 voice->ESO = runtime->buffer_size - 1; /* in samples */ snd_trident_si7018_capture_prepare() 1206 voice->CTRL = snd_trident_control_mode(substream); snd_trident_si7018_capture_prepare() 1207 voice->FMC = 0; snd_trident_si7018_capture_prepare() 1208 voice->RVol = 0; snd_trident_si7018_capture_prepare() 1209 voice->CVol = 0; snd_trident_si7018_capture_prepare() 1210 voice->GVSel = 1; snd_trident_si7018_capture_prepare() 1211 voice->Pan = T4D_DEFAULT_PCM_PAN; snd_trident_si7018_capture_prepare() 1212 voice->Vol = 0; snd_trident_si7018_capture_prepare() 1213 voice->EC = 0; snd_trident_si7018_capture_prepare() 1214 voice->Alpha = 0; snd_trident_si7018_capture_prepare() 1215 voice->FMS = 0; snd_trident_si7018_capture_prepare() 1217 voice->Attribute = (2 << (30-16)) | snd_trident_si7018_capture_prepare() 1222 snd_trident_write_voice_regs(trident, voice); snd_trident_si7018_capture_prepare() 1226 evoice->spurious_threshold = voice->spurious_threshold; snd_trident_si7018_capture_prepare() 1227 evoice->LBA = voice->LBA; snd_trident_si7018_capture_prepare() 1230 evoice->CTRL = voice->CTRL; snd_trident_si7018_capture_prepare() 1265 struct snd_trident_voice *voice = runtime->private_data; snd_trident_foldback_prepare() local 1266 struct snd_trident_voice *evoice = voice->extra; snd_trident_foldback_prepare() 1271 if (voice->memblk) snd_trident_foldback_prepare() 1272 voice->LBA = voice->memblk->offset; snd_trident_foldback_prepare() 1274 voice->LBA = runtime->dma_addr; snd_trident_foldback_prepare() 1277 voice->ESO = runtime->buffer_size - 1; /* in samples */ snd_trident_foldback_prepare() 1280 voice->Delta = 0x1000; snd_trident_foldback_prepare() 1281 voice->spurious_threshold = snd_trident_spurious_threshold(48000, runtime->period_size); snd_trident_foldback_prepare() 1283 voice->CSO = 0; snd_trident_foldback_prepare() 1284 voice->CTRL = snd_trident_control_mode(substream); snd_trident_foldback_prepare() 1285 voice->FMC = 3; snd_trident_foldback_prepare() 1286 voice->RVol = 0x7f; snd_trident_foldback_prepare() 1287 voice->CVol = 0x7f; snd_trident_foldback_prepare() 1288 voice->GVSel = 1; snd_trident_foldback_prepare() 1289 voice->Pan = 0x7f; /* mute */ snd_trident_foldback_prepare() 1290 voice->Vol = 0x3ff; /* mute */ snd_trident_foldback_prepare() 1291 voice->EC = 0; snd_trident_foldback_prepare() 1292 voice->Alpha = 0; snd_trident_foldback_prepare() 1293 voice->FMS = 0; snd_trident_foldback_prepare() 1294 voice->Attribute = 0; snd_trident_foldback_prepare() 1297 outb(((voice->number & 0x3f) | 0x80), TRID_REG(trident, T4D_RCI + voice->foldback_chan)); snd_trident_foldback_prepare() 1299 snd_trident_write_voice_regs(trident, voice); snd_trident_foldback_prepare() 1302 evoice->Delta = voice->Delta; snd_trident_foldback_prepare() 1303 evoice->spurious_threshold = voice->spurious_threshold; snd_trident_foldback_prepare() 1304 evoice->LBA = voice->LBA; snd_trident_foldback_prepare() 1307 evoice->CTRL = voice->CTRL; snd_trident_foldback_prepare() 1408 struct snd_trident_voice *voice = runtime->private_data; snd_trident_spdif_prepare() local 1409 struct snd_trident_voice *evoice = voice->extra; snd_trident_spdif_prepare() 1419 voice->Delta = snd_trident_convert_rate(runtime->rate); snd_trident_spdif_prepare() 1420 voice->spurious_threshold = snd_trident_spurious_threshold(runtime->rate, runtime->period_size); snd_trident_spdif_prepare() 1424 if (voice->memblk) snd_trident_spdif_prepare() 1425 voice->LBA = voice->memblk->offset; snd_trident_spdif_prepare() 1427 voice->LBA = LBAO; snd_trident_spdif_prepare() 1429 voice->isync = 1; snd_trident_spdif_prepare() 1430 voice->isync3 = 1; snd_trident_spdif_prepare() 1431 voice->isync_mark = runtime->period_size; snd_trident_spdif_prepare() 1432 voice->isync_max = runtime->buffer_size; snd_trident_spdif_prepare() 1436 voice->ESO = voice->isync_ESO = (runtime->period_size * 2) + 6 - 1; snd_trident_spdif_prepare() 1439 voice->CTRL = snd_trident_control_mode(substream); snd_trident_spdif_prepare() 1441 voice->FMC = 3; snd_trident_spdif_prepare() 1442 voice->RVol = 0x7f; snd_trident_spdif_prepare() 1443 voice->CVol = 0x7f; snd_trident_spdif_prepare() 1444 voice->GVSel = 1; snd_trident_spdif_prepare() 1445 voice->Pan = 0x7f; snd_trident_spdif_prepare() 1446 voice->Vol = 0x3ff; snd_trident_spdif_prepare() 1447 voice->EC = 0; snd_trident_spdif_prepare() 1448 voice->CSO = 0; snd_trident_spdif_prepare() 1449 voice->Alpha = 0; snd_trident_spdif_prepare() 1450 voice->FMS = 0; snd_trident_spdif_prepare() 1451 voice->Attribute = 0; snd_trident_spdif_prepare() 1454 snd_trident_write_voice_regs(trident, voice); snd_trident_spdif_prepare() 1459 outw((voice->CSO & 0xffff), TRID_REG(trident, NX_SPCTRL_SPCSO)); snd_trident_spdif_prepare() 1460 outb((voice->CSO >> 16), TRID_REG(trident, NX_SPCTRL_SPCSO + 2)); snd_trident_spdif_prepare() 1469 voice->Delta = 0x800; snd_trident_spdif_prepare() 1470 voice->spurious_threshold = snd_trident_spurious_threshold(48000, runtime->period_size); snd_trident_spdif_prepare() 1473 if (voice->memblk) snd_trident_spdif_prepare() 1474 voice->LBA = voice->memblk->offset; snd_trident_spdif_prepare() 1476 voice->LBA = runtime->dma_addr; snd_trident_spdif_prepare() 1478 voice->CSO = 0; snd_trident_spdif_prepare() 1479 voice->ESO = runtime->buffer_size - 1; /* in samples */ snd_trident_spdif_prepare() 1480 voice->CTRL = snd_trident_control_mode(substream); snd_trident_spdif_prepare() 1481 voice->FMC = 3; snd_trident_spdif_prepare() 1482 voice->GVSel = 1; snd_trident_spdif_prepare() 1483 voice->EC = 0; snd_trident_spdif_prepare() 1484 voice->Alpha = 0; snd_trident_spdif_prepare() 1485 voice->FMS = 0; snd_trident_spdif_prepare() 1486 voice->Vol = mix->vol; snd_trident_spdif_prepare() 1487 voice->RVol = mix->rvol; snd_trident_spdif_prepare() 1488 voice->CVol = mix->cvol; snd_trident_spdif_prepare() 1489 voice->Pan = mix->pan; snd_trident_spdif_prepare() 1490 voice->Attribute = (1<<(30-16))|(7<<(26-16))| snd_trident_spdif_prepare() 1493 snd_trident_write_voice_regs(trident, voice); snd_trident_spdif_prepare() 1496 evoice->Delta = voice->Delta; snd_trident_spdif_prepare() 1497 evoice->spurious_threshold = voice->spurious_threshold; snd_trident_spdif_prepare() 1498 evoice->LBA = voice->LBA; snd_trident_spdif_prepare() 1501 evoice->CTRL = voice->CTRL; snd_trident_spdif_prepare() 1550 struct snd_trident_voice *voice, *evoice; snd_trident_trigger() local 1572 voice = s->runtime->private_data; snd_pcm_group_for_each_entry() 1573 evoice = voice->extra; snd_pcm_group_for_each_entry() 1574 what |= 1 << (voice->number & 0x1f); snd_pcm_group_for_each_entry() 1576 whati |= 1 << (voice->number & 0x1f); snd_pcm_group_for_each_entry() 1584 voice->running = 1; snd_pcm_group_for_each_entry() 1585 voice->stimer = val; snd_pcm_group_for_each_entry() 1587 voice->running = 0; snd_pcm_group_for_each_entry() 1590 if (voice->capture) snd_pcm_group_for_each_entry() 1592 if (voice->spdif) snd_pcm_group_for_each_entry() 1646 struct snd_trident_voice *voice = runtime->private_data; snd_trident_playback_pointer() local 1649 if (!voice->running) snd_trident_playback_pointer() 1654 outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); snd_trident_playback_pointer() 1685 struct snd_trident_voice *voice = runtime->private_data; snd_trident_capture_pointer() local 1688 if (!voice->running) snd_trident_capture_pointer() 1715 struct snd_trident_voice *voice = runtime->private_data; snd_trident_spdif_pointer() local 1718 if (!voice->running) snd_trident_spdif_pointer() 1847 struct snd_trident_voice *voice = runtime->private_data; snd_trident_pcm_free_substream() local 1850 if (voice) { snd_trident_pcm_free_substream() 1851 trident = voice->trident; snd_trident_pcm_free_substream() 1852 snd_trident_free_voice(trident, voice); snd_trident_pcm_free_substream() 1860 struct snd_trident_voice *voice; snd_trident_playback_open() local 1862 voice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0); snd_trident_playback_open() 1863 if (voice == NULL) snd_trident_playback_open() 1865 snd_trident_pcm_mixer_build(trident, voice, substream); snd_trident_playback_open() 1866 voice->substream = substream; snd_trident_playback_open() 1867 runtime->private_data = voice; snd_trident_playback_open() 1888 struct snd_trident_voice *voice = runtime->private_data; snd_trident_playback_close() local 1890 snd_trident_pcm_mixer_free(trident, voice, substream); snd_trident_playback_close() 1908 struct snd_trident_voice *voice; snd_trident_spdif_open() local 1911 voice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0); snd_trident_spdif_open() 1912 if (voice == NULL) snd_trident_spdif_open() 1914 voice->spdif = 1; snd_trident_spdif_open() 1915 voice->substream = substream; snd_trident_spdif_open() 1920 runtime->private_data = voice; snd_trident_spdif_open() 1987 struct snd_trident_voice *voice; snd_trident_capture_open() local 1990 voice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0); snd_trident_capture_open() 1991 if (voice == NULL) snd_trident_capture_open() 1993 voice->capture = 1; snd_trident_capture_open() 1994 voice->substream = substream; snd_trident_capture_open() 1995 runtime->private_data = voice; snd_trident_capture_open() 2031 struct snd_trident_voice *voice; snd_trident_foldback_open() local 2034 voice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0); snd_trident_foldback_open() 2035 if (voice == NULL) snd_trident_foldback_open() 2037 voice->foldback_chan = substream->number; snd_trident_foldback_open() 2038 voice->substream = substream; snd_trident_foldback_open() 2039 runtime->private_data = voice; snd_trident_foldback_open() 2058 struct snd_trident_voice *voice; snd_trident_foldback_close() local 2060 voice = runtime->private_data; snd_trident_foldback_close() 2064 outb(0x00, TRID_REG(trident, T4D_RCI + voice->foldback_chan)); snd_trident_foldback_close() 2697 if (mix->voice != NULL) snd_trident_pcm_vol_control_put() 2698 snd_trident_write_vol_reg(trident, mix->voice, val); snd_trident_pcm_vol_control_put() 2761 if (mix->voice != NULL) snd_trident_pcm_pan_control_put() 2762 snd_trident_write_pan_reg(trident, mix->voice, val); snd_trident_pcm_pan_control_put() 2816 if (mix->voice != NULL) snd_trident_pcm_rvol_control_put() 2817 snd_trident_write_rvol_reg(trident, mix->voice, val); snd_trident_pcm_rvol_control_put() 2874 if (mix->voice != NULL) snd_trident_pcm_cvol_control_put() 2875 snd_trident_write_cvol_reg(trident, mix->voice, val); snd_trident_pcm_cvol_control_put() 2920 struct snd_trident_voice *voice, snd_trident_pcm_mixer_build() 2925 if (snd_BUG_ON(!trident || !voice || !substream)) snd_trident_pcm_mixer_build() 2928 tmix->voice = voice; snd_trident_pcm_mixer_build() 2937 static int snd_trident_pcm_mixer_free(struct snd_trident *trident, struct snd_trident_voice *voice, struct snd_pcm_substream *substream) snd_trident_pcm_mixer_free() argument 2944 tmix->voice = NULL; snd_trident_pcm_mixer_free() 3032 tmix->voice = NULL; snd_trident_mixer() 3542 struct snd_trident_voice *voice; snd_trident_create() local 3643 voice = &trident->synth.voices[i]; snd_trident_create() 3644 voice->number = i; snd_trident_create() 3645 voice->trident = trident; snd_trident_create() 3724 struct snd_trident_voice *voice; snd_trident_interrupt() local 3745 voice = &trident->synth.voices[channel]; snd_trident_interrupt() 3746 if (!voice->pcm || voice->substream == NULL) { snd_trident_interrupt() 3750 delta = (int)stimer - (int)voice->stimer; snd_trident_interrupt() 3753 if ((unsigned int)delta < voice->spurious_threshold) { snd_trident_interrupt() 3760 voice->stimer = stimer; snd_trident_interrupt() 3761 if (voice->isync) { snd_trident_interrupt() 3762 if (!voice->isync3) { snd_trident_interrupt() 3767 tmp = voice->isync_max - tmp; snd_trident_interrupt() 3771 if (tmp < voice->isync_mark) { snd_trident_interrupt() 3773 tmp = voice->isync_ESO - 7; snd_trident_interrupt() 3775 tmp = voice->isync_ESO + 2; snd_trident_interrupt() 3776 /* update ESO for IRQ voice to preserve sync */ snd_trident_interrupt() 3777 snd_trident_stop_voice(trident, voice->number); snd_trident_interrupt() 3778 snd_trident_write_eso_reg(trident, voice, tmp); snd_trident_interrupt() 3779 snd_trident_start_voice(trident, voice->number); snd_trident_interrupt() 3781 } else if (voice->isync2) { snd_trident_interrupt() 3782 voice->isync2 = 0; snd_trident_interrupt() 3783 /* write original ESO and update CSO for IRQ voice to preserve sync */ snd_trident_interrupt() 3784 snd_trident_stop_voice(trident, voice->number); snd_trident_interrupt() 3785 snd_trident_write_cso_reg(trident, voice, voice->isync_mark); snd_trident_interrupt() 3786 snd_trident_write_eso_reg(trident, voice, voice->ESO); snd_trident_interrupt() 3787 snd_trident_start_voice(trident, voice->number); snd_trident_interrupt() 3790 if (voice->extra) { snd_trident_interrupt() 3791 /* update CSO for extra voice to preserve sync */ snd_trident_interrupt() 3792 snd_trident_stop_voice(trident, voice->extra->number); snd_trident_interrupt() 3793 snd_trident_write_cso_reg(trident, voice->extra, 0); snd_trident_interrupt() 3794 snd_trident_start_voice(trident, voice->extra->number); snd_trident_interrupt() 3798 snd_pcm_period_elapsed(voice->substream); snd_trident_interrupt() 3862 void snd_trident_free_voice(struct snd_trident * trident, struct snd_trident_voice *voice) snd_trident_free_voice() argument 3867 if (voice == NULL || !voice->use) snd_trident_free_voice() 3869 snd_trident_clear_voices(trident, voice->number, voice->number); snd_trident_free_voice() 3871 private_free = voice->private_free; snd_trident_free_voice() 3872 voice->private_free = NULL; snd_trident_free_voice() 3873 voice->private_data = NULL; snd_trident_free_voice() 3874 if (voice->pcm) snd_trident_free_voice() 3875 snd_trident_free_pcm_channel(trident, voice->number); snd_trident_free_voice() 3876 if (voice->synth) snd_trident_free_voice() 3877 snd_trident_free_synth_channel(trident, voice->number); snd_trident_free_voice() 3878 voice->use = voice->pcm = voice->synth = voice->midi = 0; snd_trident_free_voice() 3879 voice->capture = voice->spdif = 0; snd_trident_free_voice() 3880 voice->sample_ops = NULL; snd_trident_free_voice() 3881 voice->substream = NULL; snd_trident_free_voice() 3882 voice->extra = NULL; snd_trident_free_voice() 3885 private_free(voice); snd_trident_free_voice() 445 snd_trident_write_voice_regs(struct snd_trident * trident, struct snd_trident_voice * voice) snd_trident_write_voice_regs() argument 528 snd_trident_write_cso_reg(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned int CSO) snd_trident_write_cso_reg() argument 554 snd_trident_write_eso_reg(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned int ESO) snd_trident_write_eso_reg() argument 580 snd_trident_write_vol_reg(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned int Vol) snd_trident_write_vol_reg() argument 611 snd_trident_write_pan_reg(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned int Pan) snd_trident_write_pan_reg() argument 633 snd_trident_write_rvol_reg(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned int RVol) snd_trident_write_rvol_reg() argument 657 snd_trident_write_cvol_reg(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned int CVol) snd_trident_write_cvol_reg() argument 2919 snd_trident_pcm_mixer_build(struct snd_trident *trident, struct snd_trident_voice *voice, struct snd_pcm_substream *substream) snd_trident_pcm_mixer_build() argument
|
H A D | trident.h | 314 struct snd_trident_voice *extra; /* extra PCM voice (acts as interrupt generator) */ 332 void (*private_free)(struct snd_trident_voice *voice); 347 struct snd_trident_voice *voice; /* active voice */ member in struct:snd_trident_pcm_mixer 429 void snd_trident_free_voice(struct snd_trident * trident, struct snd_trident_voice *voice); 430 void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice); 431 void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice); 432 void snd_trident_write_voice_regs(struct snd_trident * trident, struct snd_trident_voice *voice);
|
/linux-4.4.14/sound/pci/au88x0/ |
H A D | au88x0_wt.h | 27 #define WT_STEREO(voice) ((WT_BAR(voice)+ 0x20 +(((voice)&0x1f)>>1))<<2) /* 0x0080 */ 28 #define WT_MUTE(voice) ((WT_BAR(voice)+ 0x40 +((voice)&0x1f))<<2) /* 0x0100 */ 29 #define WT_RUN(voice) ((WT_BAR(voice)+ 0x60 +((voice)&0x1f))<<2) /* 0x0180 */
|
H A D | au88x0_synth.c | 68 wt_voice_t *voice = &(vortex->wt_voice[wt]); vortex_wt_allocroute() local 107 voice->parm0 = voice->parm1 = 0xcfb23e2f; vortex_wt_allocroute() 108 hwwrite(vortex->mmio, WT_PARM(wt, 0), voice->parm0); vortex_wt_allocroute() 109 hwwrite(vortex->mmio, WT_PARM(wt, 1), voice->parm1); vortex_wt_allocroute() 209 "WT SetReg: voice out of range\n"); vortex_wt_SetReg() 339 wt_voice_t *voice = &(vortex->wt_voice[wt]); 343 voice->parm0 &= 0xff00ffff; 344 voice->parm0 |= (vol[0] & 0xff) << 0x10; 345 voice->parm1 &= 0xff00ffff; 346 voice->parm1 |= (vol[1] & 0xff) << 0x10; 349 hwwrite(vortex, WT_PARM(wt, 0), voice->parm0); 350 hwwrite(vortex, WT_PARM(wt, 1), voice->parm0); 352 if (voice->this_1D0 & 4) { 357 voice->parm3 &= 0xFFFFC07F; 358 voice->parm3 |= (ecx & 0x7f) << 7; 359 voice->parm3 &= 0xFFFFFF80; 360 voice->parm3 |= (eax & 0x7f); 362 voice->parm3 &= 0xFFE03FFF; 363 voice->parm3 |= (eax & 0xFE00) << 5; 366 hwwrite(vortex, WT_PARM(wt, 3), voice->parm3); 372 wt_voice_t *voice = &(vortex->wt_voice[wt]); 401 voice->parm0 &= 0xffff0001; 402 voice->parm0 |= (eax & 0x7fff) << 1; 403 voice->parm1 = voice->parm0 | 1; 407 hwwrite(vortex->mmio, WT_PARM(wt, 0), voice->parm0); 408 hwwrite(vortex->mmio, WT_PARM(wt, 1), voice->parm1);
|
/linux-4.4.14/sound/drivers/opl3/ |
H A D | opl3_midi.c | 128 static void debug_alloc(struct snd_opl3 *opl3, char *s, int voice) { debug_alloc() argument 132 printk(KERN_DEBUG "time %.5i: %s [%.2i]: ", opl3->use_time, s, voice); debug_alloc() 140 * Get a FM voice (channel) to play a note on. 144 int chan_4op_1; /* first voice for 4op instrument */ opl3_get_voice() 145 int chan_4op_2; /* second voice for 4op instrument */ opl3_get_voice() 163 int voice; opl3_get_voice() member in struct:best 169 best[i].voice = -1; opl3_get_voice() 187 /* allocate 4op voice */ opl3_get_voice() 193 /* kill one voice, CHEAP */ opl3_get_voice() 205 /* allocate 2op voice */ opl3_get_voice() 210 /* kill one voice on 2op channel, CHEAP */ opl3_get_voice() 218 bp->voice = i; opl3_get_voice() 223 if (best[i].voice >= 0) { opl3_get_voice() 225 printk(KERN_DEBUG "%s %iop allocation on voice %i\n", opl3_get_voice() 227 best[i].voice); opl3_get_voice() 229 return best[i].voice; opl3_get_voice() 299 int voice; snd_opl3_note_on() local 330 /* in SEQ mode, drum voice numbers are notes on drum channel */ snd_opl3_note_on() 384 /* in SEQ mode, allocate voice on free OPL3 channel */ snd_opl3_note_on() 386 voice = opl3_get_voice(opl3, instr_4op, chan); snd_opl3_note_on() 388 /* remap OSS voice */ snd_opl3_note_on() 389 voice = snd_opl3_oss_map[chan->number]; snd_opl3_note_on() 392 if (voice < 0) { snd_opl3_note_on() 397 if (voice < MAX_OPL2_VOICES) { snd_opl3_note_on() 400 voice_offset = voice; snd_opl3_note_on() 405 voice_offset = voice - MAX_OPL2_VOICES; snd_opl3_note_on() 409 /* kill voice on channel */ snd_opl3_note_on() 410 vp = &opl3->voices[voice]; snd_opl3_note_on() 417 vp2 = &opl3->voices[voice + 3]; snd_opl3_note_on() 476 /* Program the FM voice characteristics */ snd_opl3_note_on() 483 /* Set OPL3 AM_VIB register of requested voice/operator */ snd_opl3_note_on() 488 /* Set OPL3 KSL_LEVEL register of requested voice/operator */ snd_opl3_note_on() 493 /* Set OPL3 ATTACK_DECAY register of requested voice/operator */ snd_opl3_note_on() 498 /* Set OPL3 SUSTAIN_RELEASE register of requested voice/operator */ snd_opl3_note_on() 511 /* Set output voice connection */ snd_opl3_note_on() 523 /* Set output voice connection */ snd_opl3_note_on() 549 /* Set OPL3 FNUM_LOW register of requested voice */ snd_opl3_note_on() 553 opl3->voices[voice].keyon_reg = blocknum; snd_opl3_note_on() 559 snd_printk(KERN_DEBUG " --> trigger voice %i\n", voice); snd_opl3_note_on() 561 /* Set OPL3 KEYON_BLOCK register of requested voice */ snd_opl3_note_on() 567 opl3->voices[voice].note_off = jiffies + snd_opl3_note_on() 570 opl3->voices[voice].note_off_check = 1; snd_opl3_note_on() 572 opl3->voices[voice].note_off_check = 0; snd_opl3_note_on() 585 vp2 = &opl3->voices[voice + 3]; snd_opl3_note_on() 592 /* 4op killed by 2op, release bounded voice */ snd_opl3_note_on() 593 vp2 = &opl3->voices[voice + 3]; snd_opl3_note_on() 601 debug_alloc(opl3, "note on ", voice); snd_opl3_note_on() 622 static void snd_opl3_kill_voice(struct snd_opl3 *opl3, int voice) snd_opl3_kill_voice() argument 630 if (snd_BUG_ON(voice >= MAX_OPL3_VOICES)) snd_opl3_kill_voice() 633 vp = &opl3->voices[voice]; snd_opl3_kill_voice() 634 if (voice < MAX_OPL2_VOICES) { snd_opl3_kill_voice() 637 voice_offset = voice; snd_opl3_kill_voice() 641 voice_offset = voice - MAX_OPL2_VOICES; snd_opl3_kill_voice() 644 /* kill voice */ snd_opl3_kill_voice() 646 snd_printk(KERN_DEBUG " --> kill voice %i\n", voice); snd_opl3_kill_voice() 656 vp2 = &opl3->voices[voice + 3]; snd_opl3_kill_voice() 663 debug_alloc(opl3, "note off", voice); snd_opl3_kill_voice() 676 int voice; snd_opl3_note_off_unsafe() local 693 for (voice = 0; voice < opl3->max_voices; voice++) { snd_opl3_note_off_unsafe() 694 vp = &opl3->voices[voice]; snd_opl3_note_off_unsafe() 696 snd_opl3_kill_voice(opl3, voice); snd_opl3_note_off_unsafe() 702 voice = snd_opl3_oss_map[chan->number]; snd_opl3_note_off_unsafe() 703 snd_opl3_kill_voice(opl3, voice); snd_opl3_note_off_unsafe() 747 static void snd_opl3_update_pitch(struct snd_opl3 *opl3, int voice) snd_opl3_update_pitch() argument 757 if (snd_BUG_ON(voice >= MAX_OPL3_VOICES)) snd_opl3_update_pitch() 760 vp = &opl3->voices[voice]; snd_opl3_update_pitch() 764 if (voice < MAX_OPL2_VOICES) { snd_opl3_update_pitch() 767 voice_offset = voice; snd_opl3_update_pitch() 771 voice_offset = voice - MAX_OPL2_VOICES; snd_opl3_update_pitch() 776 /* Set OPL3 FNUM_LOW register of requested voice */ snd_opl3_update_pitch() 785 /* Set OPL3 KEYON_BLOCK register of requested voice */ snd_opl3_update_pitch() 793 * Update voice pitch controller 797 int voice; snd_opl3_pitch_ctrl() local 805 for (voice = 0; voice < opl3->max_voices; voice++) { snd_opl3_pitch_ctrl() 806 vp = &opl3->voices[voice]; snd_opl3_pitch_ctrl() 808 snd_opl3_update_pitch(opl3, voice); snd_opl3_pitch_ctrl() 814 voice = snd_opl3_oss_map[chan->number]; snd_opl3_pitch_ctrl() 815 snd_opl3_update_pitch(opl3, voice); snd_opl3_pitch_ctrl()
|
H A D | opl3_synth.c | 37 * with another voice to a 4 OP voice. For example voice 0 38 * can be connected with voice 3. The operators of voice 3 are 39 * used as operators 3 and 4 of the new 4 OP voice. 40 * In this case the 2 OP voice number 0 is the 'first half' and 41 * voice 3 is the second. 73 static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice); 136 struct snd_dm_fm_voice voice; snd_opl3_ioctl() local 137 if (copy_from_user(&voice, argp, sizeof(struct snd_dm_fm_voice))) snd_opl3_ioctl() 139 return snd_opl3_set_voice(opl3, &voice); snd_opl3_ioctl() 371 /* Get register array side and offset of voice */ snd_opl3_reset() 410 if (note->voice >= ((opl3->fm_mode == SNDRV_DM_FM_MODE_OPL3) ? snd_opl3_play_note() 414 /* Get register array side and offset of voice */ snd_opl3_play_note() 415 if (note->voice < MAX_OPL2_VOICES) { snd_opl3_play_note() 418 voice_offset = note->voice; snd_opl3_play_note() 422 voice_offset = note->voice - MAX_OPL2_VOICES; snd_opl3_play_note() 439 /* Set OPL3 KEYON_BLOCK register of requested voice */ snd_opl3_play_note() 447 static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice) snd_opl3_set_voice() argument 457 if (voice->op > 1) snd_opl3_set_voice() 461 if (voice->voice >= ((opl3->fm_mode == SNDRV_DM_FM_MODE_OPL3) ? snd_opl3_set_voice() 465 /* Get register array side and offset of voice */ snd_opl3_set_voice() 466 if (voice->voice < MAX_OPL2_VOICES) { snd_opl3_set_voice() 469 voice_offset = voice->voice; snd_opl3_set_voice() 473 voice_offset = voice->voice - MAX_OPL2_VOICES; snd_opl3_set_voice() 476 op_offset = snd_opl3_regmap[voice_offset][voice->op]; snd_opl3_set_voice() 480 if (voice->am) snd_opl3_set_voice() 483 if (voice->vibrato) snd_opl3_set_voice() 486 if (voice->do_sustain) snd_opl3_set_voice() 489 if (voice->kbd_scale) snd_opl3_set_voice() 492 reg_val |= voice->harmonic & OPL3_MULTIPLE_MASK; snd_opl3_set_voice() 494 /* Set OPL3 AM_VIB register of requested voice/operator */ snd_opl3_set_voice() 499 reg_val = (voice->scale_level << 6) & OPL3_KSL_MASK; snd_opl3_set_voice() 501 reg_val |= ~voice->volume & OPL3_TOTAL_LEVEL_MASK; snd_opl3_set_voice() 503 /* Set OPL3 KSL_LEVEL register of requested voice/operator */ snd_opl3_set_voice() 508 reg_val = (voice->attack << 4) & OPL3_ATTACK_MASK; snd_opl3_set_voice() 510 reg_val |= voice->decay & OPL3_DECAY_MASK; snd_opl3_set_voice() 512 /* Set OPL3 ATTACK_DECAY register of requested voice/operator */ snd_opl3_set_voice() 517 reg_val = (voice->sustain << 4) & OPL3_SUSTAIN_MASK; snd_opl3_set_voice() 519 reg_val |= voice->release & OPL3_RELEASE_MASK; snd_opl3_set_voice() 521 /* Set OPL3 SUSTAIN_RELEASE register of requested voice/operator */ snd_opl3_set_voice() 526 reg_val = (voice->feedback << 1) & OPL3_FEEDBACK_MASK; snd_opl3_set_voice() 528 if (voice->connection) snd_opl3_set_voice() 532 if (voice->left) snd_opl3_set_voice() 534 if (voice->right) snd_opl3_set_voice() 537 /* Feedback/connection bits are applicable to voice */ snd_opl3_set_voice() 542 reg_val = voice->waveform & OPL3_WAVE_SELECT_MASK; snd_opl3_set_voice()
|
H A D | opl3_drums.c | 49 int voice; member in struct:snd_opl3_drum_voice 60 int voice; member in struct:snd_opl3_drum_note 81 * set drum voice characteristics 86 unsigned char op_offset = snd_opl3_regmap[data->voice][data->op]; snd_opl3_drum_voice_set() 87 unsigned char voice_offset = data->voice; snd_opl3_drum_voice_set() 116 * Set drum voice pitch 121 unsigned char voice_offset = data->voice; snd_opl3_drum_note_set() 134 * Set drum voice volume and position 140 unsigned char op_offset = snd_opl3_regmap[data->voice][data->op]; snd_opl3_drum_vol_set() 141 unsigned char voice_offset = data->voice; snd_opl3_drum_vol_set() 152 /* Set output voice connection */ snd_opl3_drum_vol_set() 183 * Switch drum voice on or off
|
/linux-4.4.14/sound/pci/emu10k1/ |
H A D | voice.c | 5 * Routines for control of EMU10K1 chips - voice manager 7 * Rewrote voice allocator for multichannel support - rlrevell 12/2004 36 /* Previously the voice allocator started at 0 every time. The new voice 37 * allocator uses a round robin scheme. The next free voice is tracked in 40 * boundary. For multichannel voice allocation we ensure than the block of 41 * voices does not cross the 32 voice boundary. This simplifies the 51 struct snd_emu10k1_voice *voice; voice_alloc() local 71 voice = &emu->voices[(i+k) % NUM_G]; voice_alloc() 72 if (voice->use) { voice_alloc() 78 /* dev_dbg(emu->card->dev, "allocated voice %d\n", i); */ voice_alloc() 90 voice = &emu->voices[(first_voice + i) % NUM_G]; voice_alloc() 92 dev_dbg(emu->card->dev, "voice alloc - %i, %i of %i\n", voice_alloc() 93 voice->number, idx-first_voice+1, number); voice_alloc() 95 voice->use = 1; voice_alloc() 98 voice->pcm = 1; voice_alloc() 101 voice->synth = 1; voice_alloc() 104 voice->midi = 1; voice_alloc() 107 voice->efx = 1; voice_alloc() 132 /* free a voice from synth */ snd_emu10k1_voice_alloc()
|
H A D | irq.c | 61 int voice; snd_emu10k1_interrupt() local 67 for (voice = 0; voice <= voice_max; voice++) { snd_emu10k1_interrupt() 68 if (voice == 0x20) snd_emu10k1_interrupt() 73 snd_emu10k1_voice_intr_ack(emu, voice); snd_emu10k1_interrupt() 75 snd_emu10k1_voice_intr_disable(emu, voice); snd_emu10k1_interrupt() 82 for (voice = 0; voice <= voice_max; voice++) { snd_emu10k1_interrupt() 83 if (voice == 0x20) snd_emu10k1_interrupt() 88 snd_emu10k1_voice_half_loop_intr_ack(emu, voice); snd_emu10k1_interrupt() 90 snd_emu10k1_voice_half_loop_intr_disable(emu, voice); snd_emu10k1_interrupt()
|
H A D | Makefile | 7 irq.o memory.o voice.o emumpu401.o emupcm.o io.o \
|
H A D | emupcm.c | 38 struct snd_emu10k1_voice *voice) snd_emu10k1_pcm_interrupt() 42 if ((epcm = voice->epcm) == NULL) snd_emu10k1_pcm_interrupt() 292 int voice, stereo, w_16; snd_emu10k1_pcm_init_voice() local 299 voice = evoice->number; snd_emu10k1_pcm_init_voice() 324 /* mono, left, right (master voice = left) */ snd_emu10k1_pcm_init_voice() 339 snd_emu10k1_ptr_write(emu, CPF, voice, CPF_STEREO_MASK); snd_emu10k1_pcm_init_voice() 340 snd_emu10k1_ptr_write(emu, CPF, (voice + 1), CPF_STEREO_MASK); snd_emu10k1_pcm_init_voice() 342 snd_emu10k1_ptr_write(emu, CPF, voice, 0); snd_emu10k1_pcm_init_voice() 348 snd_emu10k1_ptr_write(emu, A_FXRT1, voice, snd_emu10k1_pcm_init_voice() 350 snd_emu10k1_ptr_write(emu, A_FXRT2, voice, snd_emu10k1_pcm_init_voice() 352 snd_emu10k1_ptr_write(emu, A_SENDAMOUNTS, voice, snd_emu10k1_pcm_init_voice() 358 snd_emu10k1_ptr_write(emu, FXRT, voice, snd_emu10k1_pcm_init_voice() 362 snd_emu10k1_ptr_write(emu, PTRX, voice, (send_amount[0] << 8) | send_amount[1]); snd_emu10k1_pcm_init_voice() 363 snd_emu10k1_ptr_write(emu, DSL, voice, end_addr | (send_amount[3] << 24)); snd_emu10k1_pcm_init_voice() 364 snd_emu10k1_ptr_write(emu, PSST, voice, snd_emu10k1_pcm_init_voice() 372 snd_emu10k1_ptr_write(emu, CCCA, voice, start_addr | snd_emu10k1_pcm_init_voice() 376 snd_emu10k1_ptr_write(emu, CCCA, voice, (start_addr + ccis) | snd_emu10k1_pcm_init_voice() 380 snd_emu10k1_ptr_write(emu, Z1, voice, 0); snd_emu10k1_pcm_init_voice() 381 snd_emu10k1_ptr_write(emu, Z2, voice, 0); snd_emu10k1_pcm_init_voice() 384 snd_emu10k1_ptr_write(emu, MAPA, voice, silent_page); snd_emu10k1_pcm_init_voice() 385 snd_emu10k1_ptr_write(emu, MAPB, voice, silent_page); snd_emu10k1_pcm_init_voice() 387 snd_emu10k1_ptr_write(emu, CVCF, voice, 0xffff); snd_emu10k1_pcm_init_voice() 388 snd_emu10k1_ptr_write(emu, VTFT, voice, 0xffff); snd_emu10k1_pcm_init_voice() 389 snd_emu10k1_ptr_write(emu, ATKHLDM, voice, 0); snd_emu10k1_pcm_init_voice() 390 snd_emu10k1_ptr_write(emu, DCYSUSM, voice, 0x007f); snd_emu10k1_pcm_init_voice() 391 snd_emu10k1_ptr_write(emu, LFOVAL1, voice, 0x8000); snd_emu10k1_pcm_init_voice() 392 snd_emu10k1_ptr_write(emu, LFOVAL2, voice, 0x8000); snd_emu10k1_pcm_init_voice() 393 snd_emu10k1_ptr_write(emu, FMMOD, voice, 0); snd_emu10k1_pcm_init_voice() 394 snd_emu10k1_ptr_write(emu, TREMFRQ, voice, 0); snd_emu10k1_pcm_init_voice() 395 snd_emu10k1_ptr_write(emu, FM2FRQ2, voice, 0); snd_emu10k1_pcm_init_voice() 396 snd_emu10k1_ptr_write(emu, ENVVAL, voice, 0x8000); snd_emu10k1_pcm_init_voice() 398 snd_emu10k1_ptr_write(emu, ATKHLDV, voice, 0x7f7f); snd_emu10k1_pcm_init_voice() 399 snd_emu10k1_ptr_write(emu, ENVVOL, voice, 0x0000); snd_emu10k1_pcm_init_voice() 401 snd_emu10k1_ptr_write(emu, PEFE_FILTERAMOUNT, voice, 0x7f); snd_emu10k1_pcm_init_voice() 403 snd_emu10k1_ptr_write(emu, PEFE_PITCHAMOUNT, voice, 0); snd_emu10k1_pcm_init_voice() 543 /* only difference with the master voice is we use it for the pointer */ snd_emu10k1_efx_playback_prepare() 640 unsigned int voice, stereo, i, ccis, cra = 64, cs, sample; snd_emu10k1_playback_invalidate_cache() local 645 voice = evoice->number; snd_emu10k1_playback_invalidate_cache() 653 snd_emu10k1_ptr_write(emu, CD0 + i, voice, sample); snd_emu10k1_playback_invalidate_cache() 655 snd_emu10k1_ptr_write(emu, CD0 + i, voice + 1, sample); snd_emu10k1_playback_invalidate_cache() 659 snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice, 0); snd_emu10k1_playback_invalidate_cache() 660 snd_emu10k1_ptr_write(emu, CCR_READADDRESS, voice, cra); snd_emu10k1_playback_invalidate_cache() 662 snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice + 1, 0); snd_emu10k1_playback_invalidate_cache() 663 snd_emu10k1_ptr_write(emu, CCR_READADDRESS, voice + 1, cra); snd_emu10k1_playback_invalidate_cache() 666 snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice, ccis); snd_emu10k1_playback_invalidate_cache() 668 snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice+1, ccis); snd_emu10k1_playback_invalidate_cache() 679 unsigned int voice, tmp; snd_emu10k1_playback_prepare_voice() local 681 if (evoice == NULL) /* skip second voice for mono */ snd_emu10k1_playback_prepare_voice() 685 voice = evoice->number; snd_emu10k1_playback_prepare_voice() 690 snd_emu10k1_ptr_write(emu, IFATN, voice, attn); snd_emu10k1_playback_prepare_voice() 691 snd_emu10k1_ptr_write(emu, VTFT, voice, vattn | 0xffff); snd_emu10k1_playback_prepare_voice() 692 snd_emu10k1_ptr_write(emu, CVCF, voice, vattn | 0xffff); snd_emu10k1_playback_prepare_voice() 693 snd_emu10k1_ptr_write(emu, DCYSUSV, voice, 0x7f7f); snd_emu10k1_playback_prepare_voice() 694 snd_emu10k1_voice_clear_loop_stop(emu, voice); snd_emu10k1_playback_prepare_voice() 701 unsigned int voice, pitch, pitch_target; snd_emu10k1_playback_trigger_voice() local 703 if (evoice == NULL) /* skip second voice for mono */ snd_emu10k1_playback_trigger_voice() 707 voice = evoice->number; snd_emu10k1_playback_trigger_voice() 714 snd_emu10k1_ptr_write(emu, PTRX_PITCHTARGET, voice, pitch_target); snd_emu10k1_playback_trigger_voice() 716 snd_emu10k1_ptr_write(emu, CPF_CURRENTPITCH, voice, pitch_target); snd_emu10k1_playback_trigger_voice() 717 snd_emu10k1_ptr_write(emu, IP, voice, pitch); snd_emu10k1_playback_trigger_voice() 719 snd_emu10k1_voice_intr_enable(emu, voice); snd_emu10k1_playback_trigger_voice() 724 unsigned int voice; snd_emu10k1_playback_stop_voice() local 728 voice = evoice->number; snd_emu10k1_playback_stop_voice() 729 snd_emu10k1_voice_intr_disable(emu, voice); snd_emu10k1_playback_stop_voice() 730 snd_emu10k1_ptr_write(emu, PTRX_PITCHTARGET, voice, 0); snd_emu10k1_playback_stop_voice() 731 snd_emu10k1_ptr_write(emu, CPF_CURRENTPITCH, voice, 0); snd_emu10k1_playback_stop_voice() 732 snd_emu10k1_ptr_write(emu, IFATN, voice, 0xffff); snd_emu10k1_playback_stop_voice() 733 snd_emu10k1_ptr_write(emu, VTFT, voice, 0xffff); snd_emu10k1_playback_stop_voice() 734 snd_emu10k1_ptr_write(emu, CVCF, voice, 0xffff); snd_emu10k1_playback_stop_voice() 735 snd_emu10k1_ptr_write(emu, IP, voice, 0); snd_emu10k1_playback_stop_voice() 746 source voice */ snd_emu10k1_playback_mangle_extra() 1834 * each bit = corresponding voice snd_emu10k1_pcm_efx() 37 snd_emu10k1_pcm_interrupt(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *voice) snd_emu10k1_pcm_interrupt() argument
|
H A D | emu10k1_callback.c | 25 /* voice status */ 33 int voice; member in struct:best_voice 85 * get more voice for pcm 87 * terminate most inactive voice and give it as a pcm voice. 103 if (best[i].voice >= 0) { snd_emu10k1_synth_get_voice() 105 vp = &emu->voices[best[i].voice]; snd_emu10k1_synth_get_voice() 126 * turn off the voice (not terminated) 143 * terminate the voice 163 * release the voice to system 217 * look up voice table - get the best voice in order of preference 230 best[i].voice = -1; lookup_voices() 276 bp->voice = i; lookup_voices() 282 * get an empty voice 298 if (best[i].voice >= 0) { get_voice() 299 vp = &emu->voices[best[i].voice]; get_voice() 301 /* allocate a voice */ get_voice() 378 for triggerg the voice */ start_voice() 500 /* trigger voice */ trigger_voice()
|
H A D | emu10k1x.c | 209 struct emu10k1x_voice *voice; member in struct:emu10k1x_pcm 363 static void snd_emu10k1x_pcm_interrupt(struct emu10k1x *emu, struct emu10k1x_voice *voice) snd_emu10k1x_pcm_interrupt() argument 367 if ((epcm = voice->epcm) == NULL) snd_emu10k1x_pcm_interrupt() 422 if (! epcm->voice) { snd_emu10k1x_pcm_hw_params() 423 epcm->voice = &epcm->emu->voices[substream->pcm->device]; snd_emu10k1x_pcm_hw_params() 424 epcm->voice->use = 1; snd_emu10k1x_pcm_hw_params() 425 epcm->voice->epcm = epcm; snd_emu10k1x_pcm_hw_params() 443 if (epcm->voice) { snd_emu10k1x_pcm_hw_free() 444 epcm->voice->use = 0; snd_emu10k1x_pcm_hw_free() 445 epcm->voice->epcm = NULL; snd_emu10k1x_pcm_hw_free() 446 epcm->voice = NULL; snd_emu10k1x_pcm_hw_free() 458 int voice = epcm->voice->number; snd_emu10k1x_pcm_prepare() local 459 u32 *table_base = (u32 *)(emu->dma_buffer.area+1024*voice); snd_emu10k1x_pcm_prepare() 468 snd_emu10k1x_ptr_write(emu, PLAYBACK_LIST_ADDR, voice, emu->dma_buffer.addr+1024*voice); snd_emu10k1x_pcm_prepare() 469 snd_emu10k1x_ptr_write(emu, PLAYBACK_LIST_SIZE, voice, (runtime->periods - 1) << 19); snd_emu10k1x_pcm_prepare() 470 snd_emu10k1x_ptr_write(emu, PLAYBACK_LIST_PTR, voice, 0); snd_emu10k1x_pcm_prepare() 471 snd_emu10k1x_ptr_write(emu, PLAYBACK_POINTER, voice, 0); snd_emu10k1x_pcm_prepare() 472 snd_emu10k1x_ptr_write(emu, PLAYBACK_UNKNOWN1, voice, 0); snd_emu10k1x_pcm_prepare() 473 snd_emu10k1x_ptr_write(emu, PLAYBACK_UNKNOWN2, voice, 0); snd_emu10k1x_pcm_prepare() 474 snd_emu10k1x_ptr_write(emu, PLAYBACK_DMA_ADDR, voice, runtime->dma_addr); snd_emu10k1x_pcm_prepare() 476 snd_emu10k1x_ptr_write(emu, PLAYBACK_PERIOD_SIZE, voice, frames_to_bytes(runtime, runtime->period_size)<<16); snd_emu10k1x_pcm_prepare() 488 int channel = epcm->voice->number; snd_emu10k1x_pcm_trigger() 525 int channel = epcm->voice->number; snd_emu10k1x_pcm_pointer() 603 if (! epcm->voice) { snd_emu10k1x_pcm_hw_params_capture() 606 epcm->voice = &epcm->emu->capture_voice; snd_emu10k1x_pcm_hw_params_capture() 607 epcm->voice->epcm = epcm; snd_emu10k1x_pcm_hw_params_capture() 608 epcm->voice->use = 1; snd_emu10k1x_pcm_hw_params_capture() 626 if (epcm->voice) { snd_emu10k1x_pcm_hw_free_capture() 627 epcm->voice->use = 0; snd_emu10k1x_pcm_hw_free_capture() 628 epcm->voice->epcm = NULL; snd_emu10k1x_pcm_hw_free_capture() 629 epcm->voice = NULL; snd_emu10k1x_pcm_hw_free_capture()
|
H A D | emuproc.c | 381 struct snd_emu10k1_voice *voice; snd_emu10k1_proc_voices_read() local 386 voice = &emu->voices[idx]; snd_emu10k1_proc_voices_read() 389 voice->use, snd_emu10k1_proc_voices_read() 390 voice->pcm, snd_emu10k1_proc_voices_read() 391 voice->efx, snd_emu10k1_proc_voices_read() 392 voice->synth, snd_emu10k1_proc_voices_read() 393 voice->midi); snd_emu10k1_proc_voices_read()
|
H A D | emumixer.c | 1201 static void update_emu10k1_fxrt(struct snd_emu10k1 *emu, int voice, unsigned char *route) update_emu10k1_fxrt() argument 1204 snd_emu10k1_ptr_write(emu, A_FXRT1, voice, update_emu10k1_fxrt() 1206 snd_emu10k1_ptr_write(emu, A_FXRT2, voice, update_emu10k1_fxrt() 1209 snd_emu10k1_ptr_write(emu, FXRT, voice, update_emu10k1_fxrt() 1214 static void update_emu10k1_send_volume(struct snd_emu10k1 *emu, int voice, unsigned char *volume) update_emu10k1_send_volume() argument 1216 snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_A, voice, volume[0]); update_emu10k1_send_volume() 1217 snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_B, voice, volume[1]); update_emu10k1_send_volume() 1218 snd_emu10k1_ptr_write(emu, PSST_FXSENDAMOUNT_C, voice, volume[2]); update_emu10k1_send_volume() 1219 snd_emu10k1_ptr_write(emu, DSL_FXSENDAMOUNT_D, voice, volume[3]); update_emu10k1_send_volume() 1225 snd_emu10k1_ptr_write(emu, A_SENDAMOUNTS, voice, val); update_emu10k1_send_volume() 1248 int voice, idx; snd_emu10k1_send_routing_get() local 1253 for (voice = 0; voice < 3; voice++) snd_emu10k1_send_routing_get() 1255 ucontrol->value.integer.value[(voice * num_efx) + idx] = snd_emu10k1_send_routing_get() 1256 mix->send_routing[voice][idx] & mask; snd_emu10k1_send_routing_get() 1268 int change = 0, voice, idx, val; snd_emu10k1_send_routing_put() local 1273 for (voice = 0; voice < 3; voice++) snd_emu10k1_send_routing_put() 1275 val = ucontrol->value.integer.value[(voice * num_efx) + idx] & mask; snd_emu10k1_send_routing_put() 1276 if (mix->send_routing[voice][idx] != val) { snd_emu10k1_send_routing_put() 1277 mix->send_routing[voice][idx] = val; snd_emu10k1_send_routing_put()
|
H A D | io.c | 330 /* voice interrupt */ snd_emu10k1_voice_intr_enable() 350 /* voice interrupt */ snd_emu10k1_voice_intr_disable() 369 /* voice interrupt */ snd_emu10k1_voice_intr_ack() 387 /* voice interrupt */ snd_emu10k1_voice_half_loop_intr_enable() 407 /* voice interrupt */ snd_emu10k1_voice_half_loop_intr_disable() 426 /* voice interrupt */ snd_emu10k1_voice_half_loop_intr_ack() 444 /* voice interrupt */ snd_emu10k1_voice_set_loop_stop() 464 /* voice interrupt */ snd_emu10k1_voice_clear_loop_stop()
|
H A D | emu10k1_patch.c | 64 /* some samples have invalid data. the addresses are corrected in voice info */ snd_emu10k1_sample_new()
|
H A D | emu10k1_main.c | 2041 /* set up voice indices */ snd_emu10k1_create()
|
/linux-4.4.14/sound/pci/ |
H A D | sis7019.c | 81 struct voice { struct 95 struct voice *timing; 129 /* voice_lock protects allocation/freeing of the voice descriptions 133 struct voice voices[64]; 134 struct voice capture_voice; 204 static void sis_update_sso(struct voice *voice, u16 period) sis_update_sso() argument 206 void __iomem *base = voice->ctrl_base; sis_update_sso() 208 voice->sso += period; sis_update_sso() 209 if (voice->sso >= voice->buffer_size) sis_update_sso() 210 voice->sso -= voice->buffer_size; sis_update_sso() 213 if (voice->sso < 8) sis_update_sso() 214 voice->sso = 8; sis_update_sso() 217 writew(voice->sso & 0xffff, base + SIS_PLAY_DMA_SSO_ESO + 2); sis_update_sso() 220 static void sis_update_voice(struct voice *voice) sis_update_voice() argument 222 if (voice->flags & VOICE_SSO_TIMING) { sis_update_voice() 223 sis_update_sso(voice, voice->period_size); sis_update_voice() 224 } else if (voice->flags & VOICE_SYNC_TIMING) { sis_update_voice() 230 if (voice->vperiod > voice->period_size) { sis_update_voice() 231 voice->vperiod -= voice->period_size; sis_update_voice() 232 if (voice->vperiod < voice->period_size) sis_update_voice() 233 sis_update_sso(voice, voice->vperiod); sis_update_voice() 235 sis_update_sso(voice, voice->period_size); sis_update_voice() 244 sync = voice->sync_cso; sis_update_voice() 245 sync -= readw(voice->sync_base + SIS_CAPTURE_DMA_FORMAT_CSO); sis_update_voice() 246 if (sync > (voice->sync_buffer_size / 2)) sis_update_voice() 247 sync -= voice->sync_buffer_size; sis_update_voice() 257 sis_update_sso(voice, sync); sis_update_voice() 277 voice->vperiod = voice->sync_period_size + 1; sis_update_voice() 279 voice->vperiod = voice->sync_period_size + sync + 10; sis_update_voice() 281 if (voice->vperiod < voice->buffer_size) { sis_update_voice() 282 sis_update_sso(voice, voice->vperiod); sis_update_voice() 283 voice->vperiod = 0; sis_update_voice() 285 sis_update_sso(voice, voice->period_size); sis_update_voice() 287 sync = voice->sync_cso + voice->sync_period_size; sis_update_voice() 288 if (sync >= voice->sync_buffer_size) sis_update_voice() 289 sync -= voice->sync_buffer_size; sis_update_voice() 290 voice->sync_cso = sync; sis_update_voice() 293 snd_pcm_period_elapsed(voice->substream); sis_update_voice() 296 static void sis_voice_irq(u32 status, struct voice *voice) sis_voice_irq() argument 303 voice += bit; sis_voice_irq() 304 sis_update_voice(voice); sis_voice_irq() 305 voice++; sis_voice_irq() 313 struct voice *voice; sis_interrupt() local 343 voice = &sis->capture_voice; sis_interrupt() 344 if (!voice->timing) sis_interrupt() 345 snd_pcm_period_elapsed(voice->substream); sis_interrupt() 401 static void sis_free_voice(struct sis7019 *sis, struct voice *voice) sis_free_voice() argument 406 if (voice->timing) { sis_free_voice() 408 voice->timing->flags &= ~(VOICE_IN_USE | VOICE_SSO_TIMING | sis_free_voice() 410 voice->timing = NULL; sis_free_voice() 412 voice->flags &= ~(VOICE_IN_USE | VOICE_SSO_TIMING | VOICE_SYNC_TIMING); sis_free_voice() 416 static struct voice *__sis_alloc_playback_voice(struct sis7019 *sis) __sis_alloc_playback_voice() 419 struct voice *voice; __sis_alloc_playback_voice() local 423 voice = &sis->voices[i]; __sis_alloc_playback_voice() 424 if (voice->flags & VOICE_IN_USE) __sis_alloc_playback_voice() 426 voice->flags |= VOICE_IN_USE; __sis_alloc_playback_voice() 429 voice = NULL; __sis_alloc_playback_voice() 432 return voice; __sis_alloc_playback_voice() 435 static struct voice *sis_alloc_playback_voice(struct sis7019 *sis) sis_alloc_playback_voice() 437 struct voice *voice; sis_alloc_playback_voice() local 441 voice = __sis_alloc_playback_voice(sis); sis_alloc_playback_voice() 444 return voice; sis_alloc_playback_voice() 452 struct voice *voice = runtime->private_data; sis_alloc_timing_voice() local 458 * timing voice, as we can use the capture channel's interrupts sis_alloc_timing_voice() 466 if (needed && !voice->timing) { sis_alloc_timing_voice() 468 voice->timing = __sis_alloc_playback_voice(sis); sis_alloc_timing_voice() 469 if (voice->timing) sis_alloc_timing_voice() 472 if (!voice->timing) sis_alloc_timing_voice() 474 voice->timing->substream = substream; sis_alloc_timing_voice() 475 } else if (!needed && voice->timing) { sis_alloc_timing_voice() 476 sis_free_voice(sis, voice); sis_alloc_timing_voice() 477 voice->timing = NULL; sis_alloc_timing_voice() 487 struct voice *voice; sis_playback_open() local 489 voice = sis_alloc_playback_voice(sis); sis_playback_open() 490 if (!voice) sis_playback_open() 493 voice->substream = substream; sis_playback_open() 494 runtime->private_data = voice; sis_playback_open() 508 struct voice *voice = runtime->private_data; sis_substream_close() local 510 sis_free_voice(sis, voice); sis_substream_close() 529 struct voice *voice = runtime->private_data; sis_pcm_playback_prepare() local 530 void __iomem *ctrl_base = voice->ctrl_base; sis_pcm_playback_prepare() 531 void __iomem *wave_base = voice->wave_base; sis_pcm_playback_prepare() 557 voice->flags |= VOICE_SSO_TIMING; sis_pcm_playback_prepare() 558 voice->sso = runtime->period_size - 1; sis_pcm_playback_prepare() 559 voice->period_size = runtime->period_size; sis_pcm_playback_prepare() 560 voice->buffer_size = runtime->buffer_size; sis_pcm_playback_prepare() 597 struct voice *voice; sis_pcm_trigger() local 628 voice = s->runtime->private_data; snd_pcm_group_for_each_entry() 629 if (voice->flags & VOICE_CAPTURE) { snd_pcm_group_for_each_entry() 630 record |= 1 << voice->num; snd_pcm_group_for_each_entry() 631 voice = voice->timing; snd_pcm_group_for_each_entry() 634 /* voice could be NULL if this a recording stream, and it snd_pcm_group_for_each_entry() 637 if (voice) snd_pcm_group_for_each_entry() 638 play[voice->num / 32] |= 1 << (voice->num & 0x1f); snd_pcm_group_for_each_entry() 664 struct voice *voice = runtime->private_data; sis_pcm_pointer() local 667 cso = readl(voice->ctrl_base + SIS_PLAY_DMA_FORMAT_CSO); sis_pcm_pointer() 676 struct voice *voice = &sis->capture_voice; sis_capture_open() local 683 if (voice->flags & VOICE_IN_USE) sis_capture_open() 684 voice = NULL; sis_capture_open() 686 voice->flags |= VOICE_IN_USE; sis_capture_open() 689 if (!voice) sis_capture_open() 692 voice->substream = substream; sis_capture_open() 693 runtime->private_data = voice; sis_capture_open() 727 static void sis_prepare_timing_voice(struct voice *voice, sis_prepare_timing_voice() argument 732 struct voice *timing = voice->timing; sis_prepare_timing_voice() 786 timing->sync_base = voice->ctrl_base; sis_prepare_timing_voice() 833 struct voice *voice = runtime->private_data; sis_pcm_capture_prepare() local 834 void __iomem *rec_base = voice->ctrl_base; sis_pcm_capture_prepare() 854 * use a timing voice to clock out the periods. Otherwise, we can sis_pcm_capture_prepare() 857 if (voice->timing) { sis_pcm_capture_prepare() 858 sis_prepare_timing_voice(voice, substream); sis_pcm_capture_prepare() 1317 struct voice *voice; sis_chip_create() local 1376 voice = &sis->voices[i]; sis_chip_create() 1377 voice->num = i; sis_chip_create() 1378 voice->ctrl_base = SIS_PLAY_DMA_ADDR(sis->ioaddr, i); sis_chip_create() 1379 voice->wave_base = SIS_WAVE_ADDR(sis->ioaddr, i); sis_chip_create() 1382 voice = &sis->capture_voice; sis_chip_create() 1383 voice->flags = VOICE_CAPTURE; sis_chip_create() 1384 voice->num = SIS_CAPTURE_CHAN_AC97_PCM_IN; sis_chip_create() 1385 voice->ctrl_base = SIS_CAPTURE_DMA_ADDR(sis->ioaddr, voice->num); sis_chip_create()
|
H A D | ens1370.c | 172 #define ES_CCB_INTRM (1<<10) /* CCB voice interrupts enable */ 202 #define ES_1371_VC(i) (((i)>>6)&0x03) /* voice code from CCB module */ 203 #define ES_1370_VC(i) (((i)>>5)&0x03) /* voice code from CCB module */
|
H A D | als4000.c | 65 * - power management? (card can do voice wakeup according to datasheet!!)
|
H A D | cmipci.c | 107 #define CM_VOICE_EN 0x00000008 /* legacy voice (SB16,FM) */
|
/linux-4.4.14/sound/isa/gus/ |
H A D | gus_reset.c | 56 static void snd_gf1_default_interrupt_handler_wave_and_volume(struct snd_gus_card * gus, struct snd_gus_voice * voice) snd_gf1_default_interrupt_handler_wave_and_volume() argument 83 struct snd_gus_voice *voice; snd_gf1_set_default_handlers() local 85 voice = &gus->gf1.voices[what & 0xffff]; snd_gf1_set_default_handlers() 86 voice->handler_wave = snd_gf1_set_default_handlers() 87 voice->handler_volume = snd_gf1_default_interrupt_handler_wave_and_volume; snd_gf1_set_default_handlers() 88 voice->handler_effect = NULL; snd_gf1_set_default_handlers() 89 voice->volume_change = NULL; snd_gf1_set_default_handlers() 129 void snd_gf1_smart_stop_voice(struct snd_gus_card * gus, unsigned short voice) snd_gf1_smart_stop_voice() argument 134 snd_gf1_select_voice(gus, voice); snd_gf1_smart_stop_voice() 136 printk(KERN_DEBUG " -%i- smart stop voice - volume = 0x%x\n", voice, snd_gf1_i_read16(gus, SNDRV_GF1_VW_VOLUME)); snd_gf1_smart_stop_voice() 143 void snd_gf1_stop_voice(struct snd_gus_card * gus, unsigned short voice) snd_gf1_stop_voice() argument 148 snd_gf1_select_voice(gus, voice); snd_gf1_stop_voice() 150 printk(KERN_DEBUG " -%i- stop voice - volume = 0x%x\n", voice, snd_gf1_i_read16(gus, SNDRV_GF1_VW_VOLUME)); snd_gf1_stop_voice() 158 snd_gf1_lfo_shutdown(gus, voice, ULTRA_LFO_VIBRATO); snd_gf1_stop_voice() 159 snd_gf1_lfo_shutdown(gus, voice, ULTRA_LFO_TREMOLO); snd_gf1_stop_voice() 178 snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_ADDRESS_CONTROL); /* Voice Control Register = voice stop */ snd_gf1_clear_voices() 181 snd_gf1_write8(gus, SNDRV_GF1_VB_MODE, gus->gf1.memory ? 0x02 : 0x82); /* Deactivate voice */ snd_gf1_clear_voices() 291 void snd_gf1_free_voice(struct snd_gus_card * gus, struct snd_gus_voice *voice) snd_gf1_free_voice() argument 294 void (*private_free)(struct snd_gus_voice *voice); snd_gf1_free_voice() 297 if (voice == NULL || !voice->use) snd_gf1_free_voice() 299 snd_gf1_set_default_handlers(gus, SNDRV_GF1_HANDLER_VOICE | voice->number); snd_gf1_free_voice() 300 snd_gf1_clear_voices(gus, voice->number, voice->number); snd_gf1_free_voice() 302 private_free = voice->private_free; snd_gf1_free_voice() 303 private_data = voice->private_data; snd_gf1_free_voice() 304 voice->private_free = NULL; snd_gf1_free_voice() 305 voice->private_data = NULL; snd_gf1_free_voice() 306 if (voice->pcm) snd_gf1_free_voice() 308 voice->use = voice->pcm = 0; snd_gf1_free_voice() 309 voice->sample_ops = NULL; snd_gf1_free_voice() 312 private_free(voice); snd_gf1_free_voice()
|
H A D | gus_irq.c | 57 unsigned char voice_status, voice; snd_gus_interrupt() local 62 voice = voice_status & 0x1f; snd_gus_interrupt() 63 _current_ = 1 << voice; snd_gus_interrupt() 68 printk(KERN_DEBUG "voice = %i, voice_status = 0x%x, " snd_gus_interrupt() 70 voice, voice_status, inb(GUSP(gus, GF1PAGE))); snd_gus_interrupt() 72 pvoice = &gus->gf1.voices[voice]; snd_gus_interrupt() 74 if (!(voice_status & 0x80)) { /* voice position IRQ */ snd_gus_interrupt() 131 snd_iprintf(buffer, "voice lost = %u\n", gus->gf1.interrupt_stat_voice_lost); snd_gus_irq_info_read() 134 snd_iprintf(buffer, "voice %i: wave = %u, volume = %u\n", snd_gus_irq_info_read()
|
H A D | gus_io.c | 448 int voice, ctrl; snd_gf1_print_voice_registers() local 450 voice = gus->gf1.active_voice; snd_gf1_print_voice_registers() 451 printk(KERN_INFO " -%i- GF1 voice ctrl, ramp ctrl = 0x%x, 0x%x\n", voice, ctrl = snd_gf1_i_read8(gus, 0), snd_gf1_i_read8(gus, 0x0d)); snd_gf1_print_voice_registers() 452 printk(KERN_INFO " -%i- GF1 frequency = 0x%x\n", voice, snd_gf1_i_read16(gus, 1)); snd_gf1_print_voice_registers() 453 printk(KERN_INFO " -%i- GF1 loop start, end = 0x%x (0x%x), 0x%x (0x%x)\n", voice, snd_gf1_i_read_addr(gus, 2, ctrl & 4), snd_gf1_i_read_addr(gus, 2, (ctrl & 4) ^ 4), snd_gf1_i_read_addr(gus, 4, ctrl & 4), snd_gf1_i_read_addr(gus, 4, (ctrl & 4) ^ 4)); snd_gf1_print_voice_registers() 454 printk(KERN_INFO " -%i- GF1 ramp start, end, rate = 0x%x, 0x%x, 0x%x\n", voice, snd_gf1_i_read8(gus, 7), snd_gf1_i_read8(gus, 8), snd_gf1_i_read8(gus, 6)); snd_gf1_print_voice_registers() 455 printk(KERN_INFO" -%i- GF1 volume = 0x%x\n", voice, snd_gf1_i_read16(gus, 9)); snd_gf1_print_voice_registers() 456 printk(KERN_INFO " -%i- GF1 position = 0x%x (0x%x)\n", voice, snd_gf1_i_read_addr(gus, 0x0a, ctrl & 4), snd_gf1_i_read_addr(gus, 0x0a, (ctrl & 4) ^ 4)); snd_gf1_print_voice_registers() 459 printk(KERN_INFO " -%i- GFA1 mode = 0x%x\n", voice, mode); snd_gf1_print_voice_registers() 461 printk(KERN_INFO " -%i- GFA1 effect address = 0x%x\n", voice, snd_gf1_i_read_addr(gus, 0x11, ctrl & 4)); snd_gf1_print_voice_registers() 462 printk(KERN_INFO " -%i- GFA1 effect volume = 0x%x\n", voice, snd_gf1_i_read16(gus, 0x16)); snd_gf1_print_voice_registers() 463 printk(KERN_INFO " -%i- GFA1 effect volume final = 0x%x\n", voice, snd_gf1_i_read16(gus, 0x1d)); snd_gf1_print_voice_registers() 464 printk(KERN_INFO " -%i- GFA1 effect acumulator = 0x%x\n", voice, snd_gf1_i_read8(gus, 0x14)); snd_gf1_print_voice_registers() 467 printk(KERN_INFO " -%i- GFA1 left offset = 0x%x (%i)\n", voice, snd_gf1_i_read16(gus, 0x13), snd_gf1_i_read16(gus, 0x13) >> 4); snd_gf1_print_voice_registers() 468 printk(KERN_INFO " -%i- GFA1 left offset final = 0x%x (%i)\n", voice, snd_gf1_i_read16(gus, 0x1c), snd_gf1_i_read16(gus, 0x1c) >> 4); snd_gf1_print_voice_registers() 469 printk(KERN_INFO " -%i- GFA1 right offset = 0x%x (%i)\n", voice, snd_gf1_i_read16(gus, 0x0c), snd_gf1_i_read16(gus, 0x0c) >> 4); snd_gf1_print_voice_registers() 470 printk(KERN_INFO " -%i- GFA1 right offset final = 0x%x (%i)\n", voice, snd_gf1_i_read16(gus, 0x1b), snd_gf1_i_read16(gus, 0x1b) >> 4); snd_gf1_print_voice_registers() 472 printk(KERN_INFO " -%i- GF1 pan = 0x%x\n", voice, snd_gf1_i_read8(gus, 0x0c)); snd_gf1_print_voice_registers() 474 printk(KERN_INFO " -%i- GF1 pan = 0x%x\n", voice, snd_gf1_i_read8(gus, 0x0c)); snd_gf1_print_voice_registers()
|
H A D | gus_pcm.c | 117 unsigned int voice; snd_gf1_pcm_trigger_up() local 136 for (voice = 0; voice < pcmp->voices; voice++) { snd_gf1_pcm_trigger_up() 137 begin = pcmp->memory + voice * (pcmp->dma_size / runtime->channels); snd_gf1_pcm_trigger_up() 146 pan = runtime->channels == 2 ? (!voice ? 1 : 14) : 8; snd_gf1_pcm_trigger_up() 147 vol = !voice ? gus->gf1.pcm_volume_level_left : gus->gf1.pcm_volume_level_right; snd_gf1_pcm_trigger_up() 149 snd_gf1_select_voice(gus, pcmp->pvoices[voice]->number); snd_gf1_pcm_trigger_up() 167 for (voice = 0; voice < pcmp->voices; voice++) { snd_gf1_pcm_trigger_up() 168 snd_gf1_select_voice(gus, pcmp->pvoices[voice]->number); snd_gf1_pcm_trigger_up() 170 snd_gf1_write8(gus, SNDRV_GF1_VB_MODE, 0x00); /* deactivate voice */ snd_gf1_pcm_trigger_up() 177 for (voice = 0; voice < pcmp->voices; voice++) { snd_gf1_pcm_trigger_up() 178 snd_gf1_select_voice(gus, pcmp->pvoices[voice]->number); snd_gf1_pcm_trigger_up() 180 voice_ctrl &= ~0x20; /* disable IRQ for next voice */ snd_gf1_pcm_trigger_up() 357 int voice, snd_gf1_pcm_playback_copy() 366 bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2)); snd_gf1_pcm_playback_copy() 389 int voice, snd_gf1_pcm_playback_silence() 397 bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2)); snd_gf1_pcm_playback_silence() 506 int voice; snd_gf1_pcm_playback_trigger() local 514 voice = pcmp->pvoices[0]->number; snd_gf1_pcm_playback_trigger() 515 snd_gf1_stop_voices(gus, voice, voice); snd_gf1_pcm_playback_trigger() 517 voice = pcmp->pvoices[1]->number; snd_gf1_pcm_playback_trigger() 518 snd_gf1_stop_voices(gus, voice, voice); snd_gf1_pcm_playback_trigger() 356 snd_gf1_pcm_playback_copy(struct snd_pcm_substream *substream, int voice, snd_pcm_uframes_t pos, void __user *src, snd_pcm_uframes_t count) snd_gf1_pcm_playback_copy() argument 388 snd_gf1_pcm_playback_silence(struct snd_pcm_substream *substream, int voice, snd_pcm_uframes_t pos, snd_pcm_uframes_t count) snd_gf1_pcm_playback_silence() argument
|
/linux-4.4.14/sound/drivers/opl4/ |
H A D | opl4_synth.c | 313 void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice)) snd_opl4_do_for_note() 317 struct opl4_voice *voice; snd_opl4_do_for_note() local 321 voice = &opl4->voices[i]; snd_opl4_do_for_note() 322 if (voice->chan == chan && voice->note == note) { snd_opl4_do_for_note() 323 func(opl4, voice); snd_opl4_do_for_note() 334 void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice)) snd_opl4_do_for_channel() 338 struct opl4_voice *voice; snd_opl4_do_for_channel() local 342 voice = &opl4->voices[i]; snd_opl4_do_for_channel() 343 if (voice->chan == chan) { snd_opl4_do_for_channel() 344 func(opl4, voice); snd_opl4_do_for_channel() 354 void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice)) snd_opl4_do_for_all() 358 struct opl4_voice *voice; snd_opl4_do_for_all() local 362 voice = &opl4->voices[i]; snd_opl4_do_for_all() 363 if (voice->chan) snd_opl4_do_for_all() 364 func(opl4, voice); snd_opl4_do_for_all() 369 static void snd_opl4_update_volume(struct snd_opl4 *opl4, struct opl4_voice *voice) snd_opl4_update_volume() argument 373 att = voice->sound->tone_attenuate; snd_opl4_update_volume() 375 att += snd_opl4_volume_table[voice->chan->gm_volume & 0x7f]; snd_opl4_update_volume() 376 att += snd_opl4_volume_table[voice->chan->gm_expression & 0x7f]; snd_opl4_update_volume() 377 att += snd_opl4_volume_table[voice->velocity]; snd_opl4_update_volume() 378 att = 0x7f - (0x7f - att) * (voice->sound->volume_factor) / 0xfe - volume_boost; snd_opl4_update_volume() 383 snd_opl4_write(opl4, OPL4_REG_LEVEL + voice->number, snd_opl4_update_volume() 384 (att << 1) | voice->level_direct); snd_opl4_update_volume() 385 voice->level_direct = 0; snd_opl4_update_volume() 388 static void snd_opl4_update_pan(struct snd_opl4 *opl4, struct opl4_voice *voice) snd_opl4_update_pan() argument 390 int pan = voice->sound->panpot; snd_opl4_update_pan() 392 if (!voice->chan->drum_channel) snd_opl4_update_pan() 393 pan += (voice->chan->control[MIDI_CTL_MSB_PAN] - 0x40) >> 3; snd_opl4_update_pan() 398 voice->reg_misc = (voice->reg_misc & ~OPL4_PAN_POT_MASK) snd_opl4_update_pan() 400 snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc); snd_opl4_update_pan() 404 struct opl4_voice *voice) snd_opl4_update_vibrato_depth() 408 if (voice->chan->drum_channel) snd_opl4_update_vibrato_depth() 410 depth = (7 - voice->sound->vibrato) snd_opl4_update_vibrato_depth() 411 * (voice->chan->control[MIDI_CTL_VIBRATO_DEPTH] & 0x7f); snd_opl4_update_vibrato_depth() 412 depth = (depth >> 7) + voice->sound->vibrato; snd_opl4_update_vibrato_depth() 413 voice->reg_lfo_vibrato &= ~OPL4_VIBRATO_DEPTH_MASK; snd_opl4_update_vibrato_depth() 414 voice->reg_lfo_vibrato |= depth & OPL4_VIBRATO_DEPTH_MASK; snd_opl4_update_vibrato_depth() 415 snd_opl4_write(opl4, OPL4_REG_LFO_VIBRATO + voice->number, snd_opl4_update_vibrato_depth() 416 voice->reg_lfo_vibrato); snd_opl4_update_vibrato_depth() 420 struct opl4_voice *voice) snd_opl4_update_pitch() 422 struct snd_midi_channel *chan = voice->chan; snd_opl4_update_pitch() 425 note = chan->drum_channel ? 60 : voice->note; snd_opl4_update_pitch() 430 pitch = ((note - 60) << 7) * voice->sound->key_scaling / 100 + (60 << 7); snd_opl4_update_pitch() 431 pitch += voice->sound->pitch_offset; snd_opl4_update_pitch() 443 snd_opl4_write(opl4, OPL4_REG_OCTAVE + voice->number, snd_opl4_update_pitch() 445 voice->reg_f_number = (voice->reg_f_number & OPL4_TONE_NUMBER_BIT8) snd_opl4_update_pitch() 447 snd_opl4_write(opl4, OPL4_REG_F_NUMBER + voice->number, voice->reg_f_number); snd_opl4_update_pitch() 451 struct opl4_voice *voice) snd_opl4_update_tone_parameters() 453 snd_opl4_write(opl4, OPL4_REG_ATTACK_DECAY1 + voice->number, snd_opl4_update_tone_parameters() 454 voice->sound->reg_attack_decay1); snd_opl4_update_tone_parameters() 455 snd_opl4_write(opl4, OPL4_REG_LEVEL_DECAY2 + voice->number, snd_opl4_update_tone_parameters() 456 voice->sound->reg_level_decay2); snd_opl4_update_tone_parameters() 457 snd_opl4_write(opl4, OPL4_REG_RELEASE_CORRECTION + voice->number, snd_opl4_update_tone_parameters() 458 voice->sound->reg_release_correction); snd_opl4_update_tone_parameters() 459 snd_opl4_write(opl4, OPL4_REG_TREMOLO + voice->number, snd_opl4_update_tone_parameters() 460 voice->sound->reg_tremolo); snd_opl4_update_tone_parameters() 463 /* allocate one voice */ snd_opl4_get_voice() 466 /* first, try to get the oldest key-off voice */ snd_opl4_get_voice() 469 /* then get the oldest key-on voice */ snd_opl4_get_voice() 486 struct opl4_voice *voice[2]; snd_opl4_note_on() local 491 /* determine the number of voices and voice parameters */ snd_opl4_note_on() 506 voice[i] = snd_opl4_get_voice(opl4); snd_opl4_note_on() 507 list_move_tail(&voice[i]->list, &opl4->on_voices); snd_opl4_note_on() 508 voice[i]->chan = chan; snd_opl4_note_on() 509 voice[i]->note = note; snd_opl4_note_on() 510 voice[i]->velocity = vel & 0x7f; snd_opl4_note_on() 511 voice[i]->sound = sound[i]; snd_opl4_note_on() 516 voice[i]->reg_f_number = snd_opl4_note_on() 518 snd_opl4_write(opl4, OPL4_REG_F_NUMBER + voice[i]->number, snd_opl4_note_on() 519 voice[i]->reg_f_number); snd_opl4_note_on() 520 snd_opl4_write(opl4, OPL4_REG_TONE_NUMBER + voice[i]->number, snd_opl4_note_on() 526 voice[i]->reg_misc = OPL4_LFO_RESET_BIT; snd_opl4_note_on() 527 snd_opl4_update_pan(opl4, voice[i]); snd_opl4_note_on() 528 snd_opl4_update_pitch(opl4, voice[i]); snd_opl4_note_on() 529 voice[i]->level_direct = OPL4_LEVEL_DIRECT_BIT; snd_opl4_note_on() 530 snd_opl4_update_volume(opl4, voice[i]); snd_opl4_note_on() 540 snd_opl4_update_tone_parameters(opl4, voice[i]); snd_opl4_note_on() 541 voice[i]->reg_lfo_vibrato = voice[i]->sound->reg_lfo_vibrato; snd_opl4_note_on() 542 snd_opl4_update_vibrato_depth(opl4, voice[i]); snd_opl4_note_on() 547 voice[i]->reg_misc = snd_opl4_note_on() 548 (voice[i]->reg_misc & 0x1f) | OPL4_KEY_ON_BIT; snd_opl4_note_on() 549 snd_opl4_write(opl4, OPL4_REG_MISC + voice[i]->number, snd_opl4_note_on() 550 voice[i]->reg_misc); snd_opl4_note_on() 555 static void snd_opl4_voice_off(struct snd_opl4 *opl4, struct opl4_voice *voice) snd_opl4_voice_off() argument 557 list_move_tail(&voice->list, &opl4->off_voices); snd_opl4_voice_off() 559 voice->reg_misc &= ~OPL4_KEY_ON_BIT; snd_opl4_voice_off() 560 snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc); snd_opl4_voice_off() 570 static void snd_opl4_terminate_voice(struct snd_opl4 *opl4, struct opl4_voice *voice) snd_opl4_terminate_voice() argument 572 list_move_tail(&voice->list, &opl4->off_voices); snd_opl4_terminate_voice() 574 voice->reg_misc = (voice->reg_misc & ~OPL4_KEY_ON_BIT) | OPL4_DAMP_BIT; snd_opl4_terminate_voice() 575 snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc); snd_opl4_terminate_voice() 614 * Each OPL4 voice has a bit called "Pseudo-Reverb", but snd_opl4_control() 312 snd_opl4_do_for_note(struct snd_opl4 *opl4, int note, struct snd_midi_channel *chan, void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice)) snd_opl4_do_for_note() argument 332 snd_opl4_do_for_channel(struct snd_opl4 *opl4, struct snd_midi_channel *chan, void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice)) snd_opl4_do_for_channel() argument 353 snd_opl4_do_for_all(struct snd_opl4 *opl4, void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice)) snd_opl4_do_for_all() argument 403 snd_opl4_update_vibrato_depth(struct snd_opl4 *opl4, struct opl4_voice *voice) snd_opl4_update_vibrato_depth() argument 419 snd_opl4_update_pitch(struct snd_opl4 *opl4, struct opl4_voice *voice) snd_opl4_update_pitch() argument 450 snd_opl4_update_tone_parameters(struct snd_opl4 *opl4, struct opl4_voice *voice) snd_opl4_update_tone_parameters() argument
|
H A D | opl4_local.h | 59 * register number just add the voice number to the bank offset.
|
/linux-4.4.14/sound/oss/ |
H A D | coproc.h | 11 #define COPR_PCM 0x0004 /* Digitized voice applications */
|
H A D | opl3.c | 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 */ enter_4op_mode() 268 static int opl3_kill_note (int devno, int voice, int note, int velocity) opl3_kill_note() argument 272 if (voice < 0 || voice >= devc->nr_voice) opl3_kill_note() 275 devc->v_alloc->map[voice] = 0; opl3_kill_note() 277 map = &pv_map[devc->lv_map[voice]]; opl3_kill_note() 282 opl3_command(map->ioaddr, KEYON_BLOCK + map->voice_num, devc->voc[voice].keyon_byte & ~0x20); opl3_kill_note() 283 devc->voc[voice].keyon_byte = 0; opl3_kill_note() 284 devc->voc[voice].bender = 0; opl3_kill_note() 285 devc->voc[voice].volume = 64; opl3_kill_note() 286 devc->voc[voice].panning = 0xffff; /* Not set */ opl3_kill_note() 287 devc->voc[voice].bender_range = 200; opl3_kill_note() 288 devc->voc[voice].orig_freq = 0; opl3_kill_note() 289 devc->voc[voice].current_freq = 0; opl3_kill_note() 290 devc->voc[voice].mode = 0; opl3_kill_note() 310 static int opl3_set_instr (int dev, int voice, int instr_no) opl3_set_instr() argument 312 if (voice < 0 || voice >= devc->nr_voice) opl3_set_instr() 317 devc->act_i[voice] = &devc->i_map[instr_no]; opl3_set_instr() 370 static void set_voice_volume(int voice, int volume, int main_vol) set_voice_volume() argument 376 if (voice < 0 || voice >= devc->nr_voice) set_voice_volume() 379 map = &pv_map[devc->lv_map[voice]]; set_voice_volume() 380 instr = devc->act_i[voice]; set_voice_volume() 388 if (devc->voc[voice].mode == 0) set_voice_volume() 391 if (devc->voc[voice].mode == 2) set_voice_volume() 409 * 4 OP voice set_voice_volume() 457 static int opl3_start_note (int dev, int voice, int note, int volume) opl3_start_note() argument 464 if (voice < 0 || voice >= devc->nr_voice) opl3_start_note() 467 map = &pv_map[devc->lv_map[voice]]; opl3_start_note() 468 pan = devc->voc[voice].panning; opl3_start_note() 477 set_voice_volume(voice, volume, devc->voc[voice].volume); opl3_start_note() 506 instr = devc->act_i[voice]; opl3_start_note() 513 printk(KERN_WARNING "opl3: Initializing voice %d with undefined instrument\n", voice); opl3_start_note() 599 * If the voice is a 4 OP one, initialize the operators 3 and 4 also opl3_start_note() 644 devc->voc[voice].mode = voice_mode; opl3_start_note() 645 set_voice_volume(voice, volume, devc->voc[voice].volume); opl3_start_note() 647 freq = devc->voc[voice].orig_freq = note_to_freq(note) / 1000; opl3_start_note() 654 freq = compute_finetune(devc->voc[voice].orig_freq, devc->voc[voice].bender, devc->voc[voice].bender_range, 0); opl3_start_note() 655 devc->voc[voice].current_freq = freq; opl3_start_note() 669 devc->voc[voice].keyon_byte = data; opl3_start_note() 845 static void opl3_panning(int dev, int voice, int value) opl3_panning() argument 848 if (voice < 0 || voice >= devc->nr_voice) opl3_panning() 851 devc->voc[voice].panning = value; opl3_panning() 864 static void opl3_aftertouch(int dev, int voice, int pressure) opl3_aftertouch() argument 870 if (voice < 0 || voice >= devc->nr_voice) opl3_aftertouch() 873 map = &pv_map[devc->lv_map[voice]]; opl3_aftertouch() 882 instr = devc->act_i[voice]; opl3_aftertouch() 887 if (devc->voc[voice].mode == 4) opl3_aftertouch() 931 static void bend_pitch(int dev, int voice, int value) bend_pitch() argument 937 map = &pv_map[devc->lv_map[voice]]; bend_pitch() 942 devc->voc[voice].bender = value; bend_pitch() 945 if (!(devc->voc[voice].keyon_byte & 0x20)) bend_pitch() 950 freq = compute_finetune(devc->voc[voice].orig_freq, devc->voc[voice].bender, devc->voc[voice].bender_range, 0); bend_pitch() 951 devc->voc[voice].current_freq = freq; bend_pitch() 961 devc->voc[voice].keyon_byte = data; bend_pitch() 965 static void opl3_controller (int dev, int voice, int ctrl_num, int value) opl3_controller() argument 967 if (voice < 0 || voice >= devc->nr_voice) opl3_controller() 973 bend_pitch(dev, voice, value); opl3_controller() 977 devc->voc[voice].bender_range = value; opl3_controller() 981 devc->voc[voice].volume = value / 128; opl3_controller() 985 devc->voc[voice].panning = (value * 2) - 128; opl3_controller() 990 static void opl3_bender(int dev, int voice, int value) opl3_bender() argument 992 if (voice < 0 || voice >= devc->nr_voice) opl3_bender() 995 bend_pitch(dev, voice, value - 8192); opl3_bender() 1034 * Now try to find a free voice opl3_alloc_voice() 1064 static void opl3_setup_voice(int dev, int voice, int chn) opl3_setup_voice() argument 1068 if (voice < 0 || voice >= devc->nr_voice) opl3_setup_voice() 1076 opl3_set_instr(dev, voice, info->pgm_num); opl3_setup_voice() 1078 devc->voc[voice].bender = 0; opl3_setup_voice() 1079 devc->voc[voice].bender_range = info->bender_range; opl3_setup_voice() 1080 devc->voc[voice].volume = info->controllers[CTL_MAIN_VOLUME]; opl3_setup_voice() 1081 devc->voc[voice].panning = (info->controllers[CTL_PAN] * 2) - 128; opl3_setup_voice()
|
H A D | opl3_hw.h | 22 * A 4 OP voice can be created by setting the corresponding 26 * first voice on the right side to the 4 OP mode. The fourth 27 * voice is made inaccessible. 29 * If a voice is set to the 2 OP mode, it works like 2 OP modes 30 * of the original YM3812 (AdLib). In addition the voice can 35 * register of the voice (0xC0-0xC8). In 4 OP voices these bits are 36 * in the second half of the voice. 122 * voice number to get the register number. 140 * is selected. These bits controls connecting the voice 142 * defined in the second half of the voice (add 3 to the 149 #define FEEDBACK_MASK 0x0e /* Valid just for 1st OP of a voice */ 206 * with another voice to a 4 OP voice. For example voice 0 207 * can be connected with voice 3. The operators of voice 3 are 208 * used as operators 3 and 4 of the new 4 OP voice. 209 * In this case the 2 OP voice number 0 is the 'first half' and 210 * voice 3 is the second.
|
H A D | dev_table.h | 268 int (*kill_note) (int dev, int voice, int note, int velocity); 269 int (*start_note) (int dev, int voice, int note, int velocity); 270 int (*set_instr) (int dev, int voice, int instr); 275 void (*aftertouch) (int dev, int voice, int pressure); 276 void (*controller) (int dev, int voice, int ctrl_num, int value); 277 void (*panning) (int dev, int voice, int value); 281 void (*setup_voice) (int dev, int voice, int chn);
|
H A D | sequencer.c | 430 int voice; alloc_voice() local 434 voice = synth_devs[dev]->alloc_voice(dev, chn, note, alloc_voice() 436 synth_devs[dev]->alloc.map[voice] = key; alloc_voice() 437 synth_devs[dev]->alloc.alloc_times[voice] = alloc_voice() 439 return voice; alloc_voice() 450 int voice = -1; seq_chn_voice_event() local 462 voice = find_voice(dev, chn, note); seq_chn_voice_event() 477 if (voice == -1 && seq_mode == SEQ_2 && synth_devs[dev]->alloc_voice) seq_chn_voice_event() 480 voice = alloc_voice(dev, chn, note); seq_chn_voice_event() 482 if (voice == -1) seq_chn_voice_event() 483 voice = chn; seq_chn_voice_event() 494 synth_devs[dev]->set_instr(dev, voice, 128 + note); seq_chn_voice_event() 497 synth_devs[dev]->setup_voice(dev, voice, chn); seq_chn_voice_event() 499 synth_devs[dev]->start_note(dev, voice, note, parm); seq_chn_voice_event() 503 if (voice == -1) seq_chn_voice_event() 504 voice = chn; seq_chn_voice_event() 505 synth_devs[dev]->kill_note(dev, voice, note, parm); seq_chn_voice_event() 509 if (voice == -1) seq_chn_voice_event() 510 voice = chn; seq_chn_voice_event() 511 synth_devs[dev]->aftertouch(dev, voice, parm); seq_chn_voice_event()
|
H A D | midi_synth.h | 16 void midi_synth_setup_voice (int dev, int voice, int chn);
|
H A D | midi_synth.c | 652 midi_synth_setup_voice(int dev, int voice, int channel) midi_synth_setup_voice() argument
|
H A D | dmabuf.c | 4 * The DMA buffer manager for digitized voice applications
|
H A D | swarm_cs4297a.c | 378 [SOUND_MIXER_PCM] = 1, // voice cs_printioctl() 1170 [SOUND_MIXER_PCM] = 1, // voice mixer_ioctl()
|
/linux-4.4.14/include/sound/ |
H A D | opl3.h | 21 * A 4 OP voice can be created by setting the corresponding 25 * first voice on the right side to the 4 OP mode. The fourth 26 * voice is made inaccessible. 28 * If a voice is set to the 2 OP mode, it works like 2 OP modes 29 * of the original YM3812 (AdLib). In addition the voice can 34 * register of the voice (0xC0-0xC8). In 4 OP voices these bits are 35 * in the second half of the voice. 149 * voice number to get the register number. 167 * is selected. These bits controls connecting the voice 169 * defined in the second half of the voice (add 3 to the 176 #define OPL3_FEEDBACK_MASK 0x0e /* Valid just for 1st OP of a voice */ 281 * A structure to keep track of each hardware voice 286 #define SNDRV_OPL3_ST_ON_2OP 1 /* 2op voice is allocated */ 287 #define SNDRV_OPL3_ST_ON_4OP 2 /* 4op voice is allocated */ 288 #define SNDRV_OPL3_ST_NOT_AVAIL -1 /* voice is not available */ 291 unsigned char note; /* Note currently assigned to this voice */ 326 #define SNDRV_OPL3_MODE_SEQ 1 /* ALSA - driver handles voice allocation */ 347 spinlock_t voice_lock; /* Lock for voice access */
|
H A D | gus.h | 90 /* voice specific registers */ 265 void (*handler_wave) (struct snd_gus_card * gus, struct snd_gus_voice * voice); 266 void (*handler_volume) (struct snd_gus_card * gus, struct snd_gus_voice * voice); 267 void (*handler_effect) (struct snd_gus_card * gus, struct snd_gus_voice * voice); 292 void (*private_free)(struct snd_gus_voice *voice); 328 unsigned char active_voice; /* selected voice (GF1PAGE register) */ 451 static inline void snd_gf1_select_voice(struct snd_gus_card * gus, int voice) snd_gf1_select_voice() argument 456 if (voice != gus->gf1.active_voice) { snd_gf1_select_voice() 457 gus->gf1.active_voice = voice; snd_gf1_select_voice() 458 outb(voice, GUSP(gus, GF1PAGE)); snd_gf1_select_voice() 532 extern irqreturn_t snd_gf1_lfo_effect_interrupt(struct snd_gus_card * gus, snd_gf1_voice_t * voice); 536 extern void snd_gf1_lfo_program(struct snd_gus_card * gus, int voice, int lfo_type, struct _SND_IW_LFO_PROGRAM *program); 537 extern void snd_gf1_lfo_enable(struct snd_gus_card * gus, int voice, int lfo_type); 538 extern void snd_gf1_lfo_disable(struct snd_gus_card * gus, int voice, int lfo_type); 539 extern void snd_gf1_lfo_change_freq(struct snd_gus_card * gus, int voice, int lfo_type, int freq); 540 extern void snd_gf1_lfo_change_depth(struct snd_gus_card * gus, int voice, int lfo_type, int depth); 541 extern void snd_gf1_lfo_setup(struct snd_gus_card * gus, int voice, int lfo_type, int freq, int current_depth, int depth, int sweep, int shape); 542 extern void snd_gf1_lfo_shutdown(struct snd_gus_card * gus, int voice, int lfo_type); 544 extern void snd_gf1_lfo_command(struct snd_gus_card * gus, int voice, unsigned char *command); 580 void snd_gf1_smart_stop_voice(struct snd_gus_card * gus, unsigned short voice); 581 void snd_gf1_stop_voice(struct snd_gus_card * gus, unsigned short voice); 584 void snd_gf1_free_voice(struct snd_gus_card * gus, struct snd_gus_voice *voice);
|
H A D | emux_synth.h | 115 spinlock_t voice_lock; /* Lock for voice access */ 164 * A structure to keep track of each hardware voice 179 unsigned char note; /* Note currently assigned to this voice */ 241 void snd_emux_lock_voice(struct snd_emux *emu, int voice); 242 void snd_emux_unlock_voice(struct snd_emux *emu, int voice);
|
H A D | emu10k1.h | 1830 void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int voice); 1886 /* voice allocation */
|
/linux-4.4.14/drivers/misc/echo/ |
H A D | oslec.h | 47 * oslec_create - Create a voice echo canceller context. 55 * oslec_free - Free a voice echo canceller context. 61 * oslec_flush - Flush (reinitialise) a voice echo canceller context. 67 * oslec_adaption_mode - set the adaption mode of a voice echo canceller context. 76 * oslec_update: Process a sample through a voice echo canceller.
|
H A D | echo.h | 32 Line echo cancellation for voice 37 electrical echoes (e.g. from 2-4 wire hybrids) from voice calls. 82 noise like, such as voice) the adaption works very well. If the adaption is
|
/linux-4.4.14/sound/synth/emux/ |
H A D | emux_oss.c | 338 int voice; emuspec_control() local 344 voice = event[3]; emuspec_control() 345 if (voice < 0 || voice >= port->chset.max_channels) emuspec_control() 348 chan = &port->chset.channels[voice]; emuspec_control() 376 fake_event(emu, port, voice, MIDI_CTL_ALL_NOTES_OFF, 0, atomic, hop); emuspec_control() 379 fake_event(emu, port, voice, MIDI_CTL_ALL_SOUNDS_OFF, 0, atomic, hop); emuspec_control() 433 int voice; gusspec_control() local 443 voice = event[3]; gusspec_control() 444 if (voice < 0 || voice >= port->chset.max_channels) gusspec_control() 447 chan = &port->chset.channels[voice]; gusspec_control()
|
H A D | emux_synth.c | 97 /* set up each voice parameter */ snd_emux_note_on() 98 /* at this stage, we don't trigger the voice yet. */ snd_emux_note_on() 145 /* clear voice position for the next note on this channel */ snd_emux_note_on() 375 * terminate note - if free flag is true, free the terminated voice 503 * terminate a voice 522 * Modulate the voice 556 * Sets up the voice structure by calculating some values that 751 * voice and channels parameters. 950 void snd_emux_lock_voice(struct snd_emux *emu, int voice) snd_emux_lock_voice() argument 955 if (emu->voices[voice].state == SNDRV_EMUX_ST_OFF) snd_emux_lock_voice() 956 emu->voices[voice].state = SNDRV_EMUX_ST_LOCKED; snd_emux_lock_voice() 959 "invalid voice for lock %d (state = %x)\n", snd_emux_lock_voice() 960 voice, emu->voices[voice].state); snd_emux_lock_voice() 968 void snd_emux_unlock_voice(struct snd_emux *emu, int voice) snd_emux_unlock_voice() argument 973 if (emu->voices[voice].state == SNDRV_EMUX_ST_LOCKED) snd_emux_unlock_voice() 974 emu->voices[voice].state = SNDRV_EMUX_ST_OFF; snd_emux_unlock_voice() 977 "invalid voice for unlock %d (state = %x)\n", snd_emux_unlock_voice() 978 voice, emu->voices[voice].state); snd_emux_unlock_voice()
|
H A D | emux_voice.h | 5 * A structure to keep track of each hardware voice
|
H A D | emux_proc.c | 65 snd_iprintf(buf, "voice 0: on\n"); snd_emux_proc_info_read()
|
H A D | emux_effect.c | 231 /* copy wavetable registers to voice table */
|
H A D | soundfont.c | 423 /* load voice map */ 547 printk(KERN_ERR "Soundfont error: Illegal voice number %d\n", load_info() 1009 /* set up voice info */ load_guspatch()
|
/linux-4.4.14/sound/isa/sb/ |
H A D | emu8000_pcm.c | 99 /* assign voice 31 and 32 to ROM */ emu8k_open_dram_for_pcm() 278 * set up the voice 301 for triggerg the voice */ setup_voice() 331 * trigger the voice 366 * stop the voice immediately 442 int voice, emu8k_pcm_copy() 451 if (voice == -1) { emu8k_pcm_copy() 463 return emu8k_transfer_block(emu, pos + rec->loop_start[voice], src, count); emu8k_pcm_copy() 480 int voice, emu8k_pcm_silence() 488 if (voice == -1 && rec->voices == 1) emu8k_pcm_silence() 489 voice = 0; emu8k_pcm_silence() 490 if (voice == -1) { emu8k_pcm_silence() 497 return emu8k_silence_block(emu, pos + rec->loop_start[voice], count); emu8k_pcm_silence() 508 int voice, emu8k_pcm_copy() 541 int voice, emu8k_pcm_silence() 441 emu8k_pcm_copy(struct snd_pcm_substream *subs, int voice, snd_pcm_uframes_t pos, void *src, snd_pcm_uframes_t count) emu8k_pcm_copy() argument 479 emu8k_pcm_silence(struct snd_pcm_substream *subs, int voice, snd_pcm_uframes_t pos, snd_pcm_uframes_t count) emu8k_pcm_silence() argument 507 emu8k_pcm_copy(struct snd_pcm_substream *subs, int voice, snd_pcm_uframes_t pos, void __user *src, snd_pcm_uframes_t count) emu8k_pcm_copy() argument 540 emu8k_pcm_silence(struct snd_pcm_substream *subs, int voice, snd_pcm_uframes_t pos, snd_pcm_uframes_t count) emu8k_pcm_silence() argument
|
H A D | emu8000_callback.c | 93 * Terminate a voice 148 * Find a channel (voice) within the EMU that is not in use or at least 171 int voice; get_voice() member in struct:best 179 best[i].voice = -1; get_voice() 215 bp->voice = i; get_voice() 220 if (best[i].voice >= 0) { get_voice() 221 vp = &emu->voices[best[i].voice]; get_voice() 222 vp->ch = best[i].voice; get_voice() 263 for triggerg the voice */ start_voice() 333 * reset voice parameters
|
H A D | emu8000_patch.c | 45 /* assign voice 31 and 32 to ROM */ snd_emu8000_open_dma()
|
/linux-4.4.14/include/uapi/sound/ |
H A D | asound_fm.h | 43 unsigned char voice; /* FM voice (0 to 17) */ member in struct:snd_dm_fm_voice 66 * This describes an FM note by its voice, octave, frequency number (10bit) 71 unsigned char voice; /* 0-17 voice channel */ member in struct:snd_dm_fm_note
|
H A D | sfnt_info.h | 85 * raw voice information record 138 struct soundfont_voice_parm parm; /* voice envelope parameters */ 181 * voice preset mapping (aliasing)
|
/linux-4.4.14/sound/soc/codecs/ |
H A D | alc5632.h | 53 #define ALC5632_VOICE_DAC_VOL 0x18 /* voice dac vol */ 83 /* stereo/voice DAC / stereo adc func ctrl */ 92 /* 0:voice, 1:main */ 109 /* 0:gpio func, 1:voice pcm */ 115 /* 0:main, 1:voice */
|
H A D | wm8753.c | 20 * voice. 22 * Please note that the voice PCM can be connected directly to a Bluetooth 896 u16 voice = snd_soc_read(codec, WM8753_PCM) & 0x01ec; wm8753_vdac_adc_set_dai_fmt() local 901 voice |= 0x0002; wm8753_vdac_adc_set_dai_fmt() 906 voice |= 0x0001; wm8753_vdac_adc_set_dai_fmt() 909 voice |= 0x0003; wm8753_vdac_adc_set_dai_fmt() 912 voice |= 0x0013; wm8753_vdac_adc_set_dai_fmt() 918 snd_soc_write(codec, WM8753_PCM, voice); wm8753_vdac_adc_set_dai_fmt() 931 u16 voice = snd_soc_read(codec, WM8753_PCM) & 0x01f3; wm8753_pcm_hw_params() local 939 voice |= 0x0004; wm8753_pcm_hw_params() 942 voice |= 0x0008; wm8753_pcm_hw_params() 945 voice |= 0x000c; wm8753_pcm_hw_params() 954 snd_soc_write(codec, WM8753_PCM, voice); wm8753_pcm_hw_params() 964 u16 voice, ioctl; wm8753_pcm_set_dai_fmt() local 966 voice = snd_soc_read(codec, WM8753_PCM) & 0x011f; wm8753_pcm_set_dai_fmt() 976 voice |= 0x0040; wm8753_pcm_set_dai_fmt() 991 voice |= 0x0080; wm8753_pcm_set_dai_fmt() 1000 voice &= ~0x0010; wm8753_pcm_set_dai_fmt() 1005 voice |= 0x0090; wm8753_pcm_set_dai_fmt() 1008 voice |= 0x0080; wm8753_pcm_set_dai_fmt() 1011 voice |= 0x0010; wm8753_pcm_set_dai_fmt() 1021 snd_soc_write(codec, WM8753_PCM, voice); wm8753_pcm_set_dai_fmt() 1377 * configurations. This gives 2 PCM's available for use, hifi and voice. 1384 * 4. Voice disabled - HIFI over HIFI, uses voice DAI LRC for capture 1424 { .name = "wm8753-voice",
|
H A D | cx20442.c | 213 /* Modem init: echo off, digital speaker off, quiet off, voice mode */ 311 .name = "cx20442-voice", 437 MODULE_DESCRIPTION("ASoC CX20442-11 voice modem codec driver");
|
H A D | mc13783.c | 233 * In synchronous mode force the voice codec into slave mode mc13783_set_fmt_sync() 249 -1, /* 12000000, invalid for voice codec */ 250 -1, /* 3686400, invalid for voice codec */ 669 * to the voice codec or the stereo DAC. When two different SSI ports 670 * are used for the voice codec and the stereo DAC we can do different
|
H A D | twl4030.c | 551 /* Digital bypass voice: sidetone (VUL -> VDL)*/ 960 "Option 2 (voice/audio)", "Option 1 (audio)" 1111 /* Common voice downlink gain controls */ 1913 /* In case of voice mode, the RX1 L(VRX) for downlink and the TX2 L/R 1942 /* If the system master clock is not 26MHz, the voice PCM interface is twl4030_voice_startup() 1947 "%s: HFCLKIN is %u KHz, voice interface needs 26MHz\n", twl4030_voice_startup() 1952 /* If the codec mode is not option2, the voice PCM interface is not twl4030_voice_startup() 1972 /* Enable voice digital filters */ twl4030_voice_shutdown() 1984 /* Enable voice digital filters */ twl4030_voice_hw_params() 2030 "%s: HFCLKIN is %u KHz, voice interface needs 26MHz\n", twl4030_voice_set_dai_sysclk() 2149 .name = "twl4030-voice",
|
H A D | ak4641.c | 486 .name = "ak4641-voice",
|
H A D | wm9713.c | 228 /* Gracefully shut down the voice interface. */ wm9713_voice_shutdown() 1110 .name = "wm9713-voice",
|
H A D | alc5632.c | 733 /* PLL source from voice clock */ alc5632_set_dai_pll()
|
H A D | da7210.c | 312 /* ADC and DAC voice (8kHz) high pass cutoff value */
|
H A D | da7213.c | 59 /* ADC and DAC voice mode (8kHz) high pass cutoff value */
|
H A D | da9055.c | 329 /* ADC and DAC voice mode (8kHz) high pass cutoff value */
|
/linux-4.4.14/sound/pci/ymfpci/ |
H A D | ymfpci_main.c | 216 * Playback voice management 223 struct snd_ymfpci_voice *voice, *voice2; voice_alloc() local 228 voice = &chip->voices[idx]; voice_alloc() 230 if (voice->use || (voice2 && voice2->use)) voice_alloc() 232 voice->use = 1; voice_alloc() 237 voice->pcm = 1; voice_alloc() 242 voice->synth = 1; voice_alloc() 245 voice->midi = 1; voice_alloc() 251 *rvoice = voice; voice_alloc() 274 /* TODO: synth/midi voice deallocation */ snd_ymfpci_voice_alloc() 304 static void snd_ymfpci_pcm_interrupt(struct snd_ymfpci *chip, struct snd_ymfpci_voice *voice) snd_ymfpci_pcm_interrupt() argument 309 if ((ypcm = voice->ypcm) == NULL) snd_ymfpci_pcm_interrupt() 315 pos = le32_to_cpu(voice->bank[chip->active_bank].start); snd_ymfpci_pcm_interrupt() 327 voice->bank[chip->active_bank].start); snd_ymfpci_pcm_interrupt() 341 bank = &voice->bank[next_bank]; snd_ymfpci_pcm_interrupt() 380 voice->bank[chip->active_bank].start); snd_ymfpci_pcm_capture_interrupt() 501 struct snd_ymfpci_voice *voice = ypcm->voices[voiceidx]; snd_ymfpci_pcm_init_voice() local 512 if (snd_BUG_ON(!voice)) snd_ymfpci_pcm_init_voice() 537 ypcm->chip->src441_used == voice->number)) { snd_ymfpci_pcm_init_voice() 538 ypcm->chip->src441_used = voice->number; snd_ymfpci_pcm_init_voice() 542 if (ypcm->chip->src441_used == voice->number && snd_ymfpci_pcm_init_voice() 551 bank = &voice->bank[nbank]; snd_ymfpci_pcm_init_voice() 764 struct snd_ymfpci_voice *voice = ypcm->voices[0]; snd_ymfpci_playback_pointer() local 766 if (!(ypcm->running && voice)) snd_ymfpci_playback_pointer() 768 return le32_to_cpu(voice->bank[chip->active_bank].start); snd_ymfpci_playback_pointer() 802 struct snd_ymfpci_voice *voice; snd_ymfpci_interrupt() local 809 voice = &chip->voices[nvoice]; snd_ymfpci_interrupt() 810 if (voice->interrupt) snd_ymfpci_interrupt() 811 voice->interrupt(chip, voice); snd_ymfpci_interrupt() 1725 * PCM voice volume 1871 /* per-voice volume */ snd_ymfpci_mixer() 2112 int voice, bank, reg; snd_ymfpci_memalloc() local 2142 for (voice = 0; voice < YDSXG_PLAYBACK_VOICES; voice++) { snd_ymfpci_memalloc() 2143 chip->voices[voice].number = voice; snd_ymfpci_memalloc() 2144 chip->voices[voice].bank = (struct snd_ymfpci_playback_bank *)ptr; snd_ymfpci_memalloc() 2145 chip->voices[voice].bank_addr = ptr_addr; snd_ymfpci_memalloc() 2147 chip->bank_playback[voice][bank] = (struct snd_ymfpci_playback_bank *)ptr; snd_ymfpci_memalloc() 2156 for (voice = 0; voice < YDSXG_CAPTURE_VOICES; voice++) snd_ymfpci_memalloc() 2158 chip->bank_capture[voice][bank] = (struct snd_ymfpci_capture_bank *)ptr; snd_ymfpci_memalloc() 2166 for (voice = 0; voice < YDSXG_EFFECT_VOICES; voice++) snd_ymfpci_memalloc() 2168 chip->bank_effect[voice][bank] = (struct snd_ymfpci_effect_bank *)ptr; snd_ymfpci_memalloc()
|
H A D | ymfpci.h | 252 void (*interrupt)(struct snd_ymfpci *chip, struct snd_ymfpci_voice *voice);
|
/linux-4.4.14/sound/soc/atmel/ |
H A D | atmel-pcm-dma.c | 6 * Author: Bo Shen <voice.shen@atmel.com> 137 MODULE_AUTHOR("Bo Shen <voice.shen@atmel.com>");
|
H A D | atmel_wm8904.c | 6 * Author: Bo Shen <voice.shen@atmel.com> 194 MODULE_AUTHOR("Bo Shen <voice.shen@atmel.com>");
|
/linux-4.4.14/drivers/net/wireless/ti/wl1251/ |
H A D | init.h | 37 /* voice */
|
H A D | cmd.h | 190 * bit 2: voice mode, 0 for normal scan.
|
/linux-4.4.14/arch/mips/include/asm/mach-lantiq/xway/ |
H A D | lantiq_soc.h | 95 /* MPS - multi processor unit (voice) */
|
/linux-4.4.14/arch/arm/mach-omap1/ |
H A D | board-sx1.c | 170 KEY(4, 0, GROUP_0 | 114), /* voice memo Qt::Key_F14 */ 171 KEY(4, 1, GROUP_2 | 114), /* voice memo */ 172 KEY(4, 2, GROUP_3 | 114), /* voice memo */
|
H A D | board-ams-delta.c | 391 .name = "voice",
|
/linux-4.4.14/include/linux/ |
H A D | hp_sdc.h | 123 #define HP_SDC_VT1 0x74 /* Timer for voice 1 */ 124 #define HP_SDC_VT2 0x75 /* Timer for voice 2 */ 125 #define HP_SDC_VT3 0x76 /* Timer for voice 3 */ 126 #define HP_SDC_VT4 0x77 /* Timer for voice 4 */ 216 #define HP_SDC_CMD_SET_BELL 0xA3 /* Set voice 3 params for "beep" cmd */
|
H A D | isdn.h | 300 int lastDLE; /* Flag for voice-coding: DLE seen */ 449 int usage[ISDN_MAX_CHANNELS]; /* Used by tty/ip/voice */
|
/linux-4.4.14/net/bluetooth/ |
H A D | sco.c | 799 struct bt_voice voice; sco_sock_setsockopt() local 832 voice.setting = sco_pi(sk)->setting; sco_sock_setsockopt() 834 len = min_t(unsigned int, sizeof(voice), optlen); sco_sock_setsockopt() 835 if (copy_from_user((char *)&voice, optval, len)) { sco_sock_setsockopt() 841 if (voice.setting != BT_VOICE_TRANSPARENT && sco_sock_setsockopt() 842 voice.setting != BT_VOICE_CVSD_16BIT) { sco_sock_setsockopt() 847 sco_pi(sk)->setting = voice.setting; sco_sock_setsockopt() 925 struct bt_voice voice; sco_sock_getsockopt() local 952 voice.setting = sco_pi(sk)->setting; sco_sock_getsockopt() 954 len = min_t(unsigned int, len, sizeof(voice)); sco_sock_getsockopt() 955 if (copy_to_user(optval, (char *)&voice, len)) sco_sock_getsockopt()
|
H A D | hci_event.c | 435 BT_DBG("%s voice setting 0x%4.4x", hdev->name, setting); hci_cc_read_voice_setting() 464 BT_DBG("%s voice setting 0x%4.4x", hdev->name, setting); hci_cc_write_voice_setting()
|
/linux-4.4.14/drivers/mfd/ |
H A D | davinci_voicecodec.c | 59 "could not get the clock for voice codec\n"); davinci_vc_probe()
|
/linux-4.4.14/sound/core/seq/oss/ |
H A D | seq_oss_event.h | 74 /* channel voice events (8bytes) */
|
H A D | seq_oss_event.c | 185 /* channel voice events: mode1 and 2 */ 278 * - SNDRV_SEQ_OSS_PROCESS_EVENTS (for one-voice per channel mode)
|
/linux-4.4.14/drivers/input/keyboard/ |
H A D | qt1070.c | 6 * Authors: Bo Shen <voice.shen@atmel.com> 289 MODULE_AUTHOR("Bo Shen <voice.shen@atmel.com>");
|
/linux-4.4.14/drivers/net/wireless/ti/wlcore/ |
H A D | conf.h | 187 * during BT voice/ACL link. 195 * during BT voice 227 * during BT voice 268 * RX guard time before the beginning of a new BT voice frame during 276 * TX guard time before the beginning of a new BT voice frame during 296 * Number of consecutive BT voice frames not interrupted by WLAN 354 CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */ 547 CONF_TX_AC_VO = 3, /* voice */
|
H A D | tx.c | 365 /* send EAPOL frames as voice */ wl1271_tx_fill_hdr()
|
/linux-4.4.14/sound/soc/pxa/ |
H A D | zylonite.c | 95 * In most applications the voice DAC will be used for telephony zylonite_voice_hw_params() 164 .codec_dai_name = "wm9713-voice",
|
/linux-4.4.14/sound/soc/samsung/ |
H A D | neo1973_wm8753.c | 275 { /* Hifi Playback - for similatious use with voice below */ 291 .codec_dai_name = "wm8753-voice",
|
/linux-4.4.14/drivers/staging/speakup/ |
H A D | speakup_ltlk.c | 67 __ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
|
H A D | i18n.c | 341 [MSG_FUNCNAME_VOICE_DEC] = "voice decrement", 342 [MSG_FUNCNAME_VOICE_INC] = "voice increment",
|
H A D | speakup_decpc.c | 82 #define CTRL_SP_voice 0x0001 /* voice change */ 178 __ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
|
H A D | speakup_apollo.c | 66 __ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
|
H A D | speakup_decext.c | 84 __ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
|
H A D | speakup_dectlk.c | 83 __ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
|
H A D | speakup_soft.c | 79 __ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
|
H A D | varhandlers.c | 42 { "voice", VOICE, VAR_NUM, NULL, NULL },
|
H A D | speakup_dtlk.c | 84 __ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
|
H A D | kobjects.c | 655 * If voice was just changed, we might need to reset our default spk_var_store()
|
/linux-4.4.14/drivers/pwm/ |
H A D | pwm-atmel.c | 5 * Bo Shen <voice.shen@atmel.com> 426 MODULE_AUTHOR("Bo Shen <voice.shen@atmel.com>");
|
/linux-4.4.14/drivers/isdn/hardware/eicon/ |
H A D | mi_pc.h | 58 #define MP_VOIP_MAX_DSP_CODE_SIZE 0x00090000 /* max 576k DSP-Code if voice over IP included */ 119 #define MQ_VOIP_MAX_DSP_CODE_SIZE 0x00028000 /* max 4*160k = 640K DSP-Code if voice over IP included */
|
H A D | divacapi.h | 1275 /* Advanced voice */
|
H A D | message.c | 5979 /* hangup the adv. voice call and signal '-' to the appl */ sig_ind() 8041 if (plci->tel == ADV_VOICE) /* transparent B on advanced voice */ add_b23() 9088 /* voice and codec features */ 13070 /* Advanced voice */ 13337 dbug(1, dprintf("[%06lx] %s,%d: Restore voice config failed %02x", adv_voice_restore_config() 13377 0x12, /* 20 Adv voice (Trans,mixer) */
|
/linux-4.4.14/sound/soc/omap/ |
H A D | omap-twl4030.c | 239 .codec_dai_name = "twl4030-voice", 294 dai_node = of_parse_phandle(node, "ti,mcbsp-voice", 0); omap_twl4030_probe()
|
H A D | ams-delta.c | 530 .codec_dai_name = "cx20442-voice",
|
/linux-4.4.14/drivers/iio/common/ssp_sensors/ |
H A D | ssp.h | 112 /* voice data */
|
/linux-4.4.14/sound/oss/dmasound/ |
H A D | dmasound.h | 22 #define SND_DEV_DSP 3 /* Digitized voice /dev/dsp */
|
/linux-4.4.14/sound/pci/ca0106/ |
H A D | ca0106_proc.c | 28 * Remove redundent "voice" handling.
|
H A D | ca0106_mixer.c | 28 * Remove redundent "voice" handling.
|
H A D | ca0106.h | 28 * Remove redundent "voice" handling.
|
H A D | ca0106_main.c | 54 * Remove redundent "voice" handling.
|
/linux-4.4.14/drivers/isdn/i4l/ |
H A D | isdn_tty.c | 216 /* voice conversion/compression */ isdn_tty_rcv_skb() 417 * outgoing data from the tty's xmit-buffer, handles voice-decompression or 488 /* voice conversion/decompression */ isdn_tty_senddown() 2404 /* voice-recording, add DLE-ETX */ isdn_tty_modem_result() 2412 /* voice-playing, add DLE-DC4 */ isdn_tty_modem_result() 3170 /* AT+VIP - Reset all voice parameters */ isdn_tty_cmd_PLUSV()
|
/linux-4.4.14/drivers/net/wireless/iwlwifi/ |
H A D | iwl-prph.h | 173 * 3 -- EDCA VO (voice) and management frames, highest priority
|
/linux-4.4.14/drivers/net/wireless/ath/ath10k/ |
H A D | hw.h | 416 /* 40 ms for voice */
|
H A D | wmi.h | 2070 * Each WMM access class (voice, video, best-effort, background) will 2255 * Each WMM access class (voice, video, best-effort, background) will 2466 * Each WMM access class (voice, video, best-effort, background) will
|
H A D | mac.c | 4051 * By default FW set ARP frames ac to voice (6). In that case ARP ath10k_start()
|
/linux-4.4.14/drivers/char/ |
H A D | dtlk.c | 19 The DoubleTalk PC contains four voice synthesizers: text-to-speech
|
/linux-4.4.14/sound/isa/wavefront/ |
H A D | wavefront_midi.c | 45 * voice nature of the WaveFront, its pretty easy to find a use
|
/linux-4.4.14/sound/soc/intel/atom/ |
H A D | sst-mfld-dsp.h | 270 u8 str_type; /* 1 = voice 2 = music */
|
/linux-4.4.14/drivers/net/wireless/realtek/rtlwifi/btcoexist/ |
H A D | halbtc8821a2ant.c | 2355 false, 0); /*for voice quality*/ halbtc8821a2ant_action_sco() 2358 false, 0); /*for voice quality*/ halbtc8821a2ant_action_sco() 2381 false, 0); /*for voice quality*/ halbtc8821a2ant_action_sco() 2384 false, 0); /*for voice quality*/ halbtc8821a2ant_action_sco()
|
H A D | halbtc8723b2ant.c | 2389 /*for voice quality */ btc8723b2ant_action_sco()
|
/linux-4.4.14/drivers/net/wireless/iwlegacy/ |
H A D | prph.h | 262 * 3 -- EDCA VO (voice) and management frames, highest priority
|
/linux-4.4.14/arch/powerpc/include/asm/ |
H A D | io.h | 400 * please voice up asap. We never had it for 64 bits and I do not intend
|
/linux-4.4.14/sound/soc/mediatek/ |
H A D | mtk-afe-pcm.c | 829 .name = "VUL", /* voice uplink */
|
/linux-4.4.14/drivers/net/wireless/cw1200/ |
H A D | wsm.h | 160 /* voice */
|
/linux-4.4.14/net/netfilter/ |
H A D | nf_conntrack_sip.c | 1065 "cannot add expectation for voice"); process_sdp()
|
H A D | nf_conntrack_h323_types.c | 168 {FNAME("voice") SEQ, 1, 1, 3, SKIP | EXT, 0, _VoiceCaps},
|
/linux-4.4.14/sound/pci/hda/ |
H A D | patch_ca0132.c | 3342 /* set voice focus */ ca0132_select_mic() 3351 /* disable voice focus */ ca0132_select_mic() 3657 /* enable voice fx */ ca0132_voicefx_put()
|
/linux-4.4.14/drivers/isdn/gigaset/ |
H A D | capi.c | 2430 s = "voice"; gigaset_proc_show()
|
/linux-4.4.14/drivers/net/wireless/brcm80211/brcmfmac/ |
H A D | fwsignal.c | 317 * @BRCMF_FWS_FIFO_AC_VO: fifo for voice traffic.
|
/linux-4.4.14/drivers/net/wireless/ath/ath6kl/ |
H A D | wmi.h | 107 #define WMM_AC_VO 3 /* voice */
|
/linux-4.4.14/arch/x86/lguest/ |
H A D | boot.c | 413 * lguest sales!) Shut up, inner voice! (Hey, just pointing out that this is
|
/linux-4.4.14/sound/pci/ali5451/ |
H A D | ali5451.c | 1162 /* voice management */ snd_ali_playback_hw_params()
|
/linux-4.4.14/drivers/tty/ |
H A D | n_gsm.c | 1566 /* Packetised uininterruptible voice/data */ gsm_dlci_data()
|
/linux-4.4.14/include/net/ |
H A D | mac80211.h | 138 * @IEEE80211_AC_VO: voice
|
/linux-4.4.14/drivers/staging/rtl8723au/hal/ |
H A D | rtl8723a_bt-coexist.c | 6354 /* sco BUSY bit is not used on voice over PCM platform */ BTDM_1AntFwC2hBtInfo8723A()
|