[alsa-devel] Possible problem with snd_pcm_oss_sync()

Timur Tabi timur at freescale.com
Wed May 21 16:15:06 CEST 2008

Takashi Iwai wrote:

> The sync ioctl is to block the operation until all samples are
> played.  But, it's a bit strange that the stream stops after this.  It
> should be an underrun instead (and OSS recovers by itself).

I figured it out.  When the application starts, my driver gets a call to the
_hw_params and _prepare functions.  When the app calls SNDCTL_DSP_SYNC, those
two functions get called again.  At that point, the DMA controller gets
re-programmed.  For some reason, it doesn't like that.  The DMA never actually

I moved some of the DMA programming code to my _open function (where it belongs,
anyway), and now bplay works.

Well, almost.  After about a second into playback, it skips a little bit.  And
then about 4-5 seconds later, bplay calls SNDCTL_DSP_SYNC, and that causes
playback to pause for about a second.

I need to figure out why bplay is calling sync, and why the audio skips in the

Timur Tabi
Linux kernel developer at Freescale

More information about the Alsa-devel mailing list