[alsa-devel] [PATCH 1/3] ALSA: pcm - introduce device_buffer

Jaroslav Kysela perex at perex.cz
Fri Aug 31 12:48:53 CEST 2012


Date 31.8.2012 03:14, Vinod Koul wrote:
> -		if (avail >= runtime->stop_threshold) {
> +		snd_pcm_uframes_t actual_avail;
> +		if (avail < runtime->device_buffer)
> +			actual_avail = avail;
> +		else
> +			actual_avail = avail - runtime->device_buffer;
> +		if (actual_avail  >= runtime->stop_threshold) {

Perhaps this may be simplified to:
	if (avail >= runtime->stop_threshold + runtime->device_buffer)

> +			snd_printd(KERN_ERR  "avail > stop_threshold!!\n");
> +			snd_printd(KERN_ERR  "actual_avail %ld, avail %ld, device_buffer %ld!!\n",
> +					actual_avail, avail,  runtime->device_buffer);

I would propose to enhance xrun_log() to show something about
device_buffer and remove these printd calls from this location.

					Jaroslav

-- 
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project; Red Hat, Inc.


More information about the Alsa-devel mailing list