Lines Matching refs:runtime

49 			epcm->substream->runtime->hw->pointer(emu, epcm->substream),  in snd_emu10k1_pcm_interrupt()
61 if (emu->pcm_capture_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) in snd_emu10k1_pcm_ac97adc_interrupt()
73 if (emu->pcm_capture_mic_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) in snd_emu10k1_pcm_ac97mic_interrupt()
85 if (emu->pcm_capture_efx_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) in snd_emu10k1_pcm_efx_interrupt()
95 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_pointer() local
96 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_efx_playback_pointer()
102 ptr += runtime->buffer_size; in snd_emu10k1_efx_playback_pointer()
104 ptr %= runtime->buffer_size; in snd_emu10k1_efx_playback_pointer()
290 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_pcm_init_voice() local
300 stereo = runtime->channels == 2; in snd_emu10k1_pcm_init_voice()
301 w_16 = snd_pcm_format_width(runtime->format) == 16; in snd_emu10k1_pcm_init_voice()
370 pitch_target = emu10k1_calc_pitch_target(runtime->rate); in snd_emu10k1_pcm_init_voice()
412 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_params() local
413 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_hw_params()
439 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_free() local
442 if (runtime->private_data == NULL) in snd_emu10k1_playback_hw_free()
444 epcm = runtime->private_data; in snd_emu10k1_playback_hw_free()
469 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_hw_free() local
473 if (runtime->private_data == NULL) in snd_emu10k1_efx_playback_hw_free()
475 epcm = runtime->private_data; in snd_emu10k1_efx_playback_hw_free()
498 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_prepare() local
499 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_prepare()
504 if (runtime->channels == 2) { in snd_emu10k1_playback_prepare()
526 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_prepare() local
527 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_efx_playback_prepare()
593 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_prepare() local
594 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_prepare()
613 snd_emu10k1_ptr_write(emu, epcm->capture_ba_reg, 0, runtime->dma_addr); in snd_emu10k1_capture_prepare()
628 if (runtime->channels > 1) in snd_emu10k1_capture_prepare()
631 snd_emu10k1_audigy_capture_rate_reg(runtime->rate) : in snd_emu10k1_capture_prepare()
632 snd_emu10k1_capture_rate_reg(runtime->rate); in snd_emu10k1_capture_prepare()
639 struct snd_pcm_runtime *runtime; in snd_emu10k1_playback_invalidate_cache() local
644 runtime = evoice->epcm->substream->runtime; in snd_emu10k1_playback_invalidate_cache()
646 stereo = (!extra && runtime->channels == 2); in snd_emu10k1_playback_invalidate_cache()
647 sample = snd_pcm_format_width(runtime->format) == 16 ? 0 : 0x80808080; in snd_emu10k1_playback_invalidate_cache()
677 struct snd_pcm_runtime *runtime; in snd_emu10k1_playback_prepare_voice() local
684 runtime = substream->runtime; in snd_emu10k1_playback_prepare_voice()
688 tmp = runtime->channels == 2 ? (master ? 1 : 2) : 0; in snd_emu10k1_playback_prepare_voice()
700 struct snd_pcm_runtime *runtime; in snd_emu10k1_playback_trigger_voice() local
706 runtime = substream->runtime; in snd_emu10k1_playback_trigger_voice()
709 pitch = snd_emu10k1_rate_to_pitch(runtime->rate) >> 8; in snd_emu10k1_playback_trigger_voice()
713 pitch_target = emu10k1_calc_pitch_target(runtime->rate); in snd_emu10k1_playback_trigger_voice()
741 struct snd_pcm_runtime *runtime) in snd_emu10k1_playback_mangle_extra() argument
747 period_pos = runtime->status->hw_ptr - runtime->hw_ptr_interrupt; in snd_emu10k1_playback_mangle_extra()
748 period_pos %= runtime->period_size; in snd_emu10k1_playback_mangle_extra()
759 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_trigger() local
760 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_trigger()
778 snd_emu10k1_playback_mangle_extra(emu, epcm, substream, runtime); in snd_emu10k1_playback_trigger()
808 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_trigger() local
809 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_trigger()
876 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_pointer() local
877 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_playback_pointer()
884 ptr += runtime->buffer_size; in snd_emu10k1_playback_pointer()
886 ptr %= runtime->buffer_size; in snd_emu10k1_playback_pointer()
889 ptr += runtime->buffer_size - epcm->ccca_start_addr; in snd_emu10k1_playback_pointer()
892 if (ptr >= runtime->buffer_size) in snd_emu10k1_playback_pointer()
893 ptr -= runtime->buffer_size; in snd_emu10k1_playback_pointer()
910 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_trigger() local
911 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_efx_playback_trigger()
960 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_pointer() local
961 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_emu10k1_capture_pointer()
971 return bytes_to_frames(runtime, ptr); in snd_emu10k1_capture_pointer()
1077 static void snd_emu10k1_pcm_free_substream(struct snd_pcm_runtime *runtime) in snd_emu10k1_pcm_free_substream() argument
1079 kfree(runtime->private_data); in snd_emu10k1_pcm_free_substream()
1101 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_open() local
1113 runtime->private_data = epcm; in snd_emu10k1_efx_playback_open()
1114 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_efx_playback_open()
1115 runtime->hw = snd_emu10k1_efx_playback; in snd_emu10k1_efx_playback_open()
1134 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_open() local
1143 runtime->private_data = epcm; in snd_emu10k1_playback_open()
1144 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_playback_open()
1145 runtime->hw = snd_emu10k1_playback; in snd_emu10k1_playback_open()
1146 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) { in snd_emu10k1_playback_open()
1150 …if ((err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 256, UINT_MAX)) … in snd_emu10k1_playback_open()
1158 err = snd_pcm_hw_rule_noresample(runtime, sample_rate); in snd_emu10k1_playback_open()
1188 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_open() local
1202 runtime->private_data = epcm; in snd_emu10k1_capture_open()
1203 runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_open()
1204 runtime->hw = snd_emu10k1_capture; in snd_emu10k1_capture_open()
1207 …snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_pe… in snd_emu10k1_capture_open()
1208 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_capture_rates); in snd_emu10k1_capture_open()
1225 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_mic_open() local
1238 substream->runtime->private_data = epcm; in snd_emu10k1_capture_mic_open()
1239 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_mic_open()
1240 runtime->hw = snd_emu10k1_capture; in snd_emu10k1_capture_mic_open()
1241 runtime->hw.rates = SNDRV_PCM_RATE_8000; in snd_emu10k1_capture_mic_open()
1242 runtime->hw.rate_min = runtime->hw.rate_max = 8000; in snd_emu10k1_capture_mic_open()
1243 runtime->hw.channels_min = 1; in snd_emu10k1_capture_mic_open()
1246 …snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_pe… in snd_emu10k1_capture_mic_open()
1263 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_efx_open() local
1278 substream->runtime->private_data = epcm; in snd_emu10k1_capture_efx_open()
1279 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_efx_open()
1280 runtime->hw = snd_emu10k1_capture_efx; in snd_emu10k1_capture_efx_open()
1281 runtime->hw.rates = SNDRV_PCM_RATE_48000; in snd_emu10k1_capture_efx_open()
1282 runtime->hw.rate_min = runtime->hw.rate_max = 48000; in snd_emu10k1_capture_efx_open()
1310 runtime->hw.rates = SNDRV_PCM_RATE_44100; in snd_emu10k1_capture_efx_open()
1311 runtime->hw.rate_min = runtime->hw.rate_max = 44100; in snd_emu10k1_capture_efx_open()
1312 runtime->hw.channels_min = in snd_emu10k1_capture_efx_open()
1313 runtime->hw.channels_max = 16; in snd_emu10k1_capture_efx_open()
1317 runtime->hw.rates = SNDRV_PCM_RATE_48000; in snd_emu10k1_capture_efx_open()
1318 runtime->hw.rate_min = runtime->hw.rate_max = 48000; in snd_emu10k1_capture_efx_open()
1319 runtime->hw.channels_min = in snd_emu10k1_capture_efx_open()
1320 runtime->hw.channels_max = 16; in snd_emu10k1_capture_efx_open()
1326 runtime->hw.rates = SNDRV_PCM_RATE_96000; in snd_emu10k1_capture_efx_open()
1327 runtime->hw.rate_min = runtime->hw.rate_max = 96000; in snd_emu10k1_capture_efx_open()
1328 runtime->hw.channels_min = runtime->hw.channels_max = 4; in snd_emu10k1_capture_efx_open()
1332 runtime->hw.rates = SNDRV_PCM_RATE_192000; in snd_emu10k1_capture_efx_open()
1333 runtime->hw.rate_min = runtime->hw.rate_max = 192000; in snd_emu10k1_capture_efx_open()
1334 runtime->hw.channels_min = runtime->hw.channels_max = 2; in snd_emu10k1_capture_efx_open()
1336 runtime->hw.formats = SNDRV_PCM_FMTBIT_S32_LE; in snd_emu10k1_capture_efx_open()
1341 runtime->hw.channels_min = runtime->hw.channels_max = 0; in snd_emu10k1_capture_efx_open()
1344 runtime->hw.channels_min++; in snd_emu10k1_capture_efx_open()
1345 runtime->hw.channels_max++; in snd_emu10k1_capture_efx_open()
1354 …snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_pe… in snd_emu10k1_capture_efx_open()
1607 unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data); in fx8010_pb_trans_copy()
1660 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_prepare() local
1677 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_size, 0, runtime->buffer_size); in snd_emu10k1_fx8010_playback_prepare()
1679 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_count, 0, runtime->period_size); in snd_emu10k1_fx8010_playback_prepare()
1680 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_tmpcount, 0, runtime->period_size); in snd_emu10k1_fx8010_playback_prepare()
1682 …80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pc… in snd_emu10k1_fx8010_playback_prepare()
1767 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_open() local
1770 runtime->hw = snd_emu10k1_fx8010_playback; in snd_emu10k1_fx8010_playback_open()
1771 runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels; in snd_emu10k1_fx8010_playback_open()
1772 runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2; in snd_emu10k1_fx8010_playback_open()