mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: only use avail_update when woken up with IRQ
When we are following a different clock or resampling, use update to get more accurate update results.
This commit is contained in:
parent
8735d07c0a
commit
2e066e6b1e
1 changed files with 5 additions and 3 deletions
|
|
@ -2132,10 +2132,12 @@ recover:
|
|||
|
||||
static inline snd_pcm_sframes_t alsa_avail(struct state *state)
|
||||
{
|
||||
if (state->disable_tsched)
|
||||
return snd_pcm_avail_update(state->hndl);
|
||||
snd_pcm_sframes_t avail;
|
||||
if (state->disable_tsched && !state->resample)
|
||||
avail = snd_pcm_avail_update(state->hndl);
|
||||
else
|
||||
return snd_pcm_avail(state->hndl);
|
||||
avail = snd_pcm_avail(state->hndl);
|
||||
return avail;
|
||||
}
|
||||
|
||||
static int get_avail(struct state *state, uint64_t current_time, snd_pcm_uframes_t *delay)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue