Lines Matching defs:pvoice
835 struct snd_ali_voice *pvoice;
848 pvoice = &codec->synth.voices[channel];
853 if (pvoice->pcm && pvoice->substream) {
855 if (pvoice->running) {
861 snd_pcm_period_elapsed(pvoice->substream);
912 struct snd_ali_voice *pvoice;
926 pvoice = &(codec->synth.voices[idx]);
927 pvoice->codec = codec;
928 pvoice->use = 1;
929 pvoice->pcm = 1;
930 pvoice->mode = rec;
932 return pvoice;
940 struct snd_ali_voice *pvoice)
945 dev_dbg(codec->card->dev, "free_voice: channel=%d\n", pvoice->number);
946 if (!pvoice->use)
948 snd_ali_clear_voices(codec, pvoice->number, pvoice->number);
950 private_free = pvoice->private_free;
951 private_data = pvoice->private_data;
952 pvoice->private_free = NULL;
953 pvoice->private_data = NULL;
954 if (pvoice->pcm)
955 snd_ali_free_channel_pcm(codec, pvoice->number);
956 pvoice->use = pvoice->pcm = pvoice->synth = 0;
957 pvoice->substream = NULL;
1074 struct snd_ali_voice *pvoice, *evoice;
1094 pvoice = s->runtime->private_data;
1095 evoice = pvoice->extra;
1096 what |= 1 << (pvoice->number & 0x1f);
1098 whati |= 1 << (pvoice->number & 0x1f);
1104 pvoice->running = 1;
1108 pvoice->running = 0;
1137 struct snd_ali_voice *pvoice = runtime->private_data;
1138 struct snd_ali_voice *evoice = pvoice->extra;
1150 pvoice->extra = evoice;
1156 pvoice->extra = evoice = NULL;
1167 struct snd_ali_voice *pvoice = runtime->private_data;
1168 struct snd_ali_voice *evoice = pvoice ? pvoice->extra : NULL;
1172 pvoice->extra = NULL;
1181 struct snd_ali_voice *pvoice = runtime->private_data;
1182 struct snd_ali_voice *evoice = pvoice->extra;
1200 if (pvoice->number == ALI_SPDIF_IN_CHANNEL ||
1201 pvoice->number == ALI_PCM_IN_CHANNEL)
1202 snd_ali_disable_special_channel(codec, pvoice->number);
1206 && pvoice->number == ALI_SPDIF_OUT_CHANNEL) {
1215 pvoice->count = runtime->period_size;
1218 pvoice->eso = runtime->buffer_size;
1221 pvoice->eso, pvoice->count);
1224 ESO = pvoice->eso -1;
1235 pvoice->number,runtime->rate,Delta,GVSEL,PAN,CTRL);
1237 pvoice->number,
1249 evoice->count = pvoice->count;
1250 evoice->eso = pvoice->count << 1;
1274 struct snd_ali_voice *pvoice = runtime->private_data;
1289 snd_ali_enable_special_channel(codec,pvoice->number);
1291 Delta = (pvoice->number == ALI_MODEM_IN_CHANNEL ||
1292 pvoice->number == ALI_MODEM_OUT_CHANNEL) ?
1293 0x1000 : snd_ali_convert_rate(runtime->rate, pvoice->mode);
1296 if (pvoice->number == ALI_SPDIF_IN_CHANNEL) {
1323 pvoice->eso = runtime->buffer_size;
1326 pvoice->count = runtime->period_size;
1332 ESO = pvoice->eso - 1;
1340 pvoice->number,
1363 struct snd_ali_voice *pvoice = runtime->private_data;
1367 if (!pvoice->running) {
1371 outb(pvoice->number, ALI_REG(codec, ALI_GC_CIR));
1385 struct snd_ali_voice *pvoice = runtime->private_data;
1389 if (!pvoice->running) {
1393 outb(pvoice->number, ALI_REG(codec, ALI_GC_CIR));
1451 struct snd_ali_voice *pvoice = runtime->private_data;
1453 if (pvoice)
1454 snd_ali_free_voice(pvoice->codec, pvoice);
1462 struct snd_ali_voice *pvoice;
1464 pvoice = snd_ali_alloc_voice(codec, SNDRV_ALI_VOICE_TYPE_PCM, rec,
1466 if (!pvoice)
1469 pvoice->substream = substream;
1470 runtime->private_data = pvoice;
1498 struct snd_ali_voice *pvoice = substream->runtime->private_data;
1500 snd_ali_disable_special_channel(codec,pvoice->number);