diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c index 45b17fde..3add0645 100644 --- a/src/pcm/pcm_dmix.c +++ b/src/pcm/pcm_dmix.c @@ -595,6 +595,9 @@ static int snd_pcm_dmix_drain(snd_pcm_t *pcm) stop_threshold = pcm->stop_threshold; if (pcm->stop_threshold > pcm->buffer_size) pcm->stop_threshold = pcm->buffer_size; + if (dmix->state == SND_PCM_STATE_PREPARED && + snd_pcm_mmap_playback_hw_avail(pcm) > 0) + snd_pcm_dmix_start(pcm); while (dmix->state == SND_PCM_STATE_RUNNING) { err = snd_pcm_dmix_sync_ptr(pcm); if (err < 0) diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c index 19e9351f..9b09a8b0 100644 --- a/src/pcm/pcm_dshare.c +++ b/src/pcm/pcm_dshare.c @@ -326,6 +326,9 @@ static int snd_pcm_dshare_drain(snd_pcm_t *pcm) stop_threshold = pcm->stop_threshold; if (pcm->stop_threshold > pcm->buffer_size) pcm->stop_threshold = pcm->buffer_size; + if (dshare->state == SND_PCM_STATE_PREPARED && + snd_pcm_mmap_playback_hw_avail(pcm) > 0) + snd_pcm_dshare_start(pcm); while (dshare->state == SND_PCM_STATE_RUNNING) { err = snd_pcm_dshare_sync_ptr(pcm); if (err < 0)