Lines Matching refs:runtime

115 	struct snd_pcm_runtime *runtime;  in cobalt_alsa_announce_pcm_data()  local
132 runtime = substream->runtime; in cobalt_alsa_announce_pcm_data()
133 if (runtime == NULL) { in cobalt_alsa_announce_pcm_data()
137 is_s32 = runtime->format == SNDRV_PCM_FORMAT_S32_LE; in cobalt_alsa_announce_pcm_data()
139 stride = runtime->frame_bits >> 3; in cobalt_alsa_announce_pcm_data()
150 if (runtime->dma_area == NULL) { in cobalt_alsa_announce_pcm_data()
156 if (oldptr + length >= runtime->buffer_size) { in cobalt_alsa_announce_pcm_data()
157 unsigned int cnt = runtime->buffer_size - oldptr; in cobalt_alsa_announce_pcm_data()
161 sample_cpy(runtime->dma_area + (oldptr + i) * stride, in cobalt_alsa_announce_pcm_data()
165 sample_cpy(runtime->dma_area + (i - cnt) * stride, in cobalt_alsa_announce_pcm_data()
171 sample_cpy(runtime->dma_area + (oldptr + i) * stride, in cobalt_alsa_announce_pcm_data()
179 runtime->buffer_size) in cobalt_alsa_announce_pcm_data()
181 runtime->buffer_size; in cobalt_alsa_announce_pcm_data()
185 runtime->period_size) { in cobalt_alsa_announce_pcm_data()
187 runtime->period_size; in cobalt_alsa_announce_pcm_data()
221 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cobalt_pcm_capture_open() local
225 runtime->hw = snd_cobalt_hdmi_capture; in snd_cobalt_pcm_capture_open()
226 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); in snd_cobalt_pcm_capture_open()
228 runtime->private_data = s; in snd_cobalt_pcm_capture_open()
263 struct snd_pcm_runtime *runtime = subs->runtime; in snd_pcm_alloc_vmalloc_buffer() local
266 if (runtime->dma_area) { in snd_pcm_alloc_vmalloc_buffer()
267 if (runtime->dma_bytes > size) in snd_pcm_alloc_vmalloc_buffer()
270 vfree(runtime->dma_area); in snd_pcm_alloc_vmalloc_buffer()
272 runtime->dma_area = vmalloc(size); in snd_pcm_alloc_vmalloc_buffer()
273 if (!runtime->dma_area) in snd_pcm_alloc_vmalloc_buffer()
276 runtime->dma_bytes = size; in snd_pcm_alloc_vmalloc_buffer()
292 if (substream->runtime->dma_area) { in snd_cobalt_pcm_hw_free()
294 vfree(substream->runtime->dma_area); in snd_cobalt_pcm_hw_free()
295 substream->runtime->dma_area = NULL; in snd_cobalt_pcm_hw_free()
363 struct snd_pcm_runtime *runtime; in cobalt_alsa_pb_pcm_data() local
379 runtime = substream->runtime; in cobalt_alsa_pb_pcm_data()
380 if (runtime == NULL) { in cobalt_alsa_pb_pcm_data()
385 is_s32 = runtime->format == SNDRV_PCM_FORMAT_S32_LE; in cobalt_alsa_pb_pcm_data()
386 stride = runtime->frame_bits >> 3; in cobalt_alsa_pb_pcm_data()
397 if (runtime->dma_area == NULL) { in cobalt_alsa_pb_pcm_data()
405 runtime->dma_area + pos + i * stride, in cobalt_alsa_pb_pcm_data()
431 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cobalt_pcm_playback_open() local
434 runtime->hw = snd_cobalt_playback; in snd_cobalt_pcm_playback_open()
435 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); in snd_cobalt_pcm_playback_open()
437 runtime->private_data = s; in snd_cobalt_pcm_playback_open()
501 return bytes_to_frames(substream->runtime, ptr) % in snd_cobalt_pcm_pb_pointer()
502 substream->runtime->buffer_size; in snd_cobalt_pcm_pb_pointer()
508 void *pageptr = subs->runtime->dma_area + offset; in snd_pcm_get_vmalloc_page()