diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c index d8cc8adf..be7fe8d2 100644 --- a/src/pcm/pcm_dmix.c +++ b/src/pcm/pcm_dmix.c @@ -437,6 +437,7 @@ static int snd_pcm_dmix_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp) if (err < 0) return err; /* fallthru */ + snd_pcm_dmix_sync_area(pcm); case SNDRV_PCM_STATE_PREPARED: case SNDRV_PCM_STATE_SUSPENDED: case STATE_RUN_PENDING: diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c index 3c65e2ca..eac58ba6 100644 --- a/src/pcm/pcm_rate.c +++ b/src/pcm/pcm_rate.c @@ -617,7 +617,12 @@ static int snd_pcm_rate_hwsync(snd_pcm_t *pcm) static int snd_pcm_rate_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp) { + snd_pcm_rate_t *rate = pcm->private_data; snd_pcm_rate_hwsync(pcm); + /* call slave's delay callback although the value is overwritten. + * it's needed for a better sync of dmix on aoss. + */ + snd_pcm_delay(rate->gen.slave, delayp); if (pcm->stream == SND_PCM_STREAM_PLAYBACK) *delayp = snd_pcm_mmap_playback_hw_avail(pcm); else