1 |
commit: 431a2f1ce462c3b915184beac83eb73181fcf2cd |
2 |
Author: Igor V. Kovalenko <igor.v.kovalenko <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Apr 30 16:18:09 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 1 19:48:53 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=431a2f1c |
7 |
|
8 |
media-video/pipewire: Drop alsa-plugins[pulseaudio] blocker |
9 |
|
10 |
Currently alsa-plugins[pulseaudio] installs pulse plugin which is only enabled |
11 |
in alsa lib configuration if plugin can access pulseaudio server in runtime. |
12 |
This is implemented using a runtime conf hook in 51-pulseaudio-probe.conf |
13 |
|
14 |
Alsa lib runtime conf hooks are run after all static configuration is applied. |
15 |
This causes a problem to coexistence of pipewire-alsa and pulse plugin: |
16 |
- normally, pipewire-pulse is enabled which provides pulseaudio server |
17 |
connection to libpulse users |
18 |
- since pulseaudio server is accessible, pulse conf hook will override alsa |
19 |
pcm.!default and ctl.!default to use pulse plugin. |
20 |
|
21 |
To work around this, change pipewire-alsa plugin configuration from static conf |
22 |
to conf hook which will run after pulse conf hook. To make sure user can still |
23 |
override default device, make sure this new conf hook will also load |
24 |
/etc/asound.conf and ~/.asoundrc again like it is done by pulse conf hook. |
25 |
|
26 |
Since pipewire plugin will take precedence now if pipewire-alsa is installed, |
27 |
drop the blocker with media-sound/alsa-plugins[pulseaudio] |
28 |
|
29 |
Closes: https://bugs.gentoo.org/799881 |
30 |
Closes: https://bugs.gentoo.org/791499 |
31 |
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko <AT> gmail.com> |
32 |
Closes: https://github.com/gentoo/gentoo/pull/25269 |
33 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
34 |
|
35 |
.../pipewire/files/99-pipewire-default-hook.conf | 17 +++++++++++++++++ |
36 |
...pipewire-0.3.51.ebuild => pipewire-0.3.51-r1.ebuild} | 8 ++++++-- |
37 |
2 files changed, 23 insertions(+), 2 deletions(-) |
38 |
|
39 |
diff --git a/media-video/pipewire/files/99-pipewire-default-hook.conf b/media-video/pipewire/files/99-pipewire-default-hook.conf |
40 |
new file mode 100644 |
41 |
index 000000000000..172de5c27f60 |
42 |
--- /dev/null |
43 |
+++ b/media-video/pipewire/files/99-pipewire-default-hook.conf |
44 |
@@ -0,0 +1,17 @@ |
45 |
+# Load pipewire configuration at conf hook processing time. This allows to |
46 |
+# override pulseaudio defaults configuration which is also applied via hook. |
47 |
+# |
48 |
+# Note since hooks are run after /etc/asound.conf and ~/.asoundrc are applied, |
49 |
+# we load these again here make sure that user configuration takes precedence. |
50 |
+ |
51 |
+@hooks [ |
52 |
+ { |
53 |
+ func load |
54 |
+ files [ |
55 |
+ "/usr/share/alsa/alsa.conf.d/99-pipewire-default.conf" |
56 |
+ "/etc/asound.conf" |
57 |
+ "~/.asoundrc" |
58 |
+ ] |
59 |
+ errors false |
60 |
+ } |
61 |
+] |
62 |
|
63 |
diff --git a/media-video/pipewire/pipewire-0.3.51.ebuild b/media-video/pipewire/pipewire-0.3.51-r1.ebuild |
64 |
similarity index 98% |
65 |
rename from media-video/pipewire/pipewire-0.3.51.ebuild |
66 |
rename to media-video/pipewire/pipewire-0.3.51-r1.ebuild |
67 |
index e60bb1f87151..b22860800f14 100644 |
68 |
--- a/media-video/pipewire/pipewire-0.3.51.ebuild |
69 |
+++ b/media-video/pipewire/pipewire-0.3.51-r1.ebuild |
70 |
@@ -85,7 +85,6 @@ RDEPEND=" |
71 |
lv2? ( media-libs/lilv ) |
72 |
pipewire-alsa? ( |
73 |
>=media-libs/alsa-lib-1.1.7[${MULTILIB_USEDEP}] |
74 |
- !media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio] |
75 |
) |
76 |
!pipewire-alsa? ( media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio] ) |
77 |
ssl? ( dev-libs/openssl:= ) |
78 |
@@ -237,10 +236,15 @@ multilib_src_install_all() { |
79 |
|
80 |
if use pipewire-alsa; then |
81 |
dodir /etc/alsa/conf.d |
82 |
+ |
83 |
+ # Install pipewire conf loader hook |
84 |
+ insinto /usr/share/alsa/alsa.conf.d |
85 |
+ doins "${FILESDIR}"/99-pipewire-default-hook.conf |
86 |
+ |
87 |
# These will break if someone has /etc that is a symbolic link to a subfolder! See #724222 |
88 |
# And the current dosym8 -r implementation is likely affected by the same issue, too. |
89 |
dosym ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d/50-pipewire.conf |
90 |
- dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/99-pipewire-default.conf |
91 |
+ dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default-hook.conf /etc/alsa/conf.d/99-pipewire-default-hook.conf |
92 |
fi |
93 |
|
94 |
if ! use systemd; then |