[alsa-devel] dsnoop issues

Takashi Iwai tiwai at suse.de
Fri Apr 27 14:37:39 CEST 2007


At Fri, 27 Apr 2007 13:27:00 +0100,
Gordon Miller wrote:
> 
> Hi
> 
> All my snd_pcm_readi calls return too few frames. Also when I switch to 
> stereo, the sound is muted. I cannot change this by adjusting period & 
> buffer sizes. dsnoop is enabled by default. The documentation for 
> snd_pcm_readi says that the only way that the frame count can be short 
> is because of a signal or xrun. Well this clearly isn't the case.

Actually, the documentation is wrong, IMO.  The typical behavior of
read syscall is that it returns a value actually read by that call.
It doesn't guarantee whether the requested size is filled, and can be
shorter than requested.  As snd_pcm_readi() emulates the read syscall,
it should behave in that way.

The blocking mode means that the function waits until the threshold
(watermark) condition is fulfilled.


Takashi


More information about the Alsa-devel mailing list