alsa: read hw synced ring buffer position when caller is not the same pcm

When the caller is a different pcm it is not shure that the
IRQs are synchronised. So read the real ring buffer position.
This commit is contained in:
Stefan Ursella 2024-05-03 07:13:41 +02:00 committed by Wim Taymans
parent 056d826c59
commit 9c31cf1271

View file

@ -2583,7 +2583,7 @@ recover:
static inline snd_pcm_sframes_t alsa_avail(struct state *state)
{
snd_pcm_sframes_t avail;
if (state->disable_tsched && !state->resample)
if (!state->matching && state->disable_tsched && !state->resample)
avail = snd_pcm_avail_update(state->hndl);
else
avail = snd_pcm_avail(state->hndl);