if (pcm->device >= adma_isomgr->max_pcm_device) {
dev_err(dev, "%s: PCM device number %d is greater than %d\n", __func__,
pcm->device, adma_isomgr->max_pcm_device); return -EINVAL;
}
/* * No action if stream is running and bandwidth is already set or * stream is not running and bandwidth is already reset
*/ if ((adma_isomgr->bw_per_dev[type][pcm->device] && is_running) ||
(!adma_isomgr->bw_per_dev[type][pcm->device] && !is_running)) return0;
if (is_running) {
sample_bytes = snd_pcm_format_width(runtime->format) / 8; if (sample_bytes < 0) return sample_bytes;
/* KB/s kilo bytes per sec */
bandwidth = runtime->channels * (runtime->rate / 1000) *
sample_bytes;
}
mutex_lock(&adma_isomgr->mutex);
if (is_running) { if (bandwidth + adma_isomgr->current_bandwidth > adma_isomgr->max_bw)
bandwidth = adma_isomgr->max_bw - adma_isomgr->current_bandwidth;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.