[alsa-devel] snd_pcm_avail_update returns 0
perex at perex.cz
Thu Jan 14 16:05:40 CET 2010
On Thu, 14 Jan 2010, Singaravelan Nallasellan wrote:
> Our audio driver uses the indirect PCM data transfer mechanism to
> transfer the buffer pointers and the size of the buffer to the Audio
> engine which DMAs the PCM data to the sound card.
> The driver uses the .ack callback to receive the buffer pointer and
> the size. It also sends it to the audio engine.
> We are facing a problem when we play long wav file using our driver.
> The application has written the PCM data and the ring buffer is full.
> snd_pcm_avail_update returns 0 sporadically. But the .ack callback was
> not called. The playback is stuck. It is not progressing.
> I have tried with pulseaudio (0.9.15) and with my own player. Both
> gives the same result.
> I would appreciate if somebody could provide some pointer to identify
> the cause of this issue. Let me know if anybody needs more info.
No idea. You may put some debug printk lines to snd_pcm_lib_write1()
routine if all correspoding write sequences ends with ->ack callback
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.
More information about the Alsa-devel