alsa: htimestamp needs an operation to sync with hw

So use snd_pcm_avail
This commit is contained in:
Wim Taymans 2023-06-05 17:15:30 +02:00
parent 29e6544bae
commit 6b6f3432fe

View file

@ -1887,6 +1887,7 @@ static int get_avail(struct state *state, uint64_t current_time, snd_pcm_uframes
snd_htimestamp_t tstamp;
uint64_t then;
avail = snd_pcm_avail(state->hndl);
if ((res = snd_pcm_htimestamp(state->hndl, &avail, &tstamp)) < 0) {
if ((res = alsa_recover(state, res)) < 0)
return res;