From: cinerea0 <cinerea0@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] pipewire: update to 0.3.64
Date: Tue, 24 Jan 2023 21:39:20 +0100 [thread overview]
Message-ID: <20230124203920.QlKM02B_SGlZn5igEvfqPDqjuFx9Z0EfGe-ricBOf-o@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41846@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 389 bytes --]
There is an updated pull request by cinerea0 against master on the void-packages repository
https://github.com/cinerea0/void-packages pipewire
https://github.com/void-linux/void-packages/pull/41846
pipewire: update to 0.3.64
#### Testing the changes
- I tested the changes in this PR: **YES**
A patch file from https://github.com/void-linux/void-packages/pull/41846.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pipewire-41846.patch --]
[-- Type: text/x-diff, Size: 8476 bytes --]
From 0f2cb55c9037c6cd790688c9f975d5e3b9772dc8 Mon Sep 17 00:00:00 2001
From: cinerea0 <cinerea0@disroot.org>
Date: Tue, 24 Jan 2023 15:38:56 -0500
Subject: [PATCH] pipewire: update to 0.3.64
---
.../patches/fix-audioconvert-overflow.patch | 56 +++++++++++++++++++
.../pipewire/patches/fix-avx-crackle.patch | 15 +++++
.../patches/mark-deprecated-keys.patch | 51 +++++++++++++++++
srcpkgs/pipewire/template | 8 +--
4 files changed, 126 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/pipewire/patches/fix-audioconvert-overflow.patch
create mode 100644 srcpkgs/pipewire/patches/fix-avx-crackle.patch
create mode 100644 srcpkgs/pipewire/patches/mark-deprecated-keys.patch
diff --git a/srcpkgs/pipewire/patches/fix-audioconvert-overflow.patch b/srcpkgs/pipewire/patches/fix-audioconvert-overflow.patch
new file mode 100644
index 000000000000..6af679027a13
--- /dev/null
+++ b/srcpkgs/pipewire/patches/fix-audioconvert-overflow.patch
@@ -0,0 +1,56 @@
+# fixes audioconvert overflow when scaling, will be in 0.3.65+
+# https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/1d9640af5a7906620f214aa0a39c63128c8506a6
+diff --git a/spa/include/spa/utils/defs.h b/spa/include/spa/utils/defs.h
+index c602c9348827805dbafc63bf2732e0d5df833158..3b4862663643e35595d7d12d3d9cdd45fdc85868 100644
+--- a/spa/include/spa/utils/defs.h
++++ b/spa/include/spa/utils/defs.h
+@@ -274,6 +274,14 @@ struct spa_fraction {
+ #define SPA_ROUND_DOWN_N(num,align) ((num) & ~SPA_ROUND_MASK(num, align))
+ #define SPA_ROUND_UP_N(num,align) ((((num)-1) | SPA_ROUND_MASK(num, align))+1)
+
++#define SPA_SCALE32_UP(val,num,denom) \
++({ \
++ uint64_t _val = (val); \
++ uint64_t _denom = (denom); \
++ (uint32_t)(((_val) * (num) + (_denom)-1) / (_denom)); \
++})
++
++
+ #define SPA_PTR_ALIGNMENT(p,align) ((intptr_t)(p) & ((align)-1))
+ #define SPA_IS_ALIGNED(p,align) (SPA_PTR_ALIGNMENT(p,align) == 0)
+ #define SPA_PTR_ALIGN(p,align,type) ((type*)SPA_ROUND_UP_N((intptr_t)(p), (intptr_t)(align)))
+diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c
+index 08b9ceddd89f1602b39a3a0e3c0e7cbe221f49c5..012b4603101cdd76e1796f66f932a7a21f847176 100644
+--- a/spa/plugins/alsa/alsa-pcm.c
++++ b/spa/plugins/alsa/alsa-pcm.c
+@@ -1999,7 +1999,7 @@ static inline void check_position_config(struct state *state)
+ (state->rate_denom != state->position->clock.rate.denom))) {
+ state->duration = state->position->clock.duration;
+ state->rate_denom = state->position->clock.rate.denom;
+- state->threshold = (state->duration * state->rate + state->rate_denom-1) / state->rate_denom;
++ state->threshold = SPA_SCALE32_UP(state->duration, state->rate, state->rate_denom);
+ state->max_error = SPA_MAX(256.0f, state->threshold / 2.0f);
+ state->resample = ((uint32_t)state->rate != state->rate_denom) || state->matching;
+ state->alsa_sync = true;
+@@ -2569,7 +2569,7 @@ int spa_alsa_start(struct state *state)
+ setup_matching(state);
+
+ spa_dll_init(&state->dll);
+- state->threshold = (state->duration * state->rate + state->rate_denom-1) / state->rate_denom;
++ state->threshold = SPA_SCALE32_UP(state->duration, state->rate, state->rate_denom);
+ state->last_threshold = state->threshold;
+ state->max_error = SPA_MAX(256.0f, state->threshold / 2.0f);
+
+diff --git a/spa/plugins/audioconvert/audioconvert.c b/spa/plugins/audioconvert/audioconvert.c
+index 578f70ff9a769fce2d45fa414b6f89fab37216a8..783ab81741a99fb00762382b2e6507f369757906 100644
+--- a/spa/plugins/audioconvert/audioconvert.c
++++ b/spa/plugins/audioconvert/audioconvert.c
+@@ -1755,7 +1755,7 @@ impl_node_port_enum_params(void *object, int seq,
+ size = this->quantum_limit * 2;
+ /* scale the buffer size when we can. */
+ if (irate != 0 && orate != 0)
+- size = size * (irate + orate - 1) / orate;
++ size = SPA_SCALE32_UP(size, irate, orate);
+ }
+
+ param = spa_pod_builder_add_object(&b,
diff --git a/srcpkgs/pipewire/patches/fix-avx-crackle.patch b/srcpkgs/pipewire/patches/fix-avx-crackle.patch
new file mode 100644
index 000000000000..847269c06a32
--- /dev/null
+++ b/srcpkgs/pipewire/patches/fix-avx-crackle.patch
@@ -0,0 +1,15 @@
+# fixes crackling when using virtual sound, will be in 0.3.65+
+# https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/ccedf1722ae44c97ec0d058b349494c67a0b56dc
+diff --git a/src/modules/module-filter-chain/dsp-ops-avx.c b/src/modules/module-filter-chain/dsp-ops-avx.c
+index 64abcaa441ec632972137c1f6ac86f1a85c9d77e..7ea5456fa66e3689a7d238c94c96600edaf01250 100644
+--- a/src/modules/module-filter-chain/dsp-ops-avx.c
++++ b/src/modules/module-filter-chain/dsp-ops-avx.c
+@@ -59,7 +59,7 @@ void dsp_sum_avx(struct dsp_ops *ops, float *r, const float *a, const float *b,
+ _mm256_store_ps(&r[n+24], in[3]);
+ }
+ } else {
+- for (n = 0; n < unrolled; n += 16) {
++ for (n = 0; n < unrolled; n += 32) {
+ in[0] = _mm256_loadu_ps(&a[n+ 0]);
+ in[1] = _mm256_loadu_ps(&a[n+ 8]);
+ in[2] = _mm256_loadu_ps(&a[n+16]);
diff --git a/srcpkgs/pipewire/patches/mark-deprecated-keys.patch b/srcpkgs/pipewire/patches/mark-deprecated-keys.patch
new file mode 100644
index 000000000000..e21f0bda99c9
--- /dev/null
+++ b/srcpkgs/pipewire/patches/mark-deprecated-keys.patch
@@ -0,0 +1,51 @@
+# Adds macro to mark deprecated keys instead of removing them outright, will be in 0.3.65+
+# https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/a979c0f43078cbfefa2ba614ee078579042d2de2
+diff --git a/src/pipewire/keys.h b/src/pipewire/keys.h
+index ae54807bcf1c7ad5e2d3d3da1abd2095f901c66e..b0faf611d8926c4ea82c4b4ec82af33347edcc31 100644
+--- a/src/pipewire/keys.h
++++ b/src/pipewire/keys.h
+@@ -29,6 +29,7 @@
+ extern "C" {
+ #endif
+
++#include <pipewire/utils.h>
+ /**
+ * \defgroup pw_keys Key Names
+ *
+@@ -337,14 +338,14 @@ extern "C" {
+ #define PW_KEY_VIDEO_FORMAT "video.format" /**< a video format */
+ #define PW_KEY_VIDEO_SIZE "video.size" /**< a video size as "<width>x<height" */
+
+-#ifdef PW_ENABLE_DEPRECATED
+-#define PW_KEY_PRIORITY_MASTER "priority.master" /**< deprecated */
+-#define PW_KEY_NODE_TARGET "node.target" /**< deprecated since 0.3.64, use target.object. */
+-#endif /* PW_ENABLE_DEPRECATED */
+-
+ #define PW_KEY_TARGET_OBJECT "target.object" /**< a target object to link to. This can be
+ * and object name or object.serial */
+
++#ifndef PW_REMOVE_DEPRECATED
++#define PW_KEY_PRIORITY_MASTER PW_DEPRECATED("priority.master") /**< deprecated, use priority.driver */
++#define PW_KEY_NODE_TARGET PW_DEPRECATED("node.target") /**< deprecated since 0.3.64, use target.object. */
++#endif /* PW_REMOVE_DEPRECATED */
++
+ /** \}
+ */
+
+diff --git a/src/pipewire/utils.h b/src/pipewire/utils.h
+index 8106710dc0009752968a06b6f8cfb3136f1ecb1a..d8d45e0008ae946f1d135e44a065f1d66f1a1f3e 100644
+--- a/src/pipewire/utils.h
++++ b/src/pipewire/utils.h
+@@ -94,6 +94,12 @@ ssize_t pw_getrandom(void *buf, size_t buflen, unsigned int flags);
+
+ void* pw_reallocarray(void *ptr, size_t nmemb, size_t size);
+
++#ifdef PW_ENABLE_DEPRECATED
++#define PW_DEPRECATED(v) (v)
++#else
++#define PW_DEPRECATED(v) ({ __typeof__(v) _v SPA_DEPRECATED = (v); (void)_v; (v); })
++#endif /* PW_ENABLE_DEPRECATED */
++
+ /**
+ * \}
+ */
diff --git a/srcpkgs/pipewire/template b/srcpkgs/pipewire/template
index 5aa0d03d04b2..abd666c1f4e8 100644
--- a/srcpkgs/pipewire/template
+++ b/srcpkgs/pipewire/template
@@ -1,8 +1,8 @@
# Template file for 'pipewire'
pkgname=pipewire
-version=0.3.63
+version=0.3.64
revision=1
-_pms_version=0.4.1
+_pms_version=0.4.2
create_wrksrc=yes
build_wrksrc="${pkgname}-${version}"
build_style=meson
@@ -37,8 +37,8 @@ homepage="https://pipewire.org/"
changelog="https://gitlab.freedesktop.org/pipewire/pipewire/-/raw/master/NEWS"
distfiles="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${version}/pipewire-${version}.tar.gz
https://gitlab.freedesktop.org/pipewire/media-session/-/archive/${_pms_version}/media-session-${_pms_version}.tar.gz"
-checksum="1c10cc15ae8889ff0ff1653c088561ba6d46e3b1e5d4e5aacc9b01e6c1bb64b1
- 119c9216070b54018217552c7924f9888da270c3c4647c5e2b85ffa6b1574975"
+checksum="a1ab25d4ff85aefa3da3452cb41e972487b1a2da613ccd207a5d312e5c241d7c
+ 4cf8577d4431e08b0e6f29c1ad6bf8662765ab66986ea6f0151883101811c119"
make_dirs="/var/lib/pipewire 0755 _pipewire _pipewire"
system_accounts="_pipewire"
patch_args="-Np1 --directory=${build_wrksrc}"
next prev parent reply other threads:[~2023-01-24 20:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-24 19:40 [PR PATCH] " cinerea0
2023-01-24 19:47 ` cinerea0
2023-01-24 19:47 ` oreo639
2023-01-24 19:47 ` oreo639
2023-01-24 20:18 ` cinerea0
2023-01-24 20:39 ` cinerea0 [this message]
2023-01-25 14:54 ` ahesford
2023-01-25 21:46 ` [PR PATCH] [Updated] " cinerea0
2023-01-25 21:48 ` cinerea0
2023-01-25 21:54 ` cinerea0
2023-01-25 22:00 ` [PR REVIEW] " ahesford
2023-01-26 2:14 ` [PR PATCH] [Updated] " cinerea0
2023-01-26 2:15 ` [PR REVIEW] " cinerea0
2023-01-26 7:22 ` paper42
2023-01-26 11:03 ` paper42
2023-01-26 15:11 ` ahesford
2023-01-27 18:00 ` [PR PATCH] [Updated] " cinerea0
2023-01-27 18:02 ` cinerea0
2023-01-27 18:04 ` [PR PATCH] [Updated] " cinerea0
2023-01-27 18:23 ` cinerea0
2023-01-27 18:34 ` ahesford
2023-01-27 22:14 ` [PR PATCH] [Updated] " cinerea0
2023-01-27 23:29 ` pipewire: update to 0.3.65 cinerea0
2023-01-28 11:12 ` ardadem
2023-01-28 14:33 ` [PR PATCH] [Closed]: " ahesford
2023-01-28 14:39 ` ahesford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230124203920.QlKM02B_SGlZn5igEvfqPDqjuFx9Z0EfGe-ricBOf-o@z \
--to=cinerea0@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).