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