Lines Matching refs:runtime
111 vfree(substream->runtime->dma_area); in dsp_buffer_free()
112 substream->runtime->dma_area = NULL; in dsp_buffer_free()
113 substream->runtime->dma_bytes = 0; in dsp_buffer_free()
122 if (substream->runtime->dma_area) { in dsp_buffer_alloc()
123 if (substream->runtime->dma_bytes > size) in dsp_buffer_alloc()
129 substream->runtime->dma_area = vmalloc(size); in dsp_buffer_alloc()
130 if (!substream->runtime->dma_area) in dsp_buffer_alloc()
133 substream->runtime->dma_bytes = size; in dsp_buffer_alloc()
174 struct snd_pcm_runtime *runtime = substream->runtime; in snd_tm6000_pcm_open() local
177 err = snd_pcm_hw_constraint_pow2(runtime, 0, in snd_tm6000_pcm_open()
184 runtime->hw = snd_tm6000_digital_hw; in snd_tm6000_pcm_open()
185 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); in snd_tm6000_pcm_open()
213 struct snd_pcm_runtime *runtime; in tm6000_fillbuf() local
226 runtime = substream->runtime; in tm6000_fillbuf()
227 if (!runtime || !runtime->dma_area) { in tm6000_fillbuf()
233 stride = runtime->frame_bits >> 3; in tm6000_fillbuf()
247 runtime->dma_area, buf_pos, in tm6000_fillbuf()
248 (unsigned int)runtime->buffer_size, stride); in tm6000_fillbuf()
250 if (buf_pos + length >= runtime->buffer_size) { in tm6000_fillbuf()
251 unsigned int cnt = runtime->buffer_size - buf_pos; in tm6000_fillbuf()
252 memcpy(runtime->dma_area + buf_pos * stride, buf, cnt * stride); in tm6000_fillbuf()
253 memcpy(runtime->dma_area, buf + cnt * stride, in tm6000_fillbuf()
256 memcpy(runtime->dma_area + buf_pos * stride, buf, in tm6000_fillbuf()
262 if (chip->buf_pos >= runtime->buffer_size) in tm6000_fillbuf()
263 chip->buf_pos -= runtime->buffer_size; in tm6000_fillbuf()
266 if (chip->period_pos >= runtime->period_size) { in tm6000_fillbuf()
267 chip->period_pos -= runtime->period_size; in tm6000_fillbuf()
383 void *pageptr = subs->runtime->dma_area + offset; in snd_pcm_get_vmalloc_page()