Lines Matching defs:runtime
475 static void snd_ca0106_pcm_free_substream(struct snd_pcm_runtime *runtime)
477 kfree(runtime->private_data);
552 struct snd_pcm_runtime *runtime = substream->runtime;
563 runtime->private_data = epcm;
564 runtime->private_free = snd_ca0106_pcm_free_substream;
566 runtime->hw = snd_ca0106_playback_hw;
578 err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
581 err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64);
602 struct snd_pcm_runtime *runtime = substream->runtime;
603 struct snd_ca0106_pcm *epcm = runtime->private_data;
647 struct snd_pcm_runtime *runtime = substream->runtime;
658 runtime->private_data = epcm;
659 runtime->private_free = snd_ca0106_pcm_free_substream;
661 runtime->hw = snd_ca0106_capture_hw;
673 err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
676 //snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_capture_period_sizes);
677 err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64);
687 struct snd_pcm_runtime *runtime = substream->runtime;
688 struct snd_ca0106_pcm *epcm = runtime->private_data;
718 struct snd_pcm_runtime *runtime = substream->runtime;
719 struct snd_ca0106_pcm *epcm = runtime->private_data;
722 u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size);
740 channel, runtime->rate, runtime->format,
741 runtime->channels, runtime->buffer_size,
742 runtime->period_size, runtime->periods,
743 frames_to_bytes(runtime, 1));
746 runtime->dma_addr, runtime->dma_area, table_base);
754 switch (runtime->rate) {
778 switch (runtime->format) {
800 for(i=0; i < runtime->periods; i++) {
801 table_base[i*2] = runtime->dma_addr + (i * period_size_bytes);
806 snd_ca0106_ptr_write(emu, PLAYBACK_LIST_SIZE, channel, (runtime->periods - 1) << 19);
808 snd_ca0106_ptr_write(emu, PLAYBACK_DMA_ADDR, channel, runtime->dma_addr);
809 snd_ca0106_ptr_write(emu, PLAYBACK_PERIOD_SIZE, channel, frames_to_bytes(runtime, runtime->period_size)<<16); // buffer size in bytes
831 struct snd_pcm_runtime *runtime = substream->runtime;
832 struct snd_ca0106_pcm *epcm = runtime->private_data;
847 channel, runtime->rate, runtime->format,
848 runtime->channels, runtime->buffer_size,
849 runtime->period_size, runtime->periods,
850 frames_to_bytes(runtime, 1));
853 runtime->dma_addr, runtime->dma_area, table_base);
859 switch (runtime->rate) {
880 switch (runtime->format) {
906 channel, runtime->rate, runtime->format, runtime->channels,
907 runtime->buffer_size, runtime->period_size,
908 frames_to_bytes(runtime, 1));
911 snd_ca0106_ptr_write(emu, CAPTURE_DMA_ADDR, channel, runtime->dma_addr);
912 snd_ca0106_ptr_write(emu, CAPTURE_BUFFER_SIZE, channel, frames_to_bytes(runtime, runtime->buffer_size)<<16); // buffer size in bytes
923 struct snd_pcm_runtime *runtime;
948 runtime = s->runtime;
949 epcm = runtime->private_data;
990 struct snd_pcm_runtime *runtime = substream->runtime;
991 struct snd_ca0106_pcm *epcm = runtime->private_data;
1018 struct snd_pcm_runtime *runtime = substream->runtime;
1019 struct snd_ca0106_pcm *epcm = runtime->private_data;
1030 ptr = (ptr >> 3) * runtime->period_size;
1031 ptr += bytes_to_frames(runtime,
1033 if (ptr >= runtime->buffer_size)
1034 ptr -= runtime->buffer_size;
1048 struct snd_pcm_runtime *runtime = substream->runtime;
1049 struct snd_ca0106_pcm *epcm = runtime->private_data;
1057 ptr2 = bytes_to_frames(runtime, ptr1);
1059 if (ptr >= runtime->buffer_size)
1060 ptr -= runtime->buffer_size;
1064 ptr1, ptr2, ptr, (int)runtime->buffer_size,
1065 (int)runtime->period_size, (int)runtime->frame_bits,
1066 (int)runtime->rate);