Lines Matching refs:runtime
432 struct snd_pcm_runtime *runtime = substream->runtime; in snd_nm256_set_format() local
433 int rate_index = snd_nm256_fixed_rate(runtime->rate); in snd_nm256_set_format()
437 if (snd_pcm_format_width(runtime->format) == 16) { in snd_nm256_set_format()
441 if (runtime->channels > 1) { in snd_nm256_set_format()
446 runtime->rate = samplerates[rate_index]; in snd_nm256_set_format()
565 struct nm256_stream *s = substream->runtime->private_data; in snd_nm256_playback_trigger()
603 struct nm256_stream *s = substream->runtime->private_data; in snd_nm256_capture_trigger()
640 struct snd_pcm_runtime *runtime = substream->runtime; in snd_nm256_pcm_prepare() local
641 struct nm256_stream *s = runtime->private_data; in snd_nm256_pcm_prepare()
645 s->dma_size = frames_to_bytes(runtime, substream->runtime->buffer_size); in snd_nm256_pcm_prepare()
646 s->period_size = frames_to_bytes(runtime, substream->runtime->period_size); in snd_nm256_pcm_prepare()
647 s->periods = substream->runtime->periods; in snd_nm256_pcm_prepare()
666 struct nm256_stream *s = substream->runtime->private_data; in snd_nm256_playback_pointer()
673 return bytes_to_frames(substream->runtime, curp); in snd_nm256_playback_pointer()
680 struct nm256_stream *s = substream->runtime->private_data; in snd_nm256_capture_pointer()
687 return bytes_to_frames(substream->runtime, curp); in snd_nm256_capture_pointer()
702 struct snd_pcm_runtime *runtime = substream->runtime; in snd_nm256_playback_silence() local
703 struct nm256_stream *s = runtime->private_data; in snd_nm256_playback_silence()
704 count = frames_to_bytes(runtime, count); in snd_nm256_playback_silence()
705 pos = frames_to_bytes(runtime, pos); in snd_nm256_playback_silence()
717 struct snd_pcm_runtime *runtime = substream->runtime; in snd_nm256_playback_copy() local
718 struct nm256_stream *s = runtime->private_data; in snd_nm256_playback_copy()
719 count = frames_to_bytes(runtime, count); in snd_nm256_playback_copy()
720 pos = frames_to_bytes(runtime, pos); in snd_nm256_playback_copy()
736 struct snd_pcm_runtime *runtime = substream->runtime; in snd_nm256_capture_copy() local
737 struct nm256_stream *s = runtime->private_data; in snd_nm256_capture_copy()
738 count = frames_to_bytes(runtime, count); in snd_nm256_capture_copy()
739 pos = frames_to_bytes(runtime, pos); in snd_nm256_capture_copy()
829 substream->runtime->dma_bytes = params_buffer_bytes(hw_params); in snd_nm256_pcm_hw_params()
840 struct snd_pcm_runtime *runtime = substream->runtime; in snd_nm256_setup_stream() local
843 runtime->hw = *hw_ptr; in snd_nm256_setup_stream()
844 runtime->hw.buffer_bytes_max = s->bufsize; in snd_nm256_setup_stream()
845 runtime->hw.period_bytes_max = s->bufsize / 2; in snd_nm256_setup_stream()
846 runtime->dma_area = (void __force *) s->bufptr; in snd_nm256_setup_stream()
847 runtime->dma_addr = s->bufptr_addr; in snd_nm256_setup_stream()
848 runtime->dma_bytes = s->bufsize; in snd_nm256_setup_stream()
849 runtime->private_data = s; in snd_nm256_setup_stream()
852 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, in snd_nm256_setup_stream()