mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: IRQ based scheduling wakes up after finishing 1 period
So we need to keep 2 periods of silence to keep 1 period of data inside the ringbuffer when starting the graph.
This commit is contained in:
parent
eac74f6ece
commit
c6f9cfa220
1 changed files with 6 additions and 2 deletions
|
|
@ -2903,8 +2903,12 @@ int spa_alsa_prepare(struct state *state)
|
||||||
state->name, snd_strerror(err));
|
state->name, snd_strerror(err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
if (state->stream == SND_PCM_STREAM_PLAYBACK)
|
if (state->stream == SND_PCM_STREAM_PLAYBACK) {
|
||||||
spa_alsa_silence(state, state->start_delay + state->threshold + state->headroom);
|
snd_pcm_uframes_t silence = state->start_delay + state->threshold + state->headroom;
|
||||||
|
if (state->disable_tsched)
|
||||||
|
silence += state->threshold;
|
||||||
|
spa_alsa_silence(state, silence);
|
||||||
|
}
|
||||||
|
|
||||||
reset_buffers(state);
|
reset_buffers(state);
|
||||||
state->alsa_sync = true;
|
state->alsa_sync = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue