From: Takashi Iwai Date: Fri, 13 May 2005 14:14:10 +0000 (+0000) Subject: Fix playback start with sync_ptr mode X-Git-Tag: v1.0.9rc4~31 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=10557ca6b9420f393969b503e048f3d322d8eabe;p=alsa-lib.git Fix playback start with sync_ptr mode Fix by Istvan Varadi - start the playback with snd_pcm_hw_start failed with -EPIPE, because some pointers were not updated. I attached a patch for alsa-lib 1.0.8, in which sync_ptr is called before SNDRV_PCM_IOCTL_START. It seems to solve the problem, though I don't know alsa-lib enough to be sure that this is the right solution... --- diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c index b2969379..26af3c88 100644 --- a/src/pcm/pcm_hw.c +++ b/src/pcm/pcm_hw.c @@ -543,6 +543,7 @@ static int snd_pcm_hw_start(snd_pcm_t *pcm) assert(pcm->stream != SND_PCM_STREAM_PLAYBACK || snd_pcm_mmap_playback_hw_avail(pcm) > 0); #endif + sync_ptr(hw, 0); if (ioctl(hw->fd, SNDRV_PCM_IOCTL_START) < 0) { err = -errno; SYSMSG("SNDRV_PCM_IOCTL_START failed");