Lines Matching defs:runtime

476 static void snd_ca0106_pcm_free_substream(struct snd_pcm_runtime *runtime)
478 kfree(runtime->private_data);
553 struct snd_pcm_runtime *runtime = substream->runtime;
564 runtime->private_data = epcm;
565 runtime->private_free = snd_ca0106_pcm_free_substream;
567 runtime->hw = snd_ca0106_playback_hw;
579 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
581 if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0)
601 struct snd_pcm_runtime *runtime = substream->runtime;
602 struct snd_ca0106_pcm *epcm = runtime->private_data;
646 struct snd_pcm_runtime *runtime = substream->runtime;
657 runtime->private_data = epcm;
658 runtime->private_free = snd_ca0106_pcm_free_substream;
660 runtime->hw = snd_ca0106_capture_hw;
672 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
674 //snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_capture_period_sizes);
675 if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0)
684 struct snd_pcm_runtime *runtime = substream->runtime;
685 struct snd_ca0106_pcm *epcm = runtime->private_data;
715 struct snd_pcm_runtime *runtime = substream->runtime;
716 struct snd_ca0106_pcm *epcm = runtime->private_data;
719 u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size);
737 channel, runtime->rate, runtime->format,
738 runtime->channels, runtime->buffer_size,
739 runtime->period_size, runtime->periods,
740 frames_to_bytes(runtime, 1));
743 runtime->dma_addr, runtime->dma_area, table_base);
751 switch (runtime->rate) {
775 switch (runtime->format) {
797 for(i=0; i < runtime->periods; i++) {
798 table_base[i*2] = runtime->dma_addr + (i * period_size_bytes);
803 snd_ca0106_ptr_write(emu, PLAYBACK_LIST_SIZE, channel, (runtime->periods - 1) << 19);
805 snd_ca0106_ptr_write(emu, PLAYBACK_DMA_ADDR, channel, runtime->dma_addr);
806 snd_ca0106_ptr_write(emu, PLAYBACK_PERIOD_SIZE, channel, frames_to_bytes(runtime, runtime->period_size)<<16); // buffer size in bytes
828 struct snd_pcm_runtime *runtime = substream->runtime;
829 struct snd_ca0106_pcm *epcm = runtime->private_data;
844 channel, runtime->rate, runtime->format,
845 runtime->channels, runtime->buffer_size,
846 runtime->period_size, runtime->periods,
847 frames_to_bytes(runtime, 1));
850 runtime->dma_addr, runtime->dma_area, table_base);
856 switch (runtime->rate) {
877 switch (runtime->format) {
903 channel, runtime->rate, runtime->format, runtime->channels,
904 runtime->buffer_size, runtime->period_size,
905 frames_to_bytes(runtime, 1));
908 snd_ca0106_ptr_write(emu, CAPTURE_DMA_ADDR, channel, runtime->dma_addr);
909 snd_ca0106_ptr_write(emu, CAPTURE_BUFFER_SIZE, channel, frames_to_bytes(runtime, runtime->buffer_size)<<16); // buffer size in bytes
920 struct snd_pcm_runtime *runtime;
945 runtime = s->runtime;
946 epcm = runtime->private_data;
987 struct snd_pcm_runtime *runtime = substream->runtime;
988 struct snd_ca0106_pcm *epcm = runtime->private_data;
1015 struct snd_pcm_runtime *runtime = substream->runtime;
1016 struct snd_ca0106_pcm *epcm = runtime->private_data;
1027 ptr = (ptr >> 3) * runtime->period_size;
1028 ptr += bytes_to_frames(runtime,
1030 if (ptr >= runtime->buffer_size)
1031 ptr -= runtime->buffer_size;
1045 struct snd_pcm_runtime *runtime = substream->runtime;
1046 struct snd_ca0106_pcm *epcm = runtime->private_data;
1054 ptr2 = bytes_to_frames(runtime, ptr1);
1056 if (ptr >= runtime->buffer_size)
1057 ptr -= runtime->buffer_size;
1061 ptr1, ptr2, ptr, (int)runtime->buffer_size,
1062 (int)runtime->period_size, (int)runtime->frame_bits,
1063 (int)runtime->rate);