Lines Matching refs:pvoice
834 struct snd_ali_voice *pvoice; in snd_ali_update_ptr() local
847 pvoice = &codec->synth.voices[channel]; in snd_ali_update_ptr()
852 if (pvoice->pcm && pvoice->substream) { in snd_ali_update_ptr()
854 if (pvoice->running) { in snd_ali_update_ptr()
860 snd_pcm_period_elapsed(pvoice->substream); in snd_ali_update_ptr()
911 struct snd_ali_voice *pvoice; in snd_ali_alloc_voice() local
925 pvoice = &(codec->synth.voices[idx]); in snd_ali_alloc_voice()
926 pvoice->codec = codec; in snd_ali_alloc_voice()
927 pvoice->use = 1; in snd_ali_alloc_voice()
928 pvoice->pcm = 1; in snd_ali_alloc_voice()
929 pvoice->mode = rec; in snd_ali_alloc_voice()
931 return pvoice; in snd_ali_alloc_voice()
939 struct snd_ali_voice *pvoice) in snd_ali_free_voice() argument
944 dev_dbg(codec->card->dev, "free_voice: channel=%d\n", pvoice->number); in snd_ali_free_voice()
945 if (!pvoice->use) in snd_ali_free_voice()
947 snd_ali_clear_voices(codec, pvoice->number, pvoice->number); in snd_ali_free_voice()
949 private_free = pvoice->private_free; in snd_ali_free_voice()
950 private_data = pvoice->private_data; in snd_ali_free_voice()
951 pvoice->private_free = NULL; in snd_ali_free_voice()
952 pvoice->private_data = NULL; in snd_ali_free_voice()
953 if (pvoice->pcm) in snd_ali_free_voice()
954 snd_ali_free_channel_pcm(codec, pvoice->number); in snd_ali_free_voice()
955 pvoice->use = pvoice->pcm = pvoice->synth = 0; in snd_ali_free_voice()
956 pvoice->substream = NULL; in snd_ali_free_voice()
1073 struct snd_ali_voice *pvoice, *evoice; in snd_ali_trigger() local
1093 pvoice = s->runtime->private_data; in snd_ali_trigger()
1094 evoice = pvoice->extra; in snd_ali_trigger()
1095 what |= 1 << (pvoice->number & 0x1f); in snd_ali_trigger()
1097 whati |= 1 << (pvoice->number & 0x1f); in snd_ali_trigger()
1103 pvoice->running = 1; in snd_ali_trigger()
1107 pvoice->running = 0; in snd_ali_trigger()
1136 struct snd_ali_voice *pvoice = runtime->private_data; in snd_ali_playback_hw_params() local
1137 struct snd_ali_voice *evoice = pvoice->extra; in snd_ali_playback_hw_params()
1149 pvoice->extra = evoice; in snd_ali_playback_hw_params()
1155 pvoice->extra = evoice = NULL; in snd_ali_playback_hw_params()
1166 struct snd_ali_voice *pvoice = runtime->private_data; in snd_ali_playback_hw_free() local
1167 struct snd_ali_voice *evoice = pvoice ? pvoice->extra : NULL; in snd_ali_playback_hw_free()
1171 pvoice->extra = NULL; in snd_ali_playback_hw_free()
1180 struct snd_ali_voice *pvoice = runtime->private_data; in snd_ali_playback_prepare() local
1181 struct snd_ali_voice *evoice = pvoice->extra; in snd_ali_playback_prepare()
1199 if (pvoice->number == ALI_SPDIF_IN_CHANNEL || in snd_ali_playback_prepare()
1200 pvoice->number == ALI_PCM_IN_CHANNEL) in snd_ali_playback_prepare()
1201 snd_ali_disable_special_channel(codec, pvoice->number); in snd_ali_playback_prepare()
1205 && pvoice->number == ALI_SPDIF_OUT_CHANNEL) { in snd_ali_playback_prepare()
1214 pvoice->count = runtime->period_size; in snd_ali_playback_prepare()
1217 pvoice->eso = runtime->buffer_size; in snd_ali_playback_prepare()
1220 pvoice->eso, pvoice->count); in snd_ali_playback_prepare()
1223 ESO = pvoice->eso -1; in snd_ali_playback_prepare()
1234 pvoice->number,runtime->rate,Delta,GVSEL,PAN,CTRL); in snd_ali_playback_prepare()
1236 pvoice->number, in snd_ali_playback_prepare()
1248 evoice->count = pvoice->count; in snd_ali_playback_prepare()
1249 evoice->eso = pvoice->count << 1; in snd_ali_playback_prepare()
1273 struct snd_ali_voice *pvoice = runtime->private_data; in snd_ali_prepare() local
1288 snd_ali_enable_special_channel(codec,pvoice->number); in snd_ali_prepare()
1290 Delta = (pvoice->number == ALI_MODEM_IN_CHANNEL || in snd_ali_prepare()
1291 pvoice->number == ALI_MODEM_OUT_CHANNEL) ? in snd_ali_prepare()
1292 0x1000 : snd_ali_convert_rate(runtime->rate, pvoice->mode); in snd_ali_prepare()
1295 if (pvoice->number == ALI_SPDIF_IN_CHANNEL) { in snd_ali_prepare()
1322 pvoice->eso = runtime->buffer_size; in snd_ali_prepare()
1325 pvoice->count = runtime->period_size; in snd_ali_prepare()
1331 ESO = pvoice->eso - 1; in snd_ali_prepare()
1339 pvoice->number, in snd_ali_prepare()
1362 struct snd_ali_voice *pvoice = runtime->private_data; in snd_ali_playback_pointer() local
1366 if (!pvoice->running) { in snd_ali_playback_pointer()
1370 outb(pvoice->number, ALI_REG(codec, ALI_GC_CIR)); in snd_ali_playback_pointer()
1384 struct snd_ali_voice *pvoice = runtime->private_data; in snd_ali_pointer() local
1388 if (!pvoice->running) { in snd_ali_pointer()
1392 outb(pvoice->number, ALI_REG(codec, ALI_GC_CIR)); in snd_ali_pointer()
1450 struct snd_ali_voice *pvoice = runtime->private_data; in snd_ali_pcm_free_substream() local
1452 if (pvoice) in snd_ali_pcm_free_substream()
1453 snd_ali_free_voice(pvoice->codec, pvoice); in snd_ali_pcm_free_substream()
1461 struct snd_ali_voice *pvoice; in snd_ali_open() local
1463 pvoice = snd_ali_alloc_voice(codec, SNDRV_ALI_VOICE_TYPE_PCM, rec, in snd_ali_open()
1465 if (!pvoice) in snd_ali_open()
1468 pvoice->substream = substream; in snd_ali_open()
1469 runtime->private_data = pvoice; in snd_ali_open()
1497 struct snd_ali_voice *pvoice = substream->runtime->private_data; in snd_ali_close() local
1499 snd_ali_disable_special_channel(codec,pvoice->number); in snd_ali_close()