mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: try to resync on commit error
When we get a commit error, try to resync our pointers. This fixes a problem of endless commit errors after a quantum change because it never manages to resync properly.
This commit is contained in:
parent
bf886ba209
commit
14d252ec9d
1 changed files with 2 additions and 2 deletions
|
|
@ -1947,8 +1947,8 @@ again:
|
||||||
state->props.device, snd_strerror(commitres));
|
state->props.device, snd_strerror(commitres));
|
||||||
if (commitres != -EPIPE && commitres != -ESTRPIPE)
|
if (commitres != -EPIPE && commitres != -ESTRPIPE)
|
||||||
return res;
|
return res;
|
||||||
|
state->alsa_sync = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commitres > 0 && written != (snd_pcm_uframes_t) commitres) {
|
if (commitres > 0 && written != (snd_pcm_uframes_t) commitres) {
|
||||||
spa_log_warn(state->log, "%s: mmap_commit wrote %ld instead of %ld",
|
spa_log_warn(state->log, "%s: mmap_commit wrote %ld instead of %ld",
|
||||||
state->props.device, commitres, written);
|
state->props.device, commitres, written);
|
||||||
|
|
@ -2133,8 +2133,8 @@ int spa_alsa_read(struct state *state)
|
||||||
state->props.device, snd_strerror(commitres));
|
state->props.device, snd_strerror(commitres));
|
||||||
if (commitres != -EPIPE && commitres != -ESTRPIPE)
|
if (commitres != -EPIPE && commitres != -ESTRPIPE)
|
||||||
return res;
|
return res;
|
||||||
|
state->alsa_sync = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commitres > 0 && read != (snd_pcm_uframes_t) commitres) {
|
if (commitres > 0 && read != (snd_pcm_uframes_t) commitres) {
|
||||||
spa_log_warn(state->log, "%s: mmap_commit read %ld instead of %ld",
|
spa_log_warn(state->log, "%s: mmap_commit read %ld instead of %ld",
|
||||||
state->props.device, commitres, read);
|
state->props.device, commitres, read);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue