Lines Matching refs:runtime
490 static void snd_ca0106_pcm_free_substream(struct snd_pcm_runtime *runtime) in snd_ca0106_pcm_free_substream() argument
492 kfree(runtime->private_data); in snd_ca0106_pcm_free_substream()
566 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_open_playback_channel() local
577 runtime->private_data = epcm; in snd_ca0106_pcm_open_playback_channel()
578 runtime->private_free = snd_ca0106_pcm_free_substream; in snd_ca0106_pcm_open_playback_channel()
580 runtime->hw = snd_ca0106_playback_hw; in snd_ca0106_pcm_open_playback_channel()
592 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) in snd_ca0106_pcm_open_playback_channel()
594 if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0) in snd_ca0106_pcm_open_playback_channel()
614 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_close_playback() local
615 struct snd_ca0106_pcm *epcm = runtime->private_data; in snd_ca0106_pcm_close_playback()
659 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_open_capture_channel() local
672 runtime->private_data = epcm; in snd_ca0106_pcm_open_capture_channel()
673 runtime->private_free = snd_ca0106_pcm_free_substream; in snd_ca0106_pcm_open_capture_channel()
675 runtime->hw = snd_ca0106_capture_hw; in snd_ca0106_pcm_open_capture_channel()
687 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) in snd_ca0106_pcm_open_capture_channel()
690 if ((err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64)) < 0) in snd_ca0106_pcm_open_capture_channel()
699 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_close_capture() local
700 struct snd_ca0106_pcm *epcm = runtime->private_data; in snd_ca0106_pcm_close_capture()
758 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_prepare_playback() local
759 struct snd_ca0106_pcm *epcm = runtime->private_data; in snd_ca0106_pcm_prepare_playback()
762 u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size); in snd_ca0106_pcm_prepare_playback()
780 channel, runtime->rate, runtime->format, in snd_ca0106_pcm_prepare_playback()
781 runtime->channels, runtime->buffer_size, in snd_ca0106_pcm_prepare_playback()
782 runtime->period_size, runtime->periods, in snd_ca0106_pcm_prepare_playback()
783 frames_to_bytes(runtime, 1)); in snd_ca0106_pcm_prepare_playback()
786 runtime->dma_addr, runtime->dma_area, table_base); in snd_ca0106_pcm_prepare_playback()
794 switch (runtime->rate) { in snd_ca0106_pcm_prepare_playback()
818 switch (runtime->format) { in snd_ca0106_pcm_prepare_playback()
840 for(i=0; i < runtime->periods; i++) { in snd_ca0106_pcm_prepare_playback()
841 table_base[i*2] = runtime->dma_addr + (i * period_size_bytes); in snd_ca0106_pcm_prepare_playback()
846 snd_ca0106_ptr_write(emu, PLAYBACK_LIST_SIZE, channel, (runtime->periods - 1) << 19); in snd_ca0106_pcm_prepare_playback()
848 snd_ca0106_ptr_write(emu, PLAYBACK_DMA_ADDR, channel, runtime->dma_addr); in snd_ca0106_pcm_prepare_playback()
849 …snd_ca0106_ptr_write(emu, PLAYBACK_PERIOD_SIZE, channel, frames_to_bytes(runtime, runtime->period_… in snd_ca0106_pcm_prepare_playback()
871 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_prepare_capture() local
872 struct snd_ca0106_pcm *epcm = runtime->private_data; in snd_ca0106_pcm_prepare_capture()
887 channel, runtime->rate, runtime->format, in snd_ca0106_pcm_prepare_capture()
888 runtime->channels, runtime->buffer_size, in snd_ca0106_pcm_prepare_capture()
889 runtime->period_size, runtime->periods, in snd_ca0106_pcm_prepare_capture()
890 frames_to_bytes(runtime, 1)); in snd_ca0106_pcm_prepare_capture()
893 runtime->dma_addr, runtime->dma_area, table_base); in snd_ca0106_pcm_prepare_capture()
899 switch (runtime->rate) { in snd_ca0106_pcm_prepare_capture()
920 switch (runtime->format) { in snd_ca0106_pcm_prepare_capture()
951 snd_ca0106_ptr_write(emu, CAPTURE_DMA_ADDR, channel, runtime->dma_addr); in snd_ca0106_pcm_prepare_capture()
952 …snd_ca0106_ptr_write(emu, CAPTURE_BUFFER_SIZE, channel, frames_to_bytes(runtime, runtime->buffer_s… in snd_ca0106_pcm_prepare_capture()
963 struct snd_pcm_runtime *runtime; in snd_ca0106_pcm_trigger_playback() local
988 runtime = s->runtime; in snd_ca0106_pcm_trigger_playback()
989 epcm = runtime->private_data; in snd_ca0106_pcm_trigger_playback()
1030 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_trigger_capture() local
1031 struct snd_ca0106_pcm *epcm = runtime->private_data; in snd_ca0106_pcm_trigger_capture()
1058 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_pointer_playback() local
1059 struct snd_ca0106_pcm *epcm = runtime->private_data; in snd_ca0106_pcm_pointer_playback()
1070 ptr = (ptr >> 3) * runtime->period_size; in snd_ca0106_pcm_pointer_playback()
1071 ptr += bytes_to_frames(runtime, in snd_ca0106_pcm_pointer_playback()
1073 if (ptr >= runtime->buffer_size) in snd_ca0106_pcm_pointer_playback()
1074 ptr -= runtime->buffer_size; in snd_ca0106_pcm_pointer_playback()
1088 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_pointer_capture() local
1089 struct snd_ca0106_pcm *epcm = runtime->private_data; in snd_ca0106_pcm_pointer_capture()
1097 ptr2 = bytes_to_frames(runtime, ptr1); in snd_ca0106_pcm_pointer_capture()
1099 if (ptr >= runtime->buffer_size) in snd_ca0106_pcm_pointer_capture()
1100 ptr -= runtime->buffer_size; in snd_ca0106_pcm_pointer_capture()