On Fri, 19 Nov 2010, Irfan Shaikh wrote: > /*************************************************************/ > Code below O/p results runs in a while loop till end of PCM data. > 1) First time O/p is > Farames available : 1024 /*Return VALUE of snd_pcm_avail_update*/ > >>>>>>>>>>>>>>>>>>>>>>>>>Begin result : 0 /*Return VALUE of snd_pcm_mmap_begin*/ > Address outbuffer : 0xcff88 > >>>>>>>>>>>>>>>>>>>>>>Comit result : 1024 /*SUCESSFUL - Return VALUE of snd_pcm_mmap_commi*/ > > 2) Second time onwards ALWAYS O/p is > Farames available : 0 /*Return VALUE of snd_pcm_avail_update*/ > >>>>>>>>>>>>>>>>>>>>>>>>>Begin result : 0 /*Return VALUE of snd_pcm_mmap_begin*/ > Address outbuffer : 0xcff88 > >>>>>>>>>>>>>>>>>>>>>>Comit result : 0 /*FAILURE - Return VALUE of snd_pcm_mmap_commit*/ You have to use poll()/select() or snd_pcm_wait() to wait for a room in the playback buffer. The direct mmap I/O is always non-blocked. Jaroslav ----- 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