mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: don't check early wakeup when PCM stopped
When the PCM is stopped, don't check for early wakeup because if we are early, we will never be on time in the next iteration either because the PCM is stopped and doesn't advance. Also don't try to align when stopped. See #3565
This commit is contained in:
parent
0ca1acb3d5
commit
e940361c94
1 changed files with 2 additions and 2 deletions
|
|
@ -2408,7 +2408,7 @@ static int alsa_write_sync(struct state *state, uint64_t current_time)
|
|||
return res;
|
||||
}
|
||||
|
||||
if (SPA_UNLIKELY(!following && delay > target + state->max_error)) {
|
||||
if (SPA_UNLIKELY(!following && state->alsa_started && delay > target + state->max_error)) {
|
||||
spa_log_trace(state->log, "%p: early wakeup %ld %lu %lu", state,
|
||||
avail, delay, target);
|
||||
if (delay > target * 3)
|
||||
|
|
@ -2419,7 +2419,7 @@ static int alsa_write_sync(struct state *state, uint64_t current_time)
|
|||
if (SPA_UNLIKELY((res = update_time(state, current_time, delay, target, following)) < 0))
|
||||
return res;
|
||||
|
||||
if (following && !state->linked) {
|
||||
if (following && state->alsa_started && !state->linked) {
|
||||
if (SPA_UNLIKELY(state->alsa_sync)) {
|
||||
enum spa_log_level lev;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue