Lines Matching defs:runtime
155 struct snd_pcm_runtime *runtime;
187 runtime = substream->runtime;
188 if (!runtime || !snd_pcm_running(substream)) {
245 pending = runtime->dma_bytes - hw_ptr;
249 memcpy(req->buf, runtime->dma_area + hw_ptr, pending);
250 memcpy(req->buf + pending, runtime->dma_area,
253 memcpy(req->buf, runtime->dma_area + hw_ptr,
258 memcpy(runtime->dma_area + hw_ptr, req->buf, pending);
259 memcpy(runtime->dma_area, req->buf + pending,
262 memcpy(runtime->dma_area + hw_ptr, req->buf,
268 prm->hw_ptr = (hw_ptr + req->actual) % runtime->dma_bytes;
363 return bytes_to_frames(substream->runtime, prm->hw_ptr);
388 struct snd_pcm_runtime *runtime = substream->runtime;
403 runtime->hw = uac_pcm_hardware;
406 runtime->hw.formats = uac_ssize_to_fmt(p_ssize);
407 runtime->hw.channels_min = num_channels(p_chmask);
410 runtime->hw.formats = uac_ssize_to_fmt(c_ssize);
411 runtime->hw.channels_min = num_channels(c_chmask);
415 runtime->hw.period_bytes_min = 2 * prm->max_psize
416 / runtime->hw.periods_min;
417 runtime->hw.rate_min = prm->srate;
418 runtime->hw.rate_max = runtime->hw.rate_min;
419 runtime->hw.channels_max = runtime->hw.channels_min;
421 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);