Lines Matching refs:runtime

36 			epcm->substream->runtime->hw->pointer(emu, epcm->substream),  in snd_emu10k1_pcm_interrupt()
48 if (emu->pcm_capture_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) in snd_emu10k1_pcm_ac97adc_interrupt()
60 if (emu->pcm_capture_mic_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) in snd_emu10k1_pcm_ac97mic_interrupt()
72 if (emu->pcm_capture_efx_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) in snd_emu10k1_pcm_efx_interrupt()
82 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_pointer() local
83 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_efx_playback_pointer()
89 ptr += runtime->buffer_size; in snd_emu10k1_efx_playback_pointer()
91 ptr %= runtime->buffer_size; in snd_emu10k1_efx_playback_pointer()
277 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_pcm_init_voice() local
287 stereo = runtime->channels == 2; in snd_emu10k1_pcm_init_voice()
288 w_16 = snd_pcm_format_width(runtime->format) == 16; in snd_emu10k1_pcm_init_voice()
356 pitch_target = emu10k1_calc_pitch_target(runtime->rate); in snd_emu10k1_pcm_init_voice()
398 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_params() local
399 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_hw_params()
413 if (emu->iommu_workaround && runtime->dma_bytes >= EMUPAGESIZE) in snd_emu10k1_playback_hw_params()
414 runtime->dma_bytes -= EMUPAGESIZE; in snd_emu10k1_playback_hw_params()
434 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_free() local
437 if (runtime->private_data == NULL) in snd_emu10k1_playback_hw_free()
439 epcm = runtime->private_data; in snd_emu10k1_playback_hw_free()
464 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_hw_free() local
468 if (runtime->private_data == NULL) in snd_emu10k1_efx_playback_hw_free()
470 epcm = runtime->private_data; in snd_emu10k1_efx_playback_hw_free()
493 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_prepare() local
494 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_prepare()
499 if (runtime->channels == 2) { in snd_emu10k1_playback_prepare()
521 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_prepare() local
522 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_efx_playback_prepare()
577 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_prepare() local
578 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_prepare()
597 snd_emu10k1_ptr_write(emu, epcm->capture_ba_reg, 0, runtime->dma_addr); in snd_emu10k1_capture_prepare()
612 if (runtime->channels > 1) in snd_emu10k1_capture_prepare()
615 snd_emu10k1_audigy_capture_rate_reg(runtime->rate) : in snd_emu10k1_capture_prepare()
616 snd_emu10k1_capture_rate_reg(runtime->rate); in snd_emu10k1_capture_prepare()
623 struct snd_pcm_runtime *runtime; in snd_emu10k1_playback_invalidate_cache() local
628 runtime = evoice->epcm->substream->runtime; in snd_emu10k1_playback_invalidate_cache()
630 stereo = (!extra && runtime->channels == 2); in snd_emu10k1_playback_invalidate_cache()
631 sample = snd_pcm_format_width(runtime->format) == 16 ? 0 : 0x80808080; in snd_emu10k1_playback_invalidate_cache()
661 struct snd_pcm_runtime *runtime; in snd_emu10k1_playback_prepare_voice() local
668 runtime = substream->runtime; in snd_emu10k1_playback_prepare_voice()
672 tmp = runtime->channels == 2 ? (master ? 1 : 2) : 0; in snd_emu10k1_playback_prepare_voice()
684 struct snd_pcm_runtime *runtime; in snd_emu10k1_playback_trigger_voice() local
690 runtime = substream->runtime; in snd_emu10k1_playback_trigger_voice()
693 pitch = snd_emu10k1_rate_to_pitch(runtime->rate) >> 8; in snd_emu10k1_playback_trigger_voice()
697 pitch_target = emu10k1_calc_pitch_target(runtime->rate); in snd_emu10k1_playback_trigger_voice()
725 struct snd_pcm_runtime *runtime) in snd_emu10k1_playback_mangle_extra() argument
731 period_pos = runtime->status->hw_ptr - runtime->hw_ptr_interrupt; in snd_emu10k1_playback_mangle_extra()
732 period_pos %= runtime->period_size; in snd_emu10k1_playback_mangle_extra()
743 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_trigger() local
744 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_trigger()
762 snd_emu10k1_playback_mangle_extra(emu, epcm, substream, runtime); in snd_emu10k1_playback_trigger()
792 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_trigger() local
793 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_trigger()
860 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_pointer() local
861 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_pointer()
868 ptr += runtime->buffer_size; in snd_emu10k1_playback_pointer()
870 ptr %= runtime->buffer_size; in snd_emu10k1_playback_pointer()
873 ptr += runtime->buffer_size - epcm->ccca_start_addr; in snd_emu10k1_playback_pointer()
876 if (ptr >= runtime->buffer_size) in snd_emu10k1_playback_pointer()
877 ptr -= runtime->buffer_size; in snd_emu10k1_playback_pointer()
894 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_trigger() local
895 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_efx_playback_trigger()
943 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_pointer() local
944 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_pointer()
954 return bytes_to_frames(runtime, ptr); in snd_emu10k1_capture_pointer()
1060 static void snd_emu10k1_pcm_free_substream(struct snd_pcm_runtime *runtime) in snd_emu10k1_pcm_free_substream() argument
1062 kfree(runtime->private_data); in snd_emu10k1_pcm_free_substream()
1084 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_open() local
1096 runtime->private_data = epcm; in snd_emu10k1_efx_playback_open()
1097 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_efx_playback_open()
1098 runtime->hw = snd_emu10k1_efx_playback; in snd_emu10k1_efx_playback_open()
1117 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_open() local
1126 runtime->private_data = epcm; in snd_emu10k1_playback_open()
1127 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_playback_open()
1128 runtime->hw = snd_emu10k1_playback; in snd_emu10k1_playback_open()
1129 err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); in snd_emu10k1_playback_open()
1134 err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 256, UINT_MAX); in snd_emu10k1_playback_open()
1143 err = snd_pcm_hw_rule_noresample(runtime, sample_rate); in snd_emu10k1_playback_open()
1173 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_open() local
1187 runtime->private_data = epcm; in snd_emu10k1_capture_open()
1188 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_open()
1189 runtime->hw = snd_emu10k1_capture; in snd_emu10k1_capture_open()
1192 …snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_pe… in snd_emu10k1_capture_open()
1193 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_capture_rates); in snd_emu10k1_capture_open()
1210 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_mic_open() local
1223 substream->runtime->private_data = epcm; in snd_emu10k1_capture_mic_open()
1224 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_mic_open()
1225 runtime->hw = snd_emu10k1_capture; in snd_emu10k1_capture_mic_open()
1226 runtime->hw.rates = SNDRV_PCM_RATE_8000; in snd_emu10k1_capture_mic_open()
1227 runtime->hw.rate_min = runtime->hw.rate_max = 8000; in snd_emu10k1_capture_mic_open()
1228 runtime->hw.channels_min = 1; in snd_emu10k1_capture_mic_open()
1231 …snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_pe… in snd_emu10k1_capture_mic_open()
1248 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_efx_open() local
1263 substream->runtime->private_data = epcm; in snd_emu10k1_capture_efx_open()
1264 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_efx_open()
1265 runtime->hw = snd_emu10k1_capture_efx; in snd_emu10k1_capture_efx_open()
1266 runtime->hw.rates = SNDRV_PCM_RATE_48000; in snd_emu10k1_capture_efx_open()
1267 runtime->hw.rate_min = runtime->hw.rate_max = 48000; in snd_emu10k1_capture_efx_open()
1295 runtime->hw.rates = SNDRV_PCM_RATE_44100; in snd_emu10k1_capture_efx_open()
1296 runtime->hw.rate_min = runtime->hw.rate_max = 44100; in snd_emu10k1_capture_efx_open()
1297 runtime->hw.channels_min = in snd_emu10k1_capture_efx_open()
1298 runtime->hw.channels_max = 16; in snd_emu10k1_capture_efx_open()
1302 runtime->hw.rates = SNDRV_PCM_RATE_48000; in snd_emu10k1_capture_efx_open()
1303 runtime->hw.rate_min = runtime->hw.rate_max = 48000; in snd_emu10k1_capture_efx_open()
1304 runtime->hw.channels_min = in snd_emu10k1_capture_efx_open()
1305 runtime->hw.channels_max = 16; in snd_emu10k1_capture_efx_open()
1311 runtime->hw.rates = SNDRV_PCM_RATE_96000; in snd_emu10k1_capture_efx_open()
1312 runtime->hw.rate_min = runtime->hw.rate_max = 96000; in snd_emu10k1_capture_efx_open()
1313 runtime->hw.channels_min = runtime->hw.channels_max = 4; in snd_emu10k1_capture_efx_open()
1317 runtime->hw.rates = SNDRV_PCM_RATE_192000; in snd_emu10k1_capture_efx_open()
1318 runtime->hw.rate_min = runtime->hw.rate_max = 192000; in snd_emu10k1_capture_efx_open()
1319 runtime->hw.channels_min = runtime->hw.channels_max = 2; in snd_emu10k1_capture_efx_open()
1321 runtime->hw.formats = SNDRV_PCM_FMTBIT_S32_LE; in snd_emu10k1_capture_efx_open()
1326 runtime->hw.channels_min = runtime->hw.channels_max = 0; in snd_emu10k1_capture_efx_open()
1329 runtime->hw.channels_min++; in snd_emu10k1_capture_efx_open()
1330 runtime->hw.channels_max++; in snd_emu10k1_capture_efx_open()
1339 …snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_pe… in snd_emu10k1_capture_efx_open()
1587 unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data); in fx8010_pb_trans_copy()
1633 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_prepare() local
1650 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_size, 0, runtime->buffer_size); in snd_emu10k1_fx8010_playback_prepare()
1652 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_count, 0, runtime->period_size); in snd_emu10k1_fx8010_playback_prepare()
1653 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_tmpcount, 0, runtime->period_size); in snd_emu10k1_fx8010_playback_prepare()
1655 …80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pc… in snd_emu10k1_fx8010_playback_prepare()
1741 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_open() local
1744 runtime->hw = snd_emu10k1_fx8010_playback; in snd_emu10k1_fx8010_playback_open()
1745 runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels; in snd_emu10k1_fx8010_playback_open()
1746 runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2; in snd_emu10k1_fx8010_playback_open()