Lines Matching defs:runtime
87 struct snd_pcm_runtime *runtime;
116 runtime = substream->runtime;
117 if (!runtime || !snd_pcm_running(substream)) {
153 pending = runtime->dma_bytes - hw_ptr;
157 memcpy(req->buf, runtime->dma_area + hw_ptr, pending);
158 memcpy(req->buf + pending, runtime->dma_area,
161 memcpy(req->buf, runtime->dma_area + hw_ptr,
166 memcpy(runtime->dma_area + hw_ptr, req->buf, pending);
167 memcpy(runtime->dma_area, req->buf + pending,
170 memcpy(runtime->dma_area + hw_ptr, req->buf,
177 prm->hw_ptr = (hw_ptr + req->actual) % runtime->dma_bytes;
244 return bytes_to_frames(substream->runtime, prm->hw_ptr);
250 struct snd_pcm_runtime *runtime = substream->runtime;
267 runtime->hw = uac_pcm_hardware;
271 runtime->hw.rate_min = p_srate;
274 runtime->hw.formats = SNDRV_PCM_FMTBIT_S24_3LE;
277 runtime->hw.formats = SNDRV_PCM_FMTBIT_S32_LE;
280 runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE;
283 runtime->hw.channels_min = num_channels(p_chmask);
284 runtime->hw.period_bytes_min = 2 * uac->p_prm.max_psize
285 / runtime->hw.periods_min;
288 runtime->hw.rate_min = c_srate;
291 runtime->hw.formats = SNDRV_PCM_FMTBIT_S24_3LE;
294 runtime->hw.formats = SNDRV_PCM_FMTBIT_S32_LE;
297 runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE;
300 runtime->hw.channels_min = num_channels(c_chmask);
301 runtime->hw.period_bytes_min = 2 * uac->c_prm.max_psize
302 / runtime->hw.periods_min;
305 runtime->hw.rate_max = runtime->hw.rate_min;
306 runtime->hw.channels_max = runtime->hw.channels_min;
308 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);