Lines Matching defs:runtime
381 struct snd_pcm_runtime *runtime;
384 runtime = substream->runtime;
385 if (!runtime) {
389 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) {
393 snd_iprintf(buffer, "access: %s\n", snd_pcm_access_name(runtime->access));
394 snd_iprintf(buffer, "format: %s\n", snd_pcm_format_name(runtime->format));
395 snd_iprintf(buffer, "subformat: %s\n", snd_pcm_subformat_name(runtime->subformat));
396 snd_iprintf(buffer, "channels: %u\n", runtime->channels);
397 snd_iprintf(buffer, "rate: %u (%u/%u)\n", runtime->rate, runtime->rate_num, runtime->rate_den);
398 snd_iprintf(buffer, "period_size: %lu\n", runtime->period_size);
399 snd_iprintf(buffer, "buffer_size: %lu\n", runtime->buffer_size);
402 snd_iprintf(buffer, "OSS format: %s\n", snd_pcm_oss_format_name(runtime->oss.format));
403 snd_iprintf(buffer, "OSS channels: %u\n", runtime->oss.channels);
404 snd_iprintf(buffer, "OSS rate: %u\n", runtime->oss.rate);
405 snd_iprintf(buffer, "OSS period bytes: %lu\n", (unsigned long)runtime->oss.period_bytes);
406 snd_iprintf(buffer, "OSS periods: %u\n", runtime->oss.periods);
407 snd_iprintf(buffer, "OSS period frames: %lu\n", (unsigned long)runtime->oss.period_frames);
418 struct snd_pcm_runtime *runtime;
421 runtime = substream->runtime;
422 if (!runtime) {
426 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) {
430 snd_iprintf(buffer, "tstamp_mode: %s\n", snd_pcm_tstamp_mode_name(runtime->tstamp_mode));
431 snd_iprintf(buffer, "period_step: %u\n", runtime->period_step);
432 snd_iprintf(buffer, "avail_min: %lu\n", runtime->control->avail_min);
433 snd_iprintf(buffer, "start_threshold: %lu\n", runtime->start_threshold);
434 snd_iprintf(buffer, "stop_threshold: %lu\n", runtime->stop_threshold);
435 snd_iprintf(buffer, "silence_threshold: %lu\n", runtime->silence_threshold);
436 snd_iprintf(buffer, "silence_size: %lu\n", runtime->silence_size);
437 snd_iprintf(buffer, "boundary: %lu\n", runtime->boundary);
446 struct snd_pcm_runtime *runtime;
451 runtime = substream->runtime;
452 if (!runtime) {
472 snd_iprintf(buffer, "hw_ptr : %ld\n", runtime->status->hw_ptr);
473 snd_iprintf(buffer, "appl_ptr : %ld\n", runtime->control->appl_ptr);
890 struct snd_pcm_runtime *runtime;
947 runtime = kzalloc(sizeof(*runtime), GFP_KERNEL);
948 if (runtime == NULL)
952 runtime->status = alloc_pages_exact(size, GFP_KERNEL);
953 if (runtime->status == NULL) {
954 kfree(runtime);
957 memset(runtime->status, 0, size);
960 runtime->control = alloc_pages_exact(size, GFP_KERNEL);
961 if (runtime->control == NULL) {
962 free_pages_exact(runtime->status,
964 kfree(runtime);
967 memset(runtime->control, 0, size);
969 init_waitqueue_head(&runtime->sleep);
970 init_waitqueue_head(&runtime->tsleep);
972 runtime->status->state = SNDRV_PCM_STATE_OPEN;
973 mutex_init(&runtime->buffer_mutex);
974 atomic_set(&runtime->buffer_accessing, 0);
976 substream->runtime = runtime;
988 struct snd_pcm_runtime *runtime;
992 runtime = substream->runtime;
993 if (runtime->private_free != NULL)
994 runtime->private_free(runtime);
995 free_pages_exact(runtime->status,
997 free_pages_exact(runtime->control,
999 kfree(runtime->hw_constraints.rules);
1000 /* Avoid concurrent access to runtime via PCM timer interface */
1003 substream->runtime = NULL;
1006 substream->runtime = NULL;
1008 mutex_destroy(&runtime->buffer_mutex);
1009 kfree(runtime);
1109 if (substream->runtime) {
1114 substream->runtime->status->state = SNDRV_PCM_STATE_DISCONNECTED;
1115 wake_up(&substream->runtime->sleep);
1116 wake_up(&substream->runtime->tsleep);