Lines Matching full:runtime
390 struct snd_pcm_runtime *runtime; in snd_pcm_substream_proc_hw_params_read() local
393 runtime = substream->runtime; in snd_pcm_substream_proc_hw_params_read()
394 if (!runtime) { in snd_pcm_substream_proc_hw_params_read()
398 if (runtime->state == SNDRV_PCM_STATE_OPEN) { in snd_pcm_substream_proc_hw_params_read()
402 snd_iprintf(buffer, "access: %s\n", snd_pcm_access_name(runtime->access)); in snd_pcm_substream_proc_hw_params_read()
403 snd_iprintf(buffer, "format: %s\n", snd_pcm_format_name(runtime->format)); in snd_pcm_substream_proc_hw_params_read()
404 snd_iprintf(buffer, "subformat: %s\n", snd_pcm_subformat_name(runtime->subformat)); in snd_pcm_substream_proc_hw_params_read()
405 snd_iprintf(buffer, "channels: %u\n", runtime->channels); in snd_pcm_substream_proc_hw_params_read()
406 snd_iprintf(buffer, "rate: %u (%u/%u)\n", runtime->rate, runtime->rate_num, runtime->rate_den); in snd_pcm_substream_proc_hw_params_read()
407 snd_iprintf(buffer, "period_size: %lu\n", runtime->period_size); in snd_pcm_substream_proc_hw_params_read()
408 snd_iprintf(buffer, "buffer_size: %lu\n", runtime->buffer_size); in snd_pcm_substream_proc_hw_params_read()
411 snd_iprintf(buffer, "OSS format: %s\n", snd_pcm_oss_format_name(runtime->oss.format)); in snd_pcm_substream_proc_hw_params_read()
412 snd_iprintf(buffer, "OSS channels: %u\n", runtime->oss.channels); in snd_pcm_substream_proc_hw_params_read()
413 snd_iprintf(buffer, "OSS rate: %u\n", runtime->oss.rate); in snd_pcm_substream_proc_hw_params_read()
414 snd_iprintf(buffer, "OSS period bytes: %lu\n", (unsigned long)runtime->oss.period_bytes); in snd_pcm_substream_proc_hw_params_read()
415 snd_iprintf(buffer, "OSS periods: %u\n", runtime->oss.periods); in snd_pcm_substream_proc_hw_params_read()
416 snd_iprintf(buffer, "OSS period frames: %lu\n", (unsigned long)runtime->oss.period_frames); in snd_pcm_substream_proc_hw_params_read()
427 struct snd_pcm_runtime *runtime; in snd_pcm_substream_proc_sw_params_read() local
430 runtime = substream->runtime; in snd_pcm_substream_proc_sw_params_read()
431 if (!runtime) { in snd_pcm_substream_proc_sw_params_read()
435 if (runtime->state == SNDRV_PCM_STATE_OPEN) { in snd_pcm_substream_proc_sw_params_read()
439 snd_iprintf(buffer, "tstamp_mode: %s\n", snd_pcm_tstamp_mode_name(runtime->tstamp_mode)); in snd_pcm_substream_proc_sw_params_read()
440 snd_iprintf(buffer, "period_step: %u\n", runtime->period_step); in snd_pcm_substream_proc_sw_params_read()
441 snd_iprintf(buffer, "avail_min: %lu\n", runtime->control->avail_min); in snd_pcm_substream_proc_sw_params_read()
442 snd_iprintf(buffer, "start_threshold: %lu\n", runtime->start_threshold); in snd_pcm_substream_proc_sw_params_read()
443 snd_iprintf(buffer, "stop_threshold: %lu\n", runtime->stop_threshold); in snd_pcm_substream_proc_sw_params_read()
444 snd_iprintf(buffer, "silence_threshold: %lu\n", runtime->silence_threshold); in snd_pcm_substream_proc_sw_params_read()
445 snd_iprintf(buffer, "silence_size: %lu\n", runtime->silence_size); in snd_pcm_substream_proc_sw_params_read()
446 snd_iprintf(buffer, "boundary: %lu\n", runtime->boundary); in snd_pcm_substream_proc_sw_params_read()
455 struct snd_pcm_runtime *runtime; in snd_pcm_substream_proc_status_read() local
460 runtime = substream->runtime; in snd_pcm_substream_proc_status_read()
461 if (!runtime) { in snd_pcm_substream_proc_status_read()
481 snd_iprintf(buffer, "hw_ptr : %ld\n", runtime->status->hw_ptr); in snd_pcm_substream_proc_status_read()
482 snd_iprintf(buffer, "appl_ptr : %ld\n", runtime->control->appl_ptr); in snd_pcm_substream_proc_status_read()
900 struct snd_pcm_runtime *runtime; in snd_pcm_attach_substream() local
957 runtime = kzalloc(sizeof(*runtime), GFP_KERNEL); in snd_pcm_attach_substream()
958 if (runtime == NULL) in snd_pcm_attach_substream()
962 runtime->status = alloc_pages_exact(size, GFP_KERNEL); in snd_pcm_attach_substream()
963 if (runtime->status == NULL) { in snd_pcm_attach_substream()
964 kfree(runtime); in snd_pcm_attach_substream()
967 memset(runtime->status, 0, size); in snd_pcm_attach_substream()
970 runtime->control = alloc_pages_exact(size, GFP_KERNEL); in snd_pcm_attach_substream()
971 if (runtime->control == NULL) { in snd_pcm_attach_substream()
972 free_pages_exact(runtime->status, in snd_pcm_attach_substream()
974 kfree(runtime); in snd_pcm_attach_substream()
977 memset(runtime->control, 0, size); in snd_pcm_attach_substream()
979 init_waitqueue_head(&runtime->sleep); in snd_pcm_attach_substream()
980 init_waitqueue_head(&runtime->tsleep); in snd_pcm_attach_substream()
982 __snd_pcm_set_state(runtime, SNDRV_PCM_STATE_OPEN); in snd_pcm_attach_substream()
983 mutex_init(&runtime->buffer_mutex); in snd_pcm_attach_substream()
984 atomic_set(&runtime->buffer_accessing, 0); in snd_pcm_attach_substream()
986 substream->runtime = runtime; in snd_pcm_attach_substream()
998 struct snd_pcm_runtime *runtime; in snd_pcm_detach_substream() local
1002 runtime = substream->runtime; in snd_pcm_detach_substream()
1003 if (runtime->private_free != NULL) in snd_pcm_detach_substream()
1004 runtime->private_free(runtime); in snd_pcm_detach_substream()
1005 free_pages_exact(runtime->status, in snd_pcm_detach_substream()
1007 free_pages_exact(runtime->control, in snd_pcm_detach_substream()
1009 kfree(runtime->hw_constraints.rules); in snd_pcm_detach_substream()
1010 /* Avoid concurrent access to runtime via PCM timer interface */ in snd_pcm_detach_substream()
1013 substream->runtime = NULL; in snd_pcm_detach_substream()
1016 substream->runtime = NULL; in snd_pcm_detach_substream()
1018 mutex_destroy(&runtime->buffer_mutex); in snd_pcm_detach_substream()
1019 snd_fasync_free(runtime->fasync); in snd_pcm_detach_substream()
1020 kfree(runtime); in snd_pcm_detach_substream()
1120 if (substream->runtime) { in snd_pcm_dev_disconnect()
1124 __snd_pcm_set_state(substream->runtime, in snd_pcm_dev_disconnect()
1126 wake_up(&substream->runtime->sleep); in snd_pcm_dev_disconnect()
1127 wake_up(&substream->runtime->tsleep); in snd_pcm_dev_disconnect()