Lines Matching full:runtime
35 epcm->substream->runtime->hw->pointer(emu, epcm->substream), in snd_emu10k1_pcm_interrupt()
47 if (emu->pcm_capture_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) in snd_emu10k1_pcm_ac97adc_interrupt()
59 if (emu->pcm_capture_mic_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) in snd_emu10k1_pcm_ac97mic_interrupt()
71 if (emu->pcm_capture_efx_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) in snd_emu10k1_pcm_efx_interrupt()
81 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_pointer() local
82 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_efx_playback_pointer()
88 ptr += runtime->buffer_size; in snd_emu10k1_efx_playback_pointer()
90 ptr %= runtime->buffer_size; in snd_emu10k1_efx_playback_pointer()
276 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_pcm_init_voice() local
286 stereo = runtime->channels == 2; in snd_emu10k1_pcm_init_voice()
287 w_16 = snd_pcm_format_width(runtime->format) == 16; in snd_emu10k1_pcm_init_voice()
355 pitch_target = emu10k1_calc_pitch_target(runtime->rate); in snd_emu10k1_pcm_init_voice()
397 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_params() local
398 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_hw_params()
411 if (emu->iommu_workaround && runtime->dma_bytes >= EMUPAGESIZE) in snd_emu10k1_playback_hw_params()
412 runtime->dma_bytes -= EMUPAGESIZE; in snd_emu10k1_playback_hw_params()
432 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_free() local
435 if (runtime->private_data == NULL) in snd_emu10k1_playback_hw_free()
437 epcm = runtime->private_data; in snd_emu10k1_playback_hw_free()
462 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_hw_free() local
466 if (runtime->private_data == NULL) in snd_emu10k1_efx_playback_hw_free()
468 epcm = runtime->private_data; in snd_emu10k1_efx_playback_hw_free()
491 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_prepare() local
492 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_prepare()
497 if (runtime->channels == 2) { in snd_emu10k1_playback_prepare()
519 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_prepare() local
520 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_efx_playback_prepare()
575 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_prepare() local
576 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_prepare()
595 snd_emu10k1_ptr_write(emu, epcm->capture_ba_reg, 0, runtime->dma_addr); in snd_emu10k1_capture_prepare()
610 if (runtime->channels > 1) in snd_emu10k1_capture_prepare()
613 snd_emu10k1_audigy_capture_rate_reg(runtime->rate) : in snd_emu10k1_capture_prepare()
614 snd_emu10k1_capture_rate_reg(runtime->rate); in snd_emu10k1_capture_prepare()
621 struct snd_pcm_runtime *runtime; in snd_emu10k1_playback_invalidate_cache() local
626 runtime = evoice->epcm->substream->runtime; in snd_emu10k1_playback_invalidate_cache()
628 stereo = (!extra && runtime->channels == 2); in snd_emu10k1_playback_invalidate_cache()
629 sample = snd_pcm_format_width(runtime->format) == 16 ? 0 : 0x80808080; in snd_emu10k1_playback_invalidate_cache()
659 struct snd_pcm_runtime *runtime; in snd_emu10k1_playback_prepare_voice() local
666 runtime = substream->runtime; in snd_emu10k1_playback_prepare_voice()
670 tmp = runtime->channels == 2 ? (master ? 1 : 2) : 0; in snd_emu10k1_playback_prepare_voice()
682 struct snd_pcm_runtime *runtime; in snd_emu10k1_playback_trigger_voice() local
688 runtime = substream->runtime; in snd_emu10k1_playback_trigger_voice()
691 pitch = snd_emu10k1_rate_to_pitch(runtime->rate) >> 8; in snd_emu10k1_playback_trigger_voice()
695 pitch_target = emu10k1_calc_pitch_target(runtime->rate); in snd_emu10k1_playback_trigger_voice()
723 struct snd_pcm_runtime *runtime) in snd_emu10k1_playback_mangle_extra() argument
729 period_pos = runtime->status->hw_ptr - runtime->hw_ptr_interrupt; in snd_emu10k1_playback_mangle_extra()
730 period_pos %= runtime->period_size; in snd_emu10k1_playback_mangle_extra()
741 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_trigger() local
742 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_trigger()
760 snd_emu10k1_playback_mangle_extra(emu, epcm, substream, runtime); in snd_emu10k1_playback_trigger()
790 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_trigger() local
791 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_trigger()
858 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_pointer() local
859 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_pointer()
866 ptr += runtime->buffer_size; in snd_emu10k1_playback_pointer()
868 ptr %= runtime->buffer_size; in snd_emu10k1_playback_pointer()
871 ptr += runtime->buffer_size - epcm->ccca_start_addr; in snd_emu10k1_playback_pointer()
874 if (ptr >= runtime->buffer_size) in snd_emu10k1_playback_pointer()
875 ptr -= runtime->buffer_size; in snd_emu10k1_playback_pointer()
881 (long)ptr, (long)runtime->buffer_size, in snd_emu10k1_playback_pointer()
882 (long)runtime->period_size); in snd_emu10k1_playback_pointer()
892 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_trigger() local
893 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_efx_playback_trigger()
941 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_pointer() local
942 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_pointer()
952 return bytes_to_frames(runtime, ptr); in snd_emu10k1_capture_pointer()
1058 static void snd_emu10k1_pcm_free_substream(struct snd_pcm_runtime *runtime) in snd_emu10k1_pcm_free_substream() argument
1060 kfree(runtime->private_data); in snd_emu10k1_pcm_free_substream()
1082 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_open() local
1094 runtime->private_data = epcm; in snd_emu10k1_efx_playback_open()
1095 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_efx_playback_open()
1096 runtime->hw = snd_emu10k1_efx_playback; in snd_emu10k1_efx_playback_open()
1115 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_open() local
1124 runtime->private_data = epcm; in snd_emu10k1_playback_open()
1125 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_playback_open()
1126 runtime->hw = snd_emu10k1_playback; in snd_emu10k1_playback_open()
1127 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) { in snd_emu10k1_playback_open()
1131 …if ((err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 256, UINT_MAX)) … in snd_emu10k1_playback_open()
1139 err = snd_pcm_hw_rule_noresample(runtime, sample_rate); in snd_emu10k1_playback_open()
1169 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_open() local
1183 runtime->private_data = epcm; in snd_emu10k1_capture_open()
1184 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_open()
1185 runtime->hw = snd_emu10k1_capture; in snd_emu10k1_capture_open()
1188 …snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_pe… in snd_emu10k1_capture_open()
1189 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_capture_rates); in snd_emu10k1_capture_open()
1206 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_mic_open() local
1219 substream->runtime->private_data = epcm; in snd_emu10k1_capture_mic_open()
1220 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_mic_open()
1221 runtime->hw = snd_emu10k1_capture; in snd_emu10k1_capture_mic_open()
1222 runtime->hw.rates = SNDRV_PCM_RATE_8000; in snd_emu10k1_capture_mic_open()
1223 runtime->hw.rate_min = runtime->hw.rate_max = 8000; in snd_emu10k1_capture_mic_open()
1224 runtime->hw.channels_min = 1; in snd_emu10k1_capture_mic_open()
1227 …snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_pe… in snd_emu10k1_capture_mic_open()
1244 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_efx_open() local
1259 substream->runtime->private_data = epcm; in snd_emu10k1_capture_efx_open()
1260 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_efx_open()
1261 runtime->hw = snd_emu10k1_capture_efx; in snd_emu10k1_capture_efx_open()
1262 runtime->hw.rates = SNDRV_PCM_RATE_48000; in snd_emu10k1_capture_efx_open()
1263 runtime->hw.rate_min = runtime->hw.rate_max = 48000; in snd_emu10k1_capture_efx_open()
1291 runtime->hw.rates = SNDRV_PCM_RATE_44100; in snd_emu10k1_capture_efx_open()
1292 runtime->hw.rate_min = runtime->hw.rate_max = 44100; in snd_emu10k1_capture_efx_open()
1293 runtime->hw.channels_min = in snd_emu10k1_capture_efx_open()
1294 runtime->hw.channels_max = 16; in snd_emu10k1_capture_efx_open()
1298 runtime->hw.rates = SNDRV_PCM_RATE_48000; in snd_emu10k1_capture_efx_open()
1299 runtime->hw.rate_min = runtime->hw.rate_max = 48000; in snd_emu10k1_capture_efx_open()
1300 runtime->hw.channels_min = in snd_emu10k1_capture_efx_open()
1301 runtime->hw.channels_max = 16; in snd_emu10k1_capture_efx_open()
1307 runtime->hw.rates = SNDRV_PCM_RATE_96000; in snd_emu10k1_capture_efx_open()
1308 runtime->hw.rate_min = runtime->hw.rate_max = 96000; in snd_emu10k1_capture_efx_open()
1309 runtime->hw.channels_min = runtime->hw.channels_max = 4; in snd_emu10k1_capture_efx_open()
1313 runtime->hw.rates = SNDRV_PCM_RATE_192000; in snd_emu10k1_capture_efx_open()
1314 runtime->hw.rate_min = runtime->hw.rate_max = 192000; in snd_emu10k1_capture_efx_open()
1315 runtime->hw.channels_min = runtime->hw.channels_max = 2; in snd_emu10k1_capture_efx_open()
1317 runtime->hw.formats = SNDRV_PCM_FMTBIT_S32_LE; in snd_emu10k1_capture_efx_open()
1322 runtime->hw.channels_min = runtime->hw.channels_max = 0; in snd_emu10k1_capture_efx_open()
1325 runtime->hw.channels_min++; in snd_emu10k1_capture_efx_open()
1326 runtime->hw.channels_max++; in snd_emu10k1_capture_efx_open()
1335 …snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_pe… in snd_emu10k1_capture_efx_open()
1580 unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data); in fx8010_pb_trans_copy()
1626 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_prepare() local
1633 emu->fx8010.etram_pages, runtime->dma_area, in snd_emu10k1_fx8010_playback_prepare()
1634 runtime->buffer_size, runtime->buffer_size << 2); in snd_emu10k1_fx8010_playback_prepare()
1643 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_size, 0, runtime->buffer_size); in snd_emu10k1_fx8010_playback_prepare()
1645 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_count, 0, runtime->period_size); in snd_emu10k1_fx8010_playback_prepare()
1646 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_tmpcount, 0, runtime->period_size); in snd_emu10k1_fx8010_playback_prepare()
1648 …80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pc… in snd_emu10k1_fx8010_playback_prepare()
1734 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_open() local
1737 runtime->hw = snd_emu10k1_fx8010_playback; in snd_emu10k1_fx8010_playback_open()
1738 runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels; in snd_emu10k1_fx8010_playback_open()
1739 runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2; in snd_emu10k1_fx8010_playback_open()