Accepting request 1117659 from home:alarrosa:branches:multimedia:libs

- Add patch from upstream that fixes issues when PCM is stopped,
  which includes fixing sound in qemu:
  * 0001-alsa-dont-check-early-wakeup-when-PCM-stopped.patch

OBS-URL: https://build.opensuse.org/request/show/1117659
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pipewire?expand=0&rev=162
This commit is contained in:
Antonio Larrosa 2023-10-13 11:54:00 +00:00 committed by Git OBS Bridge
parent f746796b99
commit f335eeabd9
3 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,43 @@
From e940361c947cf8519b11c7e6792441c86fc59042 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Thu, 12 Oct 2023 15:28:53 +0200
Subject: [PATCH] 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
---
spa/plugins/alsa/alsa-pcm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c
index 57e7911e7..ddf79f05a 100644
--- a/spa/plugins/alsa/alsa-pcm.c
+++ b/spa/plugins/alsa/alsa-pcm.c
@@ -2408,7 +2408,7 @@ static int alsa_write_sync(struct state *state, uint64_t current_time)
# return res;
# }
if (SPA_UNLIKELY((res = get_status(state, current_time, &avail, &delay, &target)) < 0))
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;
--
GitLab

View File

@ -7,6 +7,9 @@ Fri Oct 13 08:33:28 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
* 0002-acp-fix-compilation.patch
* 0003-acp-only-join-and-link-when-1-capture-and-1-playback.patch
* 0004-acp-only-disable-tsched-when-linking.patch
- Add patch from upstream that fixes issues when PCM is stopped,
which includes fixing sound in qemu:
* 0001-alsa-dont-check-early-wakeup-when-PCM-stopped.patch
-------------------------------------------------------------------
Mon Oct 9 11:34:40 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>

View File

@ -78,6 +78,8 @@ Patch2: 0002-acp-fix-compilation.patch
Patch3: 0003-acp-only-join-and-link-when-1-capture-and-1-playback.patch
# PATCH-FIX-UPSTREAM 0004-acp-only-disable-tsched-when-linking.patch
Patch4: 0004-acp-only-disable-tsched-when-linking.patch
# PATCH-FIX-UPSTREAM 0001-alsa-dont-check-early-wakeup-when-PCM-stopped.patch
Patch5: 0001-alsa-dont-check-early-wakeup-when-PCM-stopped.patch
BuildRequires: docutils
BuildRequires: doxygen
@ -395,6 +397,7 @@ sed -ie "s/version : '0.3.72'/version : '%{version}'/" %{P:0}
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
%if %{pkg_vcmp gcc < 8}