Lines Matching refs:runtime
74 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; in usX2Y_urb_capt_retire() local
94 if ((hwptr_done + len) > runtime->buffer_size) { in usX2Y_urb_capt_retire()
95 int cnt = runtime->buffer_size - hwptr_done; in usX2Y_urb_capt_retire()
97 memcpy(runtime->dma_area + hwptr_done * usX2Y->stride, cp, blen); in usX2Y_urb_capt_retire()
98 memcpy(runtime->dma_area, cp + blen, len * usX2Y->stride - blen); in usX2Y_urb_capt_retire()
100 memcpy(runtime->dma_area + hwptr_done * usX2Y->stride, cp, in usX2Y_urb_capt_retire()
104 if ((hwptr_done += len) >= runtime->buffer_size) in usX2Y_urb_capt_retire()
105 hwptr_done -= runtime->buffer_size; in usX2Y_urb_capt_retire()
111 if (subs->transfer_done >= runtime->period_size) { in usX2Y_urb_capt_retire()
112 subs->transfer_done -= runtime->period_size; in usX2Y_urb_capt_retire()
133 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; in usX2Y_urb_play_prepare() local
152 if (subs->hwptr + count > runtime->buffer_size) { in usX2Y_urb_play_prepare()
157 len = runtime->buffer_size - subs->hwptr; in usX2Y_urb_play_prepare()
159 memcpy(subs->tmpbuf, runtime->dma_area + in usX2Y_urb_play_prepare()
162 runtime->dma_area, (count - len) * usX2Y->stride); in usX2Y_urb_play_prepare()
164 subs->hwptr -= runtime->buffer_size; in usX2Y_urb_play_prepare()
167 urb->transfer_buffer = runtime->dma_area + subs->hwptr * usX2Y->stride; in usX2Y_urb_play_prepare()
168 if ((subs->hwptr += count) >= runtime->buffer_size) in usX2Y_urb_play_prepare()
169 subs->hwptr -= runtime->buffer_size; in usX2Y_urb_play_prepare()
184 struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime; in usX2Y_urb_play_retire() local
189 if (subs->hwptr_done >= runtime->buffer_size) in usX2Y_urb_play_retire()
190 subs->hwptr_done -= runtime->buffer_size; in usX2Y_urb_play_retire()
191 if (subs->transfer_done >= runtime->period_size) { in usX2Y_urb_play_retire()
192 subs->transfer_done -= runtime->period_size; in usX2Y_urb_play_retire()
525 struct snd_usX2Y_substream *subs = substream->runtime->private_data; in snd_usX2Y_pcm_pointer()
533 struct snd_usX2Y_substream *subs = substream->runtime->private_data; in snd_usX2Y_pcm_trigger()
766 !test_substream->runtime) in snd_usX2Y_pcm_hw_params()
768 if ((test_substream->runtime->format && in snd_usX2Y_pcm_hw_params()
769 test_substream->runtime->format != format) || in snd_usX2Y_pcm_hw_params()
770 (test_substream->runtime->rate && in snd_usX2Y_pcm_hw_params()
771 test_substream->runtime->rate != rate)) { in snd_usX2Y_pcm_hw_params()
795 struct snd_pcm_runtime *runtime = substream->runtime; in snd_usX2Y_pcm_hw_free() local
796 struct snd_usX2Y_substream *subs = runtime->private_data; in snd_usX2Y_pcm_hw_free()
805 !cap_subs->pcm_substream->runtime || in snd_usX2Y_pcm_hw_free()
806 !cap_subs->pcm_substream->runtime->status || in snd_usX2Y_pcm_hw_free()
807 cap_subs->pcm_substream->runtime->status->state < SNDRV_PCM_STATE_PREPARED) { in snd_usX2Y_pcm_hw_free()
828 struct snd_pcm_runtime *runtime = substream->runtime; in snd_usX2Y_pcm_prepare() local
829 struct snd_usX2Y_substream *subs = runtime->private_data; in snd_usX2Y_pcm_prepare()
840 if (usX2Y->format != runtime->format) in snd_usX2Y_pcm_prepare()
841 if ((err = usX2Y_format_set(usX2Y, runtime->format)) < 0) in snd_usX2Y_pcm_prepare()
843 if (usX2Y->rate != runtime->rate) in snd_usX2Y_pcm_prepare()
844 if ((err = usX2Y_rate_set(usX2Y, runtime->rate)) < 0) in snd_usX2Y_pcm_prepare()
885 struct snd_pcm_runtime *runtime = substream->runtime; in snd_usX2Y_pcm_open() local
890 runtime->hw = snd_usX2Y_2c; in snd_usX2Y_pcm_open()
891 runtime->private_data = subs; in snd_usX2Y_pcm_open()
893 snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_TIME, 1000, 200000); in snd_usX2Y_pcm_open()
901 struct snd_pcm_runtime *runtime = substream->runtime; in snd_usX2Y_pcm_close() local
902 struct snd_usX2Y_substream *subs = runtime->private_data; in snd_usX2Y_pcm_close()