Lines Matching defs:runtime

383 	struct snd_pcm_runtime *runtime;
386 runtime = substream->runtime;
387 if (!runtime) {
391 if (runtime->state == SNDRV_PCM_STATE_OPEN) {
395 snd_iprintf(buffer, "access: %s\n", snd_pcm_access_name(runtime->access));
396 snd_iprintf(buffer, "format: %s\n", snd_pcm_format_name(runtime->format));
397 snd_iprintf(buffer, "subformat: %s\n", snd_pcm_subformat_name(runtime->subformat));
398 snd_iprintf(buffer, "channels: %u\n", runtime->channels);
399 snd_iprintf(buffer, "rate: %u (%u/%u)\n", runtime->rate, runtime->rate_num, runtime->rate_den);
400 snd_iprintf(buffer, "period_size: %lu\n", runtime->period_size);
401 snd_iprintf(buffer, "buffer_size: %lu\n", runtime->buffer_size);
404 snd_iprintf(buffer, "OSS format: %s\n", snd_pcm_oss_format_name(runtime->oss.format));
405 snd_iprintf(buffer, "OSS channels: %u\n", runtime->oss.channels);
406 snd_iprintf(buffer, "OSS rate: %u\n", runtime->oss.rate);
407 snd_iprintf(buffer, "OSS period bytes: %lu\n", (unsigned long)runtime->oss.period_bytes);
408 snd_iprintf(buffer, "OSS periods: %u\n", runtime->oss.periods);
409 snd_iprintf(buffer, "OSS period frames: %lu\n", (unsigned long)runtime->oss.period_frames);
420 struct snd_pcm_runtime *runtime;
423 runtime = substream->runtime;
424 if (!runtime) {
428 if (runtime->state == SNDRV_PCM_STATE_OPEN) {
432 snd_iprintf(buffer, "tstamp_mode: %s\n", snd_pcm_tstamp_mode_name(runtime->tstamp_mode));
433 snd_iprintf(buffer, "period_step: %u\n", runtime->period_step);
434 snd_iprintf(buffer, "avail_min: %lu\n", runtime->control->avail_min);
435 snd_iprintf(buffer, "start_threshold: %lu\n", runtime->start_threshold);
436 snd_iprintf(buffer, "stop_threshold: %lu\n", runtime->stop_threshold);
437 snd_iprintf(buffer, "silence_threshold: %lu\n", runtime->silence_threshold);
438 snd_iprintf(buffer, "silence_size: %lu\n", runtime->silence_size);
439 snd_iprintf(buffer, "boundary: %lu\n", runtime->boundary);
448 struct snd_pcm_runtime *runtime;
453 runtime = substream->runtime;
454 if (!runtime) {
474 snd_iprintf(buffer, "hw_ptr : %ld\n", runtime->status->hw_ptr);
475 snd_iprintf(buffer, "appl_ptr : %ld\n", runtime->control->appl_ptr);
893 struct snd_pcm_runtime *runtime;
950 runtime = kzalloc(sizeof(*runtime), GFP_KERNEL);
951 if (runtime == NULL)
955 runtime->status = alloc_pages_exact(size, GFP_KERNEL);
956 if (runtime->status == NULL) {
957 kfree(runtime);
960 memset(runtime->status, 0, size);
963 runtime->control = alloc_pages_exact(size, GFP_KERNEL);
964 if (runtime->control == NULL) {
965 free_pages_exact(runtime->status,
967 kfree(runtime);
970 memset(runtime->control, 0, size);
972 init_waitqueue_head(&runtime->sleep);
973 init_waitqueue_head(&runtime->tsleep);
975 __snd_pcm_set_state(runtime, SNDRV_PCM_STATE_OPEN);
976 mutex_init(&runtime->buffer_mutex);
977 atomic_set(&runtime->buffer_accessing, 0);
979 substream->runtime = runtime;
991 struct snd_pcm_runtime *runtime;
995 runtime = substream->runtime;
996 if (runtime->private_free != NULL)
997 runtime->private_free(runtime);
998 free_pages_exact(runtime->status,
1000 free_pages_exact(runtime->control,
1002 kfree(runtime->hw_constraints.rules);
1003 /* Avoid concurrent access to runtime via PCM timer interface */
1006 substream->runtime = NULL;
1009 substream->runtime = NULL;
1011 mutex_destroy(&runtime->buffer_mutex);
1012 snd_fasync_free(runtime->fasync);
1013 kfree(runtime);
1113 if (substream->runtime) {
1117 __snd_pcm_set_state(substream->runtime,
1119 wake_up(&substream->runtime->sleep);
1120 wake_up(&substream->runtime->tsleep);