Lines Matching refs:runtime
408 void (*private_free)(struct snd_pcm_runtime *runtime);
462 struct snd_pcm_runtime *runtime; member
686 return (substream->runtime->status->state == SNDRV_PCM_STATE_RUNNING || in snd_pcm_running()
687 (substream->runtime->status->state == SNDRV_PCM_STATE_DRAINING && in snd_pcm_running()
696 static inline ssize_t bytes_to_samples(struct snd_pcm_runtime *runtime, ssize_t size) in bytes_to_samples() argument
698 return size * 8 / runtime->sample_bits; in bytes_to_samples()
706 static inline snd_pcm_sframes_t bytes_to_frames(struct snd_pcm_runtime *runtime, ssize_t size) in bytes_to_frames() argument
708 return size * 8 / runtime->frame_bits; in bytes_to_frames()
716 static inline ssize_t samples_to_bytes(struct snd_pcm_runtime *runtime, ssize_t size) in samples_to_bytes() argument
718 return size * runtime->sample_bits / 8; in samples_to_bytes()
726 static inline ssize_t frames_to_bytes(struct snd_pcm_runtime *runtime, snd_pcm_sframes_t size) in frames_to_bytes() argument
728 return size * runtime->frame_bits / 8; in frames_to_bytes()
736 static inline int frame_aligned(struct snd_pcm_runtime *runtime, ssize_t bytes) in frame_aligned() argument
738 return bytes % runtime->byte_align == 0; in frame_aligned()
747 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_lib_buffer_bytes() local
748 return frames_to_bytes(runtime, runtime->buffer_size); in snd_pcm_lib_buffer_bytes()
757 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_lib_period_bytes() local
758 return frames_to_bytes(runtime, runtime->period_size); in snd_pcm_lib_period_bytes()
767 static inline snd_pcm_uframes_t snd_pcm_playback_avail(struct snd_pcm_runtime *runtime) in snd_pcm_playback_avail() argument
769 …snd_pcm_sframes_t avail = runtime->status->hw_ptr + runtime->buffer_size - runtime->control->appl_… in snd_pcm_playback_avail()
771 avail += runtime->boundary; in snd_pcm_playback_avail()
772 else if ((snd_pcm_uframes_t) avail >= runtime->boundary) in snd_pcm_playback_avail()
773 avail -= runtime->boundary; in snd_pcm_playback_avail()
783 static inline snd_pcm_uframes_t snd_pcm_capture_avail(struct snd_pcm_runtime *runtime) in snd_pcm_capture_avail() argument
785 snd_pcm_sframes_t avail = runtime->status->hw_ptr - runtime->control->appl_ptr; in snd_pcm_capture_avail()
787 avail += runtime->boundary; in snd_pcm_capture_avail()
795 static inline snd_pcm_sframes_t snd_pcm_playback_hw_avail(struct snd_pcm_runtime *runtime) in snd_pcm_playback_hw_avail() argument
797 return runtime->buffer_size - snd_pcm_playback_avail(runtime); in snd_pcm_playback_hw_avail()
804 static inline snd_pcm_sframes_t snd_pcm_capture_hw_avail(struct snd_pcm_runtime *runtime) in snd_pcm_capture_hw_avail() argument
806 return runtime->buffer_size - snd_pcm_capture_avail(runtime); in snd_pcm_capture_hw_avail()
819 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_playback_ready() local
820 return snd_pcm_playback_avail(runtime) >= runtime->control->avail_min; in snd_pcm_playback_ready()
833 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_capture_ready() local
834 return snd_pcm_capture_avail(runtime) >= runtime->control->avail_min; in snd_pcm_capture_ready()
848 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_playback_data() local
850 if (runtime->stop_threshold >= runtime->boundary) in snd_pcm_playback_data()
852 return snd_pcm_playback_avail(runtime) < runtime->buffer_size; in snd_pcm_playback_data()
865 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_playback_empty() local
866 return snd_pcm_playback_avail(runtime) >= runtime->buffer_size; in snd_pcm_playback_empty()
879 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_capture_empty() local
880 return snd_pcm_capture_avail(runtime) == 0; in snd_pcm_capture_empty()
900 substream->runtime->trigger_master = master; in snd_pcm_trigger_done()
1007 int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
1009 int snd_pcm_hw_constraint_minmax(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
1011 int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var);
1012 int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime,
1016 int snd_pcm_hw_constraint_ranges(struct snd_pcm_runtime *runtime,
1020 int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime,
1024 int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime,
1028 int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime,
1032 int snd_pcm_hw_constraint_step(struct snd_pcm_runtime *runtime,
1036 int snd_pcm_hw_constraint_pow2(struct snd_pcm_runtime *runtime,
1039 int snd_pcm_hw_rule_noresample(struct snd_pcm_runtime *runtime,
1041 int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime,
1057 struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, in snd_pcm_hw_constraint_single() argument
1060 return snd_pcm_hw_constraint_minmax(runtime, var, val, val); in snd_pcm_hw_constraint_single()
1159 snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime) in snd_pcm_limit_hw_rates() argument
1161 return snd_pcm_hw_limit_rates(&runtime->hw); in snd_pcm_limit_hw_rates()
1182 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_set_runtime_buffer() local
1184 runtime->dma_buffer_p = bufp; in snd_pcm_set_runtime_buffer()
1185 runtime->dma_area = bufp->area; in snd_pcm_set_runtime_buffer()
1186 runtime->dma_addr = bufp->addr; in snd_pcm_set_runtime_buffer()
1187 runtime->dma_bytes = bufp->bytes; in snd_pcm_set_runtime_buffer()
1189 runtime->dma_buffer_p = NULL; in snd_pcm_set_runtime_buffer()
1190 runtime->dma_area = NULL; in snd_pcm_set_runtime_buffer()
1191 runtime->dma_addr = 0; in snd_pcm_set_runtime_buffer()
1192 runtime->dma_bytes = 0; in snd_pcm_set_runtime_buffer()
1201 static inline void snd_pcm_gettime(struct snd_pcm_runtime *runtime, in snd_pcm_gettime() argument
1204 switch (runtime->tstamp_type) { in snd_pcm_gettime()
1317 #define snd_pcm_get_dma_buf(substream) ((substream)->runtime->dma_buffer_p)