Re: [alsa-cvslog] alsa-lib: pcm - Limit the avail_min minimum size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 20 Nov 2007, Takashi Iwai wrote:

> changeset:   2352:39d34d6a4587
> tag:         tip
> user:        tiwai
> date:        Tue Nov 20 15:29:10 2007 +0100
> files:       src/pcm/pcm.c
> description:
> pcm - Limit the avail_min minimum size
> 
> Fix avail_min if it's less than period_size.  The too small avail_min
> is simply useless and the cause of CPU hog with rate plugin.
> 
> 
> diff -r b1d1733e52f8 -r 39d34d6a4587 src/pcm/pcm.c
> --- a/src/pcm/pcm.c	Mon Nov 19 08:07:19 2007 +0100
> +++ b/src/pcm/pcm.c	Tue Nov 20 15:29:10 2007 +0100
> @@ -5577,6 +5577,12 @@ int snd_pcm_sw_params_set_avail_min(snd_
>  #endif
>  {
>  	assert(pcm && params);
> +	/* Fix avail_min if it's below period size.  The period_size
> +	 * defines the minimal wake-up timing accuracy, so it doesn't
> +	 * make sense to set below that.
> +	 */
> +	if (val < pcm->period_size)
> +		val = pcm->period_size;
>  	params->avail_min = val;
>  	return 0;
>  }

I think that this patch is wrong. We may use system timers to increase 
(fine-tune) "interrupt" latencies for pcm streams - see tick time in 
driver and library.

						Jaroslav

-----
Jaroslav Kysela <perex@xxxxxxxx>
Linux Kernel Sound Maintainer
ALSA Project
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux