Lines Matching full:runtime

33 			epcm->substream->runtime->hw->pointer(emu, epcm->substream),  in snd_emu10k1_pcm_interrupt()
45 if (emu->pcm_capture_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) in snd_emu10k1_pcm_ac97adc_interrupt()
57 if (emu->pcm_capture_mic_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) in snd_emu10k1_pcm_ac97mic_interrupt()
69 if (emu->pcm_capture_efx_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) in snd_emu10k1_pcm_efx_interrupt()
186 struct snd_pcm_runtime *runtime) in snd_emu10k1_constrain_capture_rates() argument
190 runtime->hw.rates = SNDRV_PCM_RATE_11025 | \ in snd_emu10k1_constrain_capture_rates()
193 runtime->hw.rate_min = 11025; in snd_emu10k1_constrain_capture_rates()
194 runtime->hw.rate_max = 44100; in snd_emu10k1_constrain_capture_rates()
196 runtime->hw.rates = SNDRV_PCM_RATE_8000_48000 | in snd_emu10k1_constrain_capture_rates()
203 struct snd_pcm_runtime *runtime) in snd_emu1010_constrain_efx_rate() argument
208 runtime->hw.rate_min = runtime->hw.rate_max = rate; in snd_emu1010_constrain_efx_rate()
209 runtime->hw.rates = snd_pcm_rate_to_rate_bit(rate); in snd_emu1010_constrain_efx_rate()
353 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_params() local
354 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_hw_params()
378 if (emu->iommu_workaround && runtime->dma_bytes >= EMUPAGESIZE) in snd_emu10k1_playback_hw_params()
379 runtime->dma_bytes -= EMUPAGESIZE; in snd_emu10k1_playback_hw_params()
399 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_free() local
402 if (runtime->private_data == NULL) in snd_emu10k1_playback_hw_free()
404 epcm = runtime->private_data; in snd_emu10k1_playback_hw_free()
422 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_prepare() local
423 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_prepare()
424 bool w_16 = snd_pcm_format_width(runtime->format) == 16; in snd_emu10k1_playback_prepare()
425 bool stereo = runtime->channels == 2; in snd_emu10k1_playback_prepare()
429 rate = runtime->rate; in snd_emu10k1_playback_prepare()
436 end_addr = start_addr + runtime->period_size; in snd_emu10k1_playback_prepare()
441 end_addr = start_addr + runtime->buffer_size; in snd_emu10k1_playback_prepare()
452 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_prepare() local
453 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_efx_playback_prepare()
462 extra_size = runtime->period_size; in snd_emu10k1_efx_playback_prepare()
463 channel_size = runtime->buffer_size; in snd_emu10k1_efx_playback_prepare()
469 for (i = 0; i < runtime->channels; i++) { in snd_emu10k1_efx_playback_prepare()
501 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_prepare() local
502 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_prepare()
516 epcm->capture_cr_val2 = 0xffffffff >> (32 - runtime->channels * 2); in snd_emu10k1_capture_prepare()
529 snd_emu10k1_ptr_write(emu, epcm->capture_ba_reg, 0, runtime->dma_addr); in snd_emu10k1_capture_prepare()
543 unsigned rate = runtime->rate; in snd_emu10k1_capture_prepare()
544 if (!(runtime->hw.rates & SNDRV_PCM_RATE_48000)) in snd_emu10k1_capture_prepare()
548 if (runtime->channels > 1) in snd_emu10k1_capture_prepare()
587 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_prepare_voices() local
590 unsigned eloop_size = runtime->period_size; in snd_emu10k1_playback_prepare_voices()
591 unsigned loop_size = runtime->buffer_size; in snd_emu10k1_playback_prepare_voices()
724 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_trigger() local
725 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_trigger()
727 bool w_16 = snd_pcm_format_width(runtime->format) == 16; in snd_emu10k1_playback_trigger()
728 bool stereo = runtime->channels == 2; in snd_emu10k1_playback_trigger()
769 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_trigger() local
770 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_trigger()
841 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_pointer() local
842 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_pointer()
856 // already read the buffer, and set runtime->delay accordingly. However, in snd_emu10k1_playback_pointer()
862 ptr += runtime->buffer_size; in snd_emu10k1_playback_pointer()
867 (long)ptr, (long)runtime->buffer_size, in snd_emu10k1_playback_pointer()
868 (long)runtime->period_size); in snd_emu10k1_playback_pointer()
921 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_trigger() local
922 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_efx_playback_trigger()
932 epcm, runtime->channels); in snd_emu10k1_efx_playback_trigger()
938 emu, epcm, runtime->channels); in snd_emu10k1_efx_playback_trigger()
940 emu, epcm, true, false, runtime->channels); in snd_emu10k1_efx_playback_trigger()
946 snd_emu10k1_efx_playback_unmute_voices(emu, epcm, runtime->channels); in snd_emu10k1_efx_playback_trigger()
957 emu, epcm, runtime->channels); in snd_emu10k1_efx_playback_trigger()
970 emu, epcm, runtime->channels); in snd_emu10k1_efx_playback_trigger()
987 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_pointer() local
988 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_pointer()
998 return bytes_to_frames(runtime, ptr); in snd_emu10k1_capture_pointer()
1101 static void snd_emu10k1_pcm_free_substream(struct snd_pcm_runtime *runtime) in snd_emu10k1_pcm_free_substream() argument
1103 kfree(runtime->private_data); in snd_emu10k1_pcm_free_substream()
1120 static int snd_emu10k1_playback_set_constraints(struct snd_pcm_runtime *runtime) in snd_emu10k1_playback_set_constraints() argument
1126 err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); in snd_emu10k1_playback_set_constraints()
1132 runtime, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 128, UINT_MAX); in snd_emu10k1_playback_set_constraints()
1141 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_open() local
1151 runtime->private_data = epcm; in snd_emu10k1_efx_playback_open()
1152 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_efx_playback_open()
1153 runtime->hw = snd_emu10k1_efx_playback; in snd_emu10k1_efx_playback_open()
1155 snd_emu1010_constrain_efx_rate(emu, runtime); in snd_emu10k1_efx_playback_open()
1156 err = snd_emu10k1_playback_set_constraints(runtime); in snd_emu10k1_efx_playback_open()
1180 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_open() local
1189 runtime->private_data = epcm; in snd_emu10k1_playback_open()
1190 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_playback_open()
1191 runtime->hw = snd_emu10k1_playback; in snd_emu10k1_playback_open()
1192 err = snd_emu10k1_playback_set_constraints(runtime); in snd_emu10k1_playback_open()
1201 err = snd_pcm_hw_rule_noresample(runtime, sample_rate); in snd_emu10k1_playback_open()
1231 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_open() local
1245 runtime->private_data = epcm; in snd_emu10k1_capture_open()
1246 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_open()
1247 runtime->hw = snd_emu10k1_capture; in snd_emu10k1_capture_open()
1248 snd_emu10k1_constrain_capture_rates(emu, runtime); in snd_emu10k1_capture_open()
1249 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, in snd_emu10k1_capture_open()
1269 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_mic_open() local
1282 substream->runtime->private_data = epcm; in snd_emu10k1_capture_mic_open()
1283 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_mic_open()
1284 runtime->hw = snd_emu10k1_capture; in snd_emu10k1_capture_mic_open()
1285 runtime->hw.rates = SNDRV_PCM_RATE_8000; in snd_emu10k1_capture_mic_open()
1286 runtime->hw.rate_min = runtime->hw.rate_max = 8000; in snd_emu10k1_capture_mic_open()
1287 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, in snd_emu10k1_capture_mic_open()
1307 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_efx_open() local
1322 substream->runtime->private_data = epcm; in snd_emu10k1_capture_efx_open()
1323 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_efx_open()
1324 runtime->hw = snd_emu10k1_capture_efx; in snd_emu10k1_capture_efx_open()
1326 snd_emu1010_constrain_efx_rate(emu, runtime); in snd_emu10k1_capture_efx_open()
1340 runtime->hw.channels_min = runtime->hw.channels_max = 4; in snd_emu10k1_capture_efx_open()
1344 runtime->hw.channels_min = runtime->hw.channels_max = 2; in snd_emu10k1_capture_efx_open()
1346 runtime->hw.formats = SNDRV_PCM_FMTBIT_S32_LE; in snd_emu10k1_capture_efx_open()
1349 runtime->hw.channels_min = runtime->hw.channels_max = 0; in snd_emu10k1_capture_efx_open()
1352 runtime->hw.channels_min++; in snd_emu10k1_capture_efx_open()
1353 runtime->hw.channels_max++; in snd_emu10k1_capture_efx_open()
1360 err = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, in snd_emu10k1_capture_efx_open()
1366 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, in snd_emu10k1_capture_efx_open()
1610 unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data); in fx8010_pb_trans_copy()
1656 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_prepare() local
1663 emu->fx8010.etram_pages, runtime->dma_area, in snd_emu10k1_fx8010_playback_prepare()
1664 runtime->buffer_size, runtime->buffer_size << 2); in snd_emu10k1_fx8010_playback_prepare()
1674 emu->gpr_base + pcm->gpr_size, runtime->buffer_size, in snd_emu10k1_fx8010_playback_prepare()
1676 emu->gpr_base + pcm->gpr_count, runtime->period_size, in snd_emu10k1_fx8010_playback_prepare()
1677 emu->gpr_base + pcm->gpr_tmpcount, runtime->period_size, in snd_emu10k1_fx8010_playback_prepare()
1680 …80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pc… in snd_emu10k1_fx8010_playback_prepare()
1766 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_open() local
1769 runtime->hw = snd_emu10k1_fx8010_playback; in snd_emu10k1_fx8010_playback_open()
1770 runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels; in snd_emu10k1_fx8010_playback_open()
1771 runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2; in snd_emu10k1_fx8010_playback_open()