Re: [PATCH] Don't check if period size is equal to buffer size

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

 



On Tue, 15 Sep 2009, Lubomir Rintel wrote:

> At least some drivers seem to allow a single period and those which
> don't would correct us anyway. Moreover, Pulseaudio with tsched sets
> this frequently.

I'm afraid, but this patch is not enough. At least chunk_size should be 
less than buffer_size otherwise you'll get underrun immediately.

 						Jaroslav

> ---
> aplay/aplay.c |    5 -----
> 1 files changed, 0 insertions(+), 5 deletions(-)
>
> diff --git a/aplay/aplay.c b/aplay/aplay.c
> index c7c82a1..4fa36cb 100644
> --- a/aplay/aplay.c
> +++ b/aplay/aplay.c
> @@ -1044,11 +1044,6 @@ static void set_params(void)
> 	}
> 	snd_pcm_hw_params_get_period_size(params, &chunk_size, 0);
> 	snd_pcm_hw_params_get_buffer_size(params, &buffer_size);
> -	if (chunk_size == buffer_size) {
> -		error(_("Can't use period equal to buffer size (%lu == %lu)"),
> -		      chunk_size, buffer_size);
> -		exit(EXIT_FAILURE);
> -	}
> 	snd_pcm_sw_params_current(handle, swparams);
> 	if (avail_min < 0)
> 		n = chunk_size;

-----
Jaroslav Kysela <perex@xxxxxxxx>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

_______________________________________________
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