diff --git a/0001-pulse-server-also-advance-read-pointer-in-underrun.patch b/0001-pulse-server-also-advance-read-pointer-in-underrun.patch index 255a314..46a7730 100644 --- a/0001-pulse-server-also-advance-read-pointer-in-underrun.patch +++ b/0001-pulse-server-also-advance-read-pointer-in-underrun.patch @@ -1,7 +1,7 @@ -From b720da771efa950cf380101bed42d5d5ee177908 Mon Sep 17 00:00:00 2001 +From 0c9dd45914452a7676e0cea2c10a0d7ad5bbaf32 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 10 Nov 2022 16:13:33 +0100 -Subject: [PATCH] pulse-server: also advance read pointer in underrun +Subject: [PATCH 1/2] pulse-server: also advance read pointer in underrun So that we ask for more data from the client. diff --git a/0002-audioadapter-perform-setup-again-after-a-PortConfig.patch b/0002-audioadapter-perform-setup-again-after-a-PortConfig.patch new file mode 100644 index 0000000..8ff4e9a --- /dev/null +++ b/0002-audioadapter-perform-setup-again-after-a-PortConfig.patch @@ -0,0 +1,34 @@ +From 3d5142fa504623f6084d2938c69678256d6c2ff3 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Tue, 15 Nov 2022 15:40:47 +0100 +Subject: [PATCH 2/2] audioadapter: perform setup again after a PortConfig + +After the ports are reconfigured, we need to perform the setup again so +that buffers and processing can happen with the right settings. + +This fixes an issue when autoswitching between A2DP and HFP with +bluetooth headsets when there is also a stereo capture device available. +The input stream of the browser is quickly reconfigured between stereo +and mono with only a Pause command in between, clearing the setup state +is enough to redo the setup when going back to Playing. + +Fixes #2764 +--- + spa/plugins/audioconvert/audioconvert.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/spa/plugins/audioconvert/audioconvert.c b/spa/plugins/audioconvert/audioconvert.c +index 6c7144d38..7fe62228f 100644 +--- a/spa/plugins/audioconvert/audioconvert.c ++++ b/spa/plugins/audioconvert/audioconvert.c +@@ -979,6 +979,7 @@ static int reconfigure_mode(struct impl *this, enum spa_param_port_config_mode m + } + + this->monitor = monitor; ++ this->setup = false; + dir->control = control; + dir->have_profile = true; + dir->mode = mode; +-- +2.38.1 + diff --git a/pipewire.spec b/pipewire.spec index 32f4af5..bbd3c01 100644 --- a/pipewire.spec +++ b/pipewire.spec @@ -9,7 +9,7 @@ %global ms_version 0.4.1 # For rpmdev-bumpspec and releng automation -%global baserelease 3 +%global baserelease 4 #global snapdate 20210107 #global gitcommit b17db2cebc1a5ab2c01851d29c05f79cd2f262bb @@ -74,6 +74,7 @@ Source1: https://gitlab.freedesktop.org/pipewire/media-session/-/archive/ ## upstream patches Patch0001: 0001-pulse-server-also-advance-read-pointer-in-underrun.patch +Patch0002: 0002-audioadapter-perform-setup-again-after-a-PortConfig.patch ## upstreamable patches @@ -615,6 +616,9 @@ systemctl --no-reload preset --global pipewire.socket >/dev/null 2>&1 || : %endif %changelog +* Tue Nov 15 2022 Wim Taymans - 0.3.60-4 +- Add patch to avoid crashes when switching profiles + * Thu Nov 10 2022 Wim Taymans - 0.3.60-3 - Add patch to make Telegram playback work again