Lines Matching defs:runtime

322 	struct snd_pcm_runtime *runtime, *cruntime;
332 runtime = cable->streams[SNDRV_PCM_STREAM_PLAYBACK]->
333 substream->runtime;
335 substream->runtime;
336 check = runtime->format != cruntime->format ||
337 runtime->rate != cruntime->rate ||
338 runtime->channels != cruntime->channels;
347 runtime = cable->streams[SNDRV_PCM_STREAM_PLAYBACK]->
348 substream->runtime;
351 if (setup->format != runtime->format) {
354 setup->format = runtime->format;
356 if (setup->rate != runtime->rate) {
359 setup->rate = runtime->rate;
361 if (setup->channels != runtime->channels) {
364 setup->channels = runtime->channels;
379 struct snd_pcm_runtime *runtime = substream->runtime;
380 struct loopback_pcm *dpcm = runtime->private_data;
436 struct snd_pcm_runtime *runtime = substream->runtime;
437 struct loopback_pcm *dpcm = runtime->private_data;
440 cable->hw.formats = pcm_format_to_bits(runtime->format);
441 cable->hw.rate_min = runtime->rate;
442 cable->hw.rate_max = runtime->rate;
443 cable->hw.channels_min = runtime->channels;
444 cable->hw.channels_max = runtime->channels;
448 frames_to_bytes(runtime, runtime->period_size);
456 struct snd_pcm_runtime *runtime = substream->runtime;
457 struct loopback_pcm *dpcm = runtime->private_data;
467 salign = (snd_pcm_format_physical_width(runtime->format) *
468 runtime->channels) / 8;
469 bps = salign * runtime->rate;
474 dpcm->pcm_buffer_size = frames_to_bytes(runtime, runtime->buffer_size);
478 snd_pcm_format_set_silence(runtime->format, runtime->dma_area,
479 runtime->buffer_size * runtime->channels);
486 dpcm->pcm_period_size = frames_to_bytes(runtime, runtime->period_size);
501 struct snd_pcm_runtime *runtime = dpcm->substream->runtime;
502 char *dst = runtime->dma_area;
514 snd_pcm_format_set_silence(runtime->format, dst + dst_off,
515 bytes_to_frames(runtime, size) *
516 runtime->channels);
529 struct snd_pcm_runtime *runtime = play->substream->runtime;
530 char *src = runtime->dma_area;
531 char *dst = capt->substream->runtime->dma_area;
538 if (runtime->state == SNDRV_PCM_STATE_DRAINING &&
539 snd_pcm_playback_hw_avail(runtime) < runtime->buffer_size) {
541 appl_ptr = appl_ptr1 = runtime->control->appl_ptr;
542 appl_ptr1 -= appl_ptr1 % runtime->buffer_size;
545 appl_ptr1 -= runtime->buffer_size;
677 static int loopback_snd_timer_check_resolution(struct snd_pcm_runtime *runtime,
680 if (resolution != runtime->timer_resolution) {
681 struct loopback_pcm *dpcm = runtime->private_data;
693 resolution / 1000 * runtime->rate;
700 runtime->period_size, resolution, period_size,
733 dpcm_play->substream->runtime->state !=
745 dpcm_play->substream->runtime :
746 dpcm_capt->substream->runtime;
865 struct snd_pcm_runtime *runtime = substream->runtime;
866 struct loopback_pcm *dpcm = runtime->private_data;
874 return bytes_to_frames(runtime, pos);
902 static void loopback_runtime_free(struct snd_pcm_runtime *runtime)
904 struct loopback_pcm *dpcm = runtime->private_data;
910 struct snd_pcm_runtime *runtime = substream->runtime;
911 struct loopback_pcm *dpcm = runtime->private_data;
1007 struct loopback_pcm *dpcm = substream->runtime->private_data;
1185 struct snd_pcm_runtime *runtime = substream->runtime;
1217 runtime->private_data = dpcm;
1225 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
1227 /* use dynamic rules based on actual runtime->hw values */
1230 err = snd_pcm_hw_rule_add(runtime, 0,
1236 err = snd_pcm_hw_rule_add(runtime, 0,
1242 err = snd_pcm_hw_rule_add(runtime, 0,
1254 err = snd_pcm_hw_rule_add(runtime, 0,
1265 runtime->private_free = loopback_runtime_free;
1267 runtime->hw = loopback_pcm_hardware;
1269 runtime->hw = cable->hw;
1287 struct loopback_pcm *dpcm = substream->runtime->private_data;