Lines Matching defs:runtime
323 struct snd_pcm_runtime *runtime, *cruntime;
333 runtime = cable->streams[SNDRV_PCM_STREAM_PLAYBACK]->
334 substream->runtime;
336 substream->runtime;
337 check = runtime->format != cruntime->format ||
338 runtime->rate != cruntime->rate ||
339 runtime->channels != cruntime->channels;
348 runtime = cable->streams[SNDRV_PCM_STREAM_PLAYBACK]->
349 substream->runtime;
352 if (setup->format != runtime->format) {
355 setup->format = runtime->format;
357 if (setup->rate != runtime->rate) {
360 setup->rate = runtime->rate;
362 if (setup->channels != runtime->channels) {
365 setup->channels = runtime->channels;
380 struct snd_pcm_runtime *runtime = substream->runtime;
381 struct loopback_pcm *dpcm = runtime->private_data;
437 struct snd_pcm_runtime *runtime = substream->runtime;
438 struct loopback_pcm *dpcm = runtime->private_data;
441 cable->hw.formats = pcm_format_to_bits(runtime->format);
442 cable->hw.rate_min = runtime->rate;
443 cable->hw.rate_max = runtime->rate;
444 cable->hw.channels_min = runtime->channels;
445 cable->hw.channels_max = runtime->channels;
449 frames_to_bytes(runtime, runtime->period_size);
457 struct snd_pcm_runtime *runtime = substream->runtime;
458 struct loopback_pcm *dpcm = runtime->private_data;
468 salign = (snd_pcm_format_physical_width(runtime->format) *
469 runtime->channels) / 8;
470 bps = salign * runtime->rate;
475 dpcm->pcm_buffer_size = frames_to_bytes(runtime, runtime->buffer_size);
479 snd_pcm_format_set_silence(runtime->format, runtime->dma_area,
480 runtime->buffer_size * runtime->channels);
487 dpcm->pcm_period_size = frames_to_bytes(runtime, runtime->period_size);
502 struct snd_pcm_runtime *runtime = dpcm->substream->runtime;
503 char *dst = runtime->dma_area;
515 snd_pcm_format_set_silence(runtime->format, dst + dst_off,
516 bytes_to_frames(runtime, size) *
517 runtime->channels);
530 struct snd_pcm_runtime *runtime = play->substream->runtime;
531 char *src = runtime->dma_area;
532 char *dst = capt->substream->runtime->dma_area;
539 if (runtime->status->state == SNDRV_PCM_STATE_DRAINING &&
540 snd_pcm_playback_hw_avail(runtime) < runtime->buffer_size) {
542 appl_ptr = appl_ptr1 = runtime->control->appl_ptr;
543 appl_ptr1 -= appl_ptr1 % runtime->buffer_size;
546 appl_ptr1 -= runtime->buffer_size;
678 static int loopback_snd_timer_check_resolution(struct snd_pcm_runtime *runtime,
681 if (resolution != runtime->timer_resolution) {
682 struct loopback_pcm *dpcm = runtime->private_data;
694 resolution / 1000 * runtime->rate;
701 runtime->period_size, resolution, period_size,
734 dpcm_play->substream->runtime->status->state !=
746 dpcm_play->substream->runtime :
747 dpcm_capt->substream->runtime;
866 struct snd_pcm_runtime *runtime = substream->runtime;
867 struct loopback_pcm *dpcm = runtime->private_data;
875 return bytes_to_frames(runtime, pos);
903 static void loopback_runtime_free(struct snd_pcm_runtime *runtime)
905 struct loopback_pcm *dpcm = runtime->private_data;
911 struct snd_pcm_runtime *runtime = substream->runtime;
912 struct loopback_pcm *dpcm = runtime->private_data;
1008 struct loopback_pcm *dpcm = substream->runtime->private_data;
1186 struct snd_pcm_runtime *runtime = substream->runtime;
1218 runtime->private_data = dpcm;
1226 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
1228 /* use dynamic rules based on actual runtime->hw values */
1231 err = snd_pcm_hw_rule_add(runtime, 0,
1237 err = snd_pcm_hw_rule_add(runtime, 0,
1243 err = snd_pcm_hw_rule_add(runtime, 0,
1255 err = snd_pcm_hw_rule_add(runtime, 0,
1266 runtime->private_free = loopback_runtime_free;
1268 runtime->hw = loopback_pcm_hardware;
1270 runtime->hw = cable->hw;
1288 struct loopback_pcm *dpcm = substream->runtime->private_data;