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()
206 struct snd_pcm_runtime *runtime) in snd_emu10k1_constrain_capture_rates() argument
211 runtime->hw.rates = SNDRV_PCM_RATE_11025 | \ in snd_emu10k1_constrain_capture_rates()
214 runtime->hw.rate_min = 11025; in snd_emu10k1_constrain_capture_rates()
215 runtime->hw.rate_max = 44100; in snd_emu10k1_constrain_capture_rates()
218 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, in snd_emu10k1_constrain_capture_rates()
224 struct snd_pcm_runtime *runtime) in snd_emu1010_constrain_efx_rate() argument
229 runtime->hw.rate_min = runtime->hw.rate_max = rate; in snd_emu1010_constrain_efx_rate()
230 runtime->hw.rates = snd_pcm_rate_to_rate_bit(rate); in snd_emu1010_constrain_efx_rate()
374 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_params() local
375 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_hw_params()
399 if (emu->iommu_workaround && runtime->dma_bytes >= EMUPAGESIZE) in snd_emu10k1_playback_hw_params()
400 runtime->dma_bytes -= EMUPAGESIZE; in snd_emu10k1_playback_hw_params()
420 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_free() local
423 if (runtime->private_data == NULL) in snd_emu10k1_playback_hw_free()
425 epcm = runtime->private_data; in snd_emu10k1_playback_hw_free()
443 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_prepare() local
444 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_prepare()
445 bool w_16 = snd_pcm_format_width(runtime->format) == 16; in snd_emu10k1_playback_prepare()
446 bool stereo = runtime->channels == 2; in snd_emu10k1_playback_prepare()
450 rate = runtime->rate; in snd_emu10k1_playback_prepare()
457 end_addr = start_addr + runtime->period_size; in snd_emu10k1_playback_prepare()
462 end_addr = start_addr + runtime->buffer_size; in snd_emu10k1_playback_prepare()
473 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_prepare() local
474 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_efx_playback_prepare()
483 extra_size = runtime->period_size; in snd_emu10k1_efx_playback_prepare()
484 channel_size = runtime->buffer_size; in snd_emu10k1_efx_playback_prepare()
490 for (i = 0; i < runtime->channels; i++) { in snd_emu10k1_efx_playback_prepare()
522 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_prepare() local
523 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_prepare()
537 epcm->capture_cr_val2 = 0xffffffff >> (32 - runtime->channels * 2); in snd_emu10k1_capture_prepare()
550 snd_emu10k1_ptr_write(emu, epcm->capture_ba_reg, 0, runtime->dma_addr); in snd_emu10k1_capture_prepare()
564 unsigned rate = runtime->rate; in snd_emu10k1_capture_prepare()
565 if (!(runtime->hw.rates & SNDRV_PCM_RATE_48000)) in snd_emu10k1_capture_prepare()
569 if (runtime->channels > 1) in snd_emu10k1_capture_prepare()
608 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_prepare_voices() local
611 unsigned eloop_size = runtime->period_size; in snd_emu10k1_playback_prepare_voices()
612 unsigned loop_size = runtime->buffer_size; in snd_emu10k1_playback_prepare_voices()
745 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_trigger() local
746 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_trigger()
748 bool w_16 = snd_pcm_format_width(runtime->format) == 16; in snd_emu10k1_playback_trigger()
749 bool stereo = runtime->channels == 2; 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()
862 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_pointer() local
863 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_pointer()
877 // already read the buffer, and set runtime->delay accordingly. However, in snd_emu10k1_playback_pointer()
883 ptr += runtime->buffer_size; in snd_emu10k1_playback_pointer()
888 (long)ptr, (long)runtime->buffer_size, in snd_emu10k1_playback_pointer()
889 (long)runtime->period_size); in snd_emu10k1_playback_pointer()
942 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_trigger() local
943 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_efx_playback_trigger()
953 epcm, runtime->channels); in snd_emu10k1_efx_playback_trigger()
959 emu, epcm, runtime->channels); in snd_emu10k1_efx_playback_trigger()
961 emu, epcm, true, false, runtime->channels); in snd_emu10k1_efx_playback_trigger()
967 snd_emu10k1_efx_playback_unmute_voices(emu, epcm, runtime->channels); in snd_emu10k1_efx_playback_trigger()
978 emu, epcm, runtime->channels); in snd_emu10k1_efx_playback_trigger()
991 emu, epcm, runtime->channels); in snd_emu10k1_efx_playback_trigger()
1008 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_pointer() local
1009 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_pointer()
1019 return bytes_to_frames(runtime, ptr); in snd_emu10k1_capture_pointer()
1122 static void snd_emu10k1_pcm_free_substream(struct snd_pcm_runtime *runtime) in snd_emu10k1_pcm_free_substream() argument
1124 kfree(runtime->private_data); in snd_emu10k1_pcm_free_substream()
1141 static int snd_emu10k1_playback_set_constraints(struct snd_pcm_runtime *runtime) in snd_emu10k1_playback_set_constraints() argument
1147 err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); in snd_emu10k1_playback_set_constraints()
1153 runtime, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 128, UINT_MAX); in snd_emu10k1_playback_set_constraints()
1162 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_open() local
1172 runtime->private_data = epcm; in snd_emu10k1_efx_playback_open()
1173 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_efx_playback_open()
1174 runtime->hw = snd_emu10k1_efx_playback; in snd_emu10k1_efx_playback_open()
1176 snd_emu1010_constrain_efx_rate(emu, runtime); in snd_emu10k1_efx_playback_open()
1177 err = snd_emu10k1_playback_set_constraints(runtime); in snd_emu10k1_efx_playback_open()
1201 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_open() local
1210 runtime->private_data = epcm; in snd_emu10k1_playback_open()
1211 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_playback_open()
1212 runtime->hw = snd_emu10k1_playback; in snd_emu10k1_playback_open()
1213 err = snd_emu10k1_playback_set_constraints(runtime); in snd_emu10k1_playback_open()
1222 err = snd_pcm_hw_rule_noresample(runtime, sample_rate); in snd_emu10k1_playback_open()
1252 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_open() local
1266 runtime->private_data = epcm; in snd_emu10k1_capture_open()
1267 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_open()
1268 runtime->hw = snd_emu10k1_capture; in snd_emu10k1_capture_open()
1269 snd_emu10k1_constrain_capture_rates(emu, runtime); in snd_emu10k1_capture_open()
1270 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, in snd_emu10k1_capture_open()
1290 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_mic_open() local
1303 substream->runtime->private_data = epcm; in snd_emu10k1_capture_mic_open()
1304 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_mic_open()
1305 runtime->hw = snd_emu10k1_capture; in snd_emu10k1_capture_mic_open()
1306 runtime->hw.rates = SNDRV_PCM_RATE_8000; in snd_emu10k1_capture_mic_open()
1307 runtime->hw.rate_min = runtime->hw.rate_max = 8000; in snd_emu10k1_capture_mic_open()
1308 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, in snd_emu10k1_capture_mic_open()
1328 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_efx_open() local
1343 substream->runtime->private_data = epcm; in snd_emu10k1_capture_efx_open()
1344 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_efx_open()
1345 runtime->hw = snd_emu10k1_capture_efx; in snd_emu10k1_capture_efx_open()
1347 snd_emu1010_constrain_efx_rate(emu, runtime); in snd_emu10k1_capture_efx_open()
1361 runtime->hw.channels_min = runtime->hw.channels_max = 4; in snd_emu10k1_capture_efx_open()
1365 runtime->hw.channels_min = runtime->hw.channels_max = 2; in snd_emu10k1_capture_efx_open()
1367 runtime->hw.formats = SNDRV_PCM_FMTBIT_S32_LE; in snd_emu10k1_capture_efx_open()
1370 runtime->hw.channels_min = runtime->hw.channels_max = 0; in snd_emu10k1_capture_efx_open()
1373 runtime->hw.channels_min++; in snd_emu10k1_capture_efx_open()
1374 runtime->hw.channels_max++; in snd_emu10k1_capture_efx_open()
1381 err = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, in snd_emu10k1_capture_efx_open()
1387 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, in snd_emu10k1_capture_efx_open()
1631 unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data); in fx8010_pb_trans_copy()
1677 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_prepare() local
1684 emu->fx8010.etram_pages, runtime->dma_area, in snd_emu10k1_fx8010_playback_prepare()
1685 runtime->buffer_size, runtime->buffer_size << 2); in snd_emu10k1_fx8010_playback_prepare()
1695 emu->gpr_base + pcm->gpr_size, runtime->buffer_size, in snd_emu10k1_fx8010_playback_prepare()
1697 emu->gpr_base + pcm->gpr_count, runtime->period_size, in snd_emu10k1_fx8010_playback_prepare()
1698 emu->gpr_base + pcm->gpr_tmpcount, runtime->period_size, in snd_emu10k1_fx8010_playback_prepare()
1701 …80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pc… in snd_emu10k1_fx8010_playback_prepare()
1787 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_open() local
1790 runtime->hw = snd_emu10k1_fx8010_playback; in snd_emu10k1_fx8010_playback_open()
1791 runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels; in snd_emu10k1_fx8010_playback_open()
1792 runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2; in snd_emu10k1_fx8010_playback_open()