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