Lines Matching defs:runtime

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