On Thu, 24 Jan 2002, Kai Vehmanen wrote:

> After applying this, I stopped getting "Unexpected hw_pointer" and "Lost 
> interrupt: hw_ptr = %d expected %d" errors from pcm_lib.c. Without the 
> patch, I get these errors with all parameters I've tried (even 48kHz!) if 
> both stream directions are active. 

This was bogus. The errors were caused by invalid period and buffersizes 
set by ecasound. I'm not yet sure whether there's a bug in 
snd_pcm_hw_params_set_buffer_time_near() and  
snd_pcm_hw_params_set_period_size_near() functions, or was ecasound just 
using the API incorrectly. 

Anyway, in certain situations the above functions resulted in quite
strange buffering params. Changing ecasound to use
snd_pcm_hw_params_set_buffer_size() and
snd_pcm_hw_params_set_period_size_near() instead fixed the problem.

Anyway, the patch is still valid. I'm able to run "./latency -r 44100 -m
512 -M 512 -c 2 -s 2000 -p" for long periods of time without problems
(like Maarten's original test, but with 2 channels).  With '-c 1' there is
still something funny going on. It works for a while, around 85secs, but
then the audio goes bad. With the patch applied, the resulting bad audio
sounds different. It's more like a really short delay than distortion.
With '-r 44100', I can't reproduce the problem. With '-r 44099' it happens 
every time, and usually close to 85secs. Weird...

-- 
 http://www.eca.cx
 Audio software for Linux!


_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to