Lines Matching refs:runtime
200 struct snd_pcm_runtime *runtime, *cruntime; in loopback_check_format() local
210 runtime = cable->streams[SNDRV_PCM_STREAM_PLAYBACK]-> in loopback_check_format()
211 substream->runtime; in loopback_check_format()
213 substream->runtime; in loopback_check_format()
214 check = runtime->format != cruntime->format || in loopback_check_format()
215 runtime->rate != cruntime->rate || in loopback_check_format()
216 runtime->channels != cruntime->channels; in loopback_check_format()
225 runtime = cable->streams[SNDRV_PCM_STREAM_PLAYBACK]-> in loopback_check_format()
226 substream->runtime; in loopback_check_format()
229 if (setup->format != runtime->format) { in loopback_check_format()
232 setup->format = runtime->format; in loopback_check_format()
234 if (setup->rate != runtime->rate) { in loopback_check_format()
237 setup->rate = runtime->rate; in loopback_check_format()
239 if (setup->channels != runtime->channels) { in loopback_check_format()
242 setup->channels = runtime->channels; in loopback_check_format()
257 struct snd_pcm_runtime *runtime = substream->runtime; in loopback_trigger() local
258 struct loopback_pcm *dpcm = runtime->private_data; in loopback_trigger()
309 struct snd_pcm_runtime *runtime) in params_change_substream() argument
315 dst_runtime = dpcm->substream->runtime; in params_change_substream()
323 struct snd_pcm_runtime *runtime = substream->runtime; in params_change() local
324 struct loopback_pcm *dpcm = runtime->private_data; in params_change()
327 cable->hw.formats = pcm_format_to_bits(runtime->format); in params_change()
328 cable->hw.rate_min = runtime->rate; in params_change()
329 cable->hw.rate_max = runtime->rate; in params_change()
330 cable->hw.channels_min = runtime->channels; in params_change()
331 cable->hw.channels_max = runtime->channels; in params_change()
333 runtime); in params_change()
335 runtime); in params_change()
340 struct snd_pcm_runtime *runtime = substream->runtime; in loopback_prepare() local
341 struct loopback_pcm *dpcm = runtime->private_data; in loopback_prepare()
345 salign = (snd_pcm_format_width(runtime->format) * in loopback_prepare()
346 runtime->channels) / 8; in loopback_prepare()
347 bps = salign * runtime->rate; in loopback_prepare()
352 dpcm->pcm_buffer_size = frames_to_bytes(runtime, runtime->buffer_size); in loopback_prepare()
356 snd_pcm_format_set_silence(runtime->format, runtime->dma_area, in loopback_prepare()
357 runtime->buffer_size * runtime->channels); in loopback_prepare()
364 dpcm->pcm_period_size = frames_to_bytes(runtime, runtime->period_size); in loopback_prepare()
379 struct snd_pcm_runtime *runtime = dpcm->substream->runtime; in clear_capture_buf() local
380 char *dst = runtime->dma_area; in clear_capture_buf()
392 snd_pcm_format_set_silence(runtime->format, dst + dst_off, in clear_capture_buf()
393 bytes_to_frames(runtime, size) * in clear_capture_buf()
394 runtime->channels); in clear_capture_buf()
407 struct snd_pcm_runtime *runtime = play->substream->runtime; in copy_play_buf() local
408 char *src = runtime->dma_area; in copy_play_buf()
409 char *dst = capt->substream->runtime->dma_area; in copy_play_buf()
416 if (runtime->status->state == SNDRV_PCM_STATE_DRAINING && in copy_play_buf()
417 snd_pcm_playback_hw_avail(runtime) < runtime->buffer_size) { in copy_play_buf()
419 appl_ptr = appl_ptr1 = runtime->control->appl_ptr; in copy_play_buf()
420 appl_ptr1 -= appl_ptr1 % runtime->buffer_size; in copy_play_buf()
423 appl_ptr1 -= runtime->buffer_size; in copy_play_buf()
553 struct snd_pcm_runtime *runtime = substream->runtime; in loopback_pointer() local
554 struct loopback_pcm *dpcm = runtime->private_data; in loopback_pointer()
561 return bytes_to_frames(runtime, pos); in loopback_pointer()
587 static void loopback_runtime_free(struct snd_pcm_runtime *runtime) in loopback_runtime_free() argument
589 struct loopback_pcm *dpcm = runtime->private_data; in loopback_runtime_free()
602 struct snd_pcm_runtime *runtime = substream->runtime; in loopback_hw_free() local
603 struct loopback_pcm *dpcm = runtime->private_data; in loopback_hw_free()
663 struct snd_pcm_runtime *runtime = substream->runtime; in loopback_open() local
696 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); in loopback_open()
701 err = snd_pcm_hw_rule_add(runtime, 0, in loopback_open()
703 rule_format, &runtime->hw, in loopback_open()
707 err = snd_pcm_hw_rule_add(runtime, 0, in loopback_open()
709 rule_rate, &runtime->hw, in loopback_open()
713 err = snd_pcm_hw_rule_add(runtime, 0, in loopback_open()
715 rule_channels, &runtime->hw, in loopback_open()
720 runtime->private_data = dpcm; in loopback_open()
721 runtime->private_free = loopback_runtime_free; in loopback_open()
723 runtime->hw = loopback_pcm_hardware; in loopback_open()
725 runtime->hw = cable->hw; in loopback_open()
734 struct loopback_pcm *dpcm = substream->runtime->private_data; in loopback_close()