• Home
  • Raw
  • Download

Lines Matching full:runtime

410 	void (*private_free)(struct snd_pcm_runtime *runtime);
460 /* -- runtime information -- */
461 struct snd_pcm_runtime *runtime; member
676 return (substream->runtime->status->state == SNDRV_PCM_STATE_RUNNING || in snd_pcm_running()
677 (substream->runtime->status->state == SNDRV_PCM_STATE_DRAINING && in snd_pcm_running()
683 * @runtime: PCM runtime instance
686 static inline ssize_t bytes_to_samples(struct snd_pcm_runtime *runtime, ssize_t size) in bytes_to_samples() argument
688 return size * 8 / runtime->sample_bits; in bytes_to_samples()
693 * @runtime: PCM runtime instance
696 static inline snd_pcm_sframes_t bytes_to_frames(struct snd_pcm_runtime *runtime, ssize_t size) in bytes_to_frames() argument
698 return size * 8 / runtime->frame_bits; in bytes_to_frames()
703 * @runtime: PCM runtime instance
706 static inline ssize_t samples_to_bytes(struct snd_pcm_runtime *runtime, ssize_t size) in samples_to_bytes() argument
708 return size * runtime->sample_bits / 8; in samples_to_bytes()
713 * @runtime: PCM runtime instance
716 static inline ssize_t frames_to_bytes(struct snd_pcm_runtime *runtime, snd_pcm_sframes_t size) in frames_to_bytes() argument
718 return size * runtime->frame_bits / 8; in frames_to_bytes()
723 * @runtime: PCM runtime instance
726 static inline int frame_aligned(struct snd_pcm_runtime *runtime, ssize_t bytes) in frame_aligned() argument
728 return bytes % runtime->byte_align == 0; in frame_aligned()
737 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_lib_buffer_bytes() local
738 return frames_to_bytes(runtime, runtime->buffer_size); in snd_pcm_lib_buffer_bytes()
747 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_lib_period_bytes() local
748 return frames_to_bytes(runtime, runtime->period_size); in snd_pcm_lib_period_bytes()
753 * @runtime: PCM runtime instance
757 static inline snd_pcm_uframes_t snd_pcm_playback_avail(struct snd_pcm_runtime *runtime) in snd_pcm_playback_avail() argument
759 …snd_pcm_sframes_t avail = runtime->status->hw_ptr + runtime->buffer_size - runtime->control->appl_… in snd_pcm_playback_avail()
761 avail += runtime->boundary; in snd_pcm_playback_avail()
762 else if ((snd_pcm_uframes_t) avail >= runtime->boundary) in snd_pcm_playback_avail()
763 avail -= runtime->boundary; in snd_pcm_playback_avail()
769 * @runtime: PCM runtime instance
773 static inline snd_pcm_uframes_t snd_pcm_capture_avail(struct snd_pcm_runtime *runtime) in snd_pcm_capture_avail() argument
775 snd_pcm_sframes_t avail = runtime->status->hw_ptr - runtime->control->appl_ptr; in snd_pcm_capture_avail()
777 avail += runtime->boundary; in snd_pcm_capture_avail()
783 * @runtime: PCM runtime instance
785 static inline snd_pcm_sframes_t snd_pcm_playback_hw_avail(struct snd_pcm_runtime *runtime) in snd_pcm_playback_hw_avail() argument
787 return runtime->buffer_size - snd_pcm_playback_avail(runtime); in snd_pcm_playback_hw_avail()
792 * @runtime: PCM runtime instance
794 static inline snd_pcm_sframes_t snd_pcm_capture_hw_avail(struct snd_pcm_runtime *runtime) in snd_pcm_capture_hw_avail() argument
796 return runtime->buffer_size - snd_pcm_capture_avail(runtime); in snd_pcm_capture_hw_avail()
809 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_playback_ready() local
810 return snd_pcm_playback_avail(runtime) >= runtime->control->avail_min; in snd_pcm_playback_ready()
823 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_capture_ready() local
824 return snd_pcm_capture_avail(runtime) >= runtime->control->avail_min; in snd_pcm_capture_ready()
838 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_playback_data() local
840 if (runtime->stop_threshold >= runtime->boundary) in snd_pcm_playback_data()
842 return snd_pcm_playback_avail(runtime) < runtime->buffer_size; in snd_pcm_playback_data()
855 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_playback_empty() local
856 return snd_pcm_playback_avail(runtime) >= runtime->buffer_size; in snd_pcm_playback_empty()
869 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_capture_empty() local
870 return snd_pcm_capture_avail(runtime) == 0; in snd_pcm_capture_empty()
890 substream->runtime->trigger_master = master; in snd_pcm_trigger_done()
997 int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
999 int snd_pcm_hw_constraint_minmax(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
1001 int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var);
1002 int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime,
1006 int snd_pcm_hw_constraint_ranges(struct snd_pcm_runtime *runtime,
1010 int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime,
1014 int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime,
1018 int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime,
1022 int snd_pcm_hw_constraint_step(struct snd_pcm_runtime *runtime,
1026 int snd_pcm_hw_constraint_pow2(struct snd_pcm_runtime *runtime,
1029 int snd_pcm_hw_rule_noresample(struct snd_pcm_runtime *runtime,
1031 int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime,
1039 * @runtime: PCM runtime instance
1047 struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, in snd_pcm_hw_constraint_single() argument
1050 return snd_pcm_hw_constraint_minmax(runtime, var, val, val); in snd_pcm_hw_constraint_single()
1145 int snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime);
1154 * snd_pcm_set_runtime_buffer - Set the PCM runtime buffer
1158 * Copy the buffer information to runtime->dma_buffer when @bufp is non-NULL.
1164 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_set_runtime_buffer() local
1166 runtime->dma_buffer_p = bufp; in snd_pcm_set_runtime_buffer()
1167 runtime->dma_area = bufp->area; in snd_pcm_set_runtime_buffer()
1168 runtime->dma_addr = bufp->addr; in snd_pcm_set_runtime_buffer()
1169 runtime->dma_bytes = bufp->bytes; in snd_pcm_set_runtime_buffer()
1171 runtime->dma_buffer_p = NULL; in snd_pcm_set_runtime_buffer()
1172 runtime->dma_area = NULL; in snd_pcm_set_runtime_buffer()
1173 runtime->dma_addr = 0; in snd_pcm_set_runtime_buffer()
1174 runtime->dma_bytes = 0; in snd_pcm_set_runtime_buffer()
1180 * @runtime: PCM runtime instance
1183 static inline void snd_pcm_gettime(struct snd_pcm_runtime *runtime, in snd_pcm_gettime() argument
1186 switch (runtime->tstamp_type) { in snd_pcm_gettime()
1256 #define snd_pcm_get_dma_buf(substream) ((substream)->runtime->dma_buffer_p)
1364 #define PCM_RUNTIME_CHECK(sub) snd_BUG_ON(!(sub) || !(sub)->runtime)