Re: [linux-audio-dev] Exact description of PCM system for ALSA

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Exact description of PCM system for ALSA
From: Paul Davis (pbd_AT_op.net)
Date: Thu Jul 18 2002 - 20:54:49 EEST


>> this is very dangerous. you must never call snd_pcm_mmap_commit()
>> *before* you have actually written the data.
>
>i tought _mmap_commit() does only updating some sw-pointers for
>alsa and has no real effect in the sense of commiting frames or
>whatever. cause it's also only the only process (thread) which is
>writing to the sounddevice it seems to be no problem to put it after
>_mmap_commit(). but you are right that it's somehow cleaner and more
>logical to put it before.

its not the only thread involved, however. the interrupt handler for
the audio interface will be looking at the sw ptrs to check if an xrun
has occurred, and may stop the card if one has (depending on the sw
params). if you update the sw ptrs before actually copying the data,
you will avoid the interrupt handler from realizing this, but the
audible effect will still be horrible.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Jul 18 2002 - 21:03:50 EEST