Merge pull request #133116 from NixOS/pipewire-21.05-backport

Pipewire 21.05 backport: 0.3.30 -> 0.3.33
This commit is contained in:
Domen Kožar 2021-08-08 23:15:18 +02:00 committed by GitHub
commit 8485c05212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 307 additions and 16 deletions

View File

@ -5417,6 +5417,12 @@
githubId = 735008; githubId = 735008;
name = "Louis Taylor"; name = "Louis Taylor";
}; };
kranzes = {
email = "personal@ilanjoselevich.com";
github = "Kranzes";
githubId = 56614642;
name = "Ilan Joselevich";
};
krav = { krav = {
email = "kristoffer@microdisko.no"; email = "kristoffer@microdisko.no";
github = "krav"; github = "krav";

View File

@ -0,0 +1,232 @@
{
"bluez5.features.device": [
{
"name": "Air 1 Plus",
"no-features": [
"hw-volume-mic"
]
},
{
"name": "AirPods",
"no-features": [
"msbc-alt1",
"msbc-alt1-rtl"
]
},
{
"name": "AirPods Pro",
"no-features": [
"msbc-alt1",
"msbc-alt1-rtl"
]
},
{
"name": "AXLOIE Goin",
"no-features": [
"msbc-alt1",
"msbc-alt1-rtl"
]
},
{
"name": "BAA 100",
"no-features": [
"hw-volume"
]
},
{
"name": "JBL Endurance RUN BT",
"no-features": [
"msbc-alt1",
"msbc-alt1-rtl",
"sbc-xq"
]
},
{
"name": "JBL LIVE650BTNC"
},
{
"name": "Soundcore Life P2-L",
"no-features": [
"msbc-alt1",
"msbc-alt1-rtl"
]
},
{
"name": "Urbanista Stockholm Plus",
"no-features": [
"msbc-alt1",
"msbc-alt1-rtl"
]
},
{
"address": "~^94:16:25:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^9c:64:8b:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^a0:e9:db:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^0c:a6:94:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^00:14:02:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^44:5e:f3:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^d4:9c:28:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^00:18:6b:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^b8:ad:3e:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^a0:e9:db:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^00:24:1c:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^00:11:b1:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^a4:15:66:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^00:14:f1:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^00:26:7e:",
"no-features": [
"hw-volume"
]
},
{
"address": "~^90:03:b7:",
"no-features": [
"hw-volume"
]
}
],
"bluez5.features.adapter": [
{
"bus-type": "usb",
"vendor-id": "usb:0bda"
},
{
"bus-type": "usb",
"no-features": [
"msbc-alt1-rtl"
]
},
{
"no-features": [
"msbc-alt1-rtl"
]
}
],
"bluez5.features.kernel": [
{
"sysname": "Linux",
"release": "~^[0-4]\\.",
"no-features": [
"msbc-alt1",
"msbc-alt1-rtl"
]
},
{
"sysname": "Linux",
"release": "~^5\\.[1-7]\\.",
"no-features": [
"msbc-alt1",
"msbc-alt1-rtl"
]
},
{
"sysname": "Linux",
"release": "~^5\\.(8|9|10)\\.",
"no-features": [
"msbc-alt1"
]
},
{
"sysname": "Linux",
"release": "~^5\\.12\\.(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17)($|[^0-9])"
},
{
"sysname": "Linux",
"release": "~^5\\.12\\.",
"no-features": [
"msbc-alt1"
]
},
{
"sysname": "Linux",
"release": "~^5\\.13\\.(1|2)($|[^0-9])"
},
{
"sysname": "Linux",
"release": "~^5\\.13\\.",
"no-features": [
"msbc-alt1"
]
},
{
"sysname": "Linux",
"release": "~^5\\.14\\.",
"no-features": [
"msbc-alt1"
]
},
{
"no-features": []
}
]
}

View File

@ -7,7 +7,7 @@
}, },
"context.modules": [ "context.modules": [
{ {
"name": "libpipewire-module-rtkit", "name": "libpipewire-module-rt",
"args": {}, "args": {},
"flags": [ "flags": [
"ifexists", "ifexists",
@ -24,5 +24,15 @@
"name": "libpipewire-module-metadata" "name": "libpipewire-module-metadata"
} }
], ],
"jack.properties": {} "jack.properties": {},
"jack.rules": [
{
"matches": [
{}
],
"actions": {
"update-props": {}
}
}
]
} }

View File

@ -59,6 +59,7 @@
"with-pulseaudio": [ "with-pulseaudio": [
"with-audio", "with-audio",
"bluez5", "bluez5",
"bluez5-autoswitch",
"logind", "logind",
"restore-stream", "restore-stream",
"streams-follow-default" "streams-follow-default"

View File

@ -15,6 +15,7 @@ let
defaults = { defaults = {
alsa-monitor = (builtins.fromJSON (builtins.readFile ./alsa-monitor.conf.json)); alsa-monitor = (builtins.fromJSON (builtins.readFile ./alsa-monitor.conf.json));
bluez-monitor = (builtins.fromJSON (builtins.readFile ./bluez-monitor.conf.json)); bluez-monitor = (builtins.fromJSON (builtins.readFile ./bluez-monitor.conf.json));
bluez-hardware = (builtins.fromJSON (builtins.readFile ./bluez-hardware.conf.json));
media-session = (builtins.fromJSON (builtins.readFile ./media-session.conf.json)); media-session = (builtins.fromJSON (builtins.readFile ./media-session.conf.json));
v4l2-monitor = (builtins.fromJSON (builtins.readFile ./v4l2-monitor.conf.json)); v4l2-monitor = (builtins.fromJSON (builtins.readFile ./v4l2-monitor.conf.json));
}; };
@ -22,6 +23,7 @@ let
configs = { configs = {
alsa-monitor = recursiveUpdate defaults.alsa-monitor cfg.config.alsa-monitor; alsa-monitor = recursiveUpdate defaults.alsa-monitor cfg.config.alsa-monitor;
bluez-monitor = recursiveUpdate defaults.bluez-monitor cfg.config.bluez-monitor; bluez-monitor = recursiveUpdate defaults.bluez-monitor cfg.config.bluez-monitor;
bluez-hardware = defaults.bluez-hardware;
media-session = recursiveUpdate defaults.media-session cfg.config.media-session; media-session = recursiveUpdate defaults.media-session cfg.config.media-session;
v4l2-monitor = recursiveUpdate defaults.v4l2-monitor cfg.config.v4l2-monitor; v4l2-monitor = recursiveUpdate defaults.v4l2-monitor cfg.config.v4l2-monitor;
}; };
@ -120,6 +122,10 @@ in {
mkIf config.services.pipewire.pulse.enable { mkIf config.services.pipewire.pulse.enable {
source = json.generate "bluez-monitor.conf" configs.bluez-monitor; source = json.generate "bluez-monitor.conf" configs.bluez-monitor;
}; };
environment.etc."pipewire/media-session.d/bluez-hardware.conf" =
mkIf config.services.pipewire.pulse.enable {
source = json.generate "bluez-hardware.conf" configs.bluez-hardware;
};
environment.etc."pipewire/media-session.d/with-jack" = environment.etc."pipewire/media-session.d/with-jack" =
mkIf config.services.pipewire.jack.enable { mkIf config.services.pipewire.jack.enable {

View File

@ -0,0 +1,31 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "libfreeaptx";
version = "0.1.1";
src = fetchFromGitHub {
owner = "iamthehorker";
repo = pname;
rev = version;
sha256 = "sha256-eEUhOrKqb2hHWanY+knpY9FBEnjkkFTB+x6BZgMBpbo=";
};
makeFlags = [
"PREFIX=${placeholder "out"}"
# disable static builds
"ANAME="
"AOBJECTS="
"STATIC_UTILITIES="
];
enableParallelBuilding = true;
meta = with lib; {
description = "Free Implementation of Audio Processing Technology codec (aptX)";
license = licenses.lgpl21Plus;
homepage = "https://github.com/iamthehorker/libfreeaptx";
platforms = platforms.linux;
maintainers = with maintainers; [ kranzes ];
};
}

View File

@ -2,16 +2,13 @@ diff --git a/meson_options.txt b/meson_options.txt
index 93b5e2a9..1b915ac3 100644 index 93b5e2a9..1b915ac3 100644
--- a/meson_options.txt --- a/meson_options.txt
+++ b/meson_options.txt +++ b/meson_options.txt
@@ -13,6 +13,9 @@ option('media-session', @@ -200,3 +200,6 @@ option('media-session',
description: 'Build and install pipewire-media-session',
type: 'feature', type: 'feature',
value: 'auto') value: 'auto')
+option('media-session-prefix', +option('media-session-prefix',
+ description: 'Install directory for pipewire-media-session and its support files', + description: 'Install directory for pipewire-media-session and its support files',
+ type: 'string') + type: 'string')
option('man', option('session-managers',
description: 'Build manpages',
type: 'feature',
diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build
index 1edebb2d..251270eb 100644 index 1edebb2d..251270eb 100644
--- a/src/daemon/systemd/user/meson.build --- a/src/daemon/systemd/user/meson.build

View File

@ -6,8 +6,8 @@ index bbafa134..227d3e06 100644
# access.allowed to list an array of paths of allowed # access.allowed to list an array of paths of allowed
# apps. # apps.
#access.allowed = [ #access.allowed = [
- # @media_session_path@ - # @session_manager_path@
+ # <media_session_path> + # <session_manager_path>
#] #]
# An array of rejected paths. # An array of rejected paths.
@ -15,8 +15,8 @@ index bbafa134..227d3e06 100644
# but it is better to start it as a systemd service. # but it is better to start it as a systemd service.
# Run the session manager with -h for options. # Run the session manager with -h for options.
# #
- @comment@{ path = "@media_session_path@" args = "" } - @comment@{ path = "@session_manager_path@" args = "@session_manager_args@" }
+ @comment@{ path = "<media_session_path>" args = "" } + @comment@{ path = "<session_manager_path>" args = "@session_manager_args@" }
# #
# You can optionally start the pulseaudio-server here as well # You can optionally start the pulseaudio-server here as well
# but it is better to start it as a systemd service. # but it is better to start it as a systemd service.

View File

@ -14,6 +14,7 @@
, dbus , dbus
, alsaLib , alsaLib
, libjack2 , libjack2
, libusb1
, udev , udev
, libva , libva
, libsndfile , libsndfile
@ -28,7 +29,7 @@
, withMediaSession ? true , withMediaSession ? true
, gstreamerSupport ? true, gst_all_1 ? null , gstreamerSupport ? true, gst_all_1 ? null
, ffmpegSupport ? true, ffmpeg ? null , ffmpegSupport ? true, ffmpeg ? null
, bluezSupport ? true, bluez ? null, sbc ? null, libopenaptx ? null, ldacbt ? null, fdk_aac ? null , bluezSupport ? true, bluez ? null, sbc ? null, libfreeaptx ? null, ldacbt ? null, fdk_aac ? null
, nativeHspSupport ? true , nativeHspSupport ? true
, nativeHfpSupport ? true , nativeHfpSupport ? true
, ofonoSupport ? true , ofonoSupport ? true
@ -43,10 +44,11 @@ let
}; };
mesonEnable = b: if b then "enabled" else "disabled"; mesonEnable = b: if b then "enabled" else "disabled";
mesonList = l: "[" + lib.concatStringsSep "," l + "]";
self = stdenv.mkDerivation rec { self = stdenv.mkDerivation rec {
pname = "pipewire"; pname = "pipewire";
version = "0.3.30"; version = "0.3.33";
outputs = [ outputs = [
"out" "out"
@ -64,7 +66,7 @@ let
owner = "pipewire"; owner = "pipewire";
repo = "pipewire"; repo = "pipewire";
rev = version; rev = version;
sha256 = "sha256-DnaPvZoDaegjtJNKBmCJEAZe5FQBnSER79FPnxiWQUE="; sha256 = "sha256-HP2HcGjrLw0+8pO1upvJQk32v+bifYpi5Rtod0TbBis=";
}; };
patches = [ patches = [
@ -96,6 +98,7 @@ let
dbus dbus
glib glib
libjack2 libjack2
libusb1
libsndfile libsndfile
ncurses ncurses
udev udev
@ -107,7 +110,7 @@ let
systemd systemd
] ++ lib.optionals gstreamerSupport [ gst_all_1.gst-plugins-base gst_all_1.gstreamer ] ] ++ lib.optionals gstreamerSupport [ gst_all_1.gst-plugins-base gst_all_1.gstreamer ]
++ lib.optional ffmpegSupport ffmpeg ++ lib.optional ffmpegSupport ffmpeg
++ lib.optionals bluezSupport [ bluez libopenaptx ldacbt sbc fdk_aac ] ++ lib.optionals bluezSupport [ bluez libfreeaptx ldacbt sbc fdk_aac ]
++ lib.optional pulseTunnelSupport libpulseaudio ++ lib.optional pulseTunnelSupport libpulseaudio
++ lib.optional zeroconfSupport avahi; ++ lib.optional zeroconfSupport avahi;
@ -122,6 +125,7 @@ let
"-Dmedia-session-prefix=${placeholder "mediaSession"}" "-Dmedia-session-prefix=${placeholder "mediaSession"}"
"-Dlibjack-path=${placeholder "jack"}/lib" "-Dlibjack-path=${placeholder "jack"}/lib"
"-Dlibcamera=disabled" "-Dlibcamera=disabled"
"-Droc=disabled"
"-Dlibpulse=${mesonEnable pulseTunnelSupport}" "-Dlibpulse=${mesonEnable pulseTunnelSupport}"
"-Davahi=${mesonEnable zeroconfSupport}" "-Davahi=${mesonEnable zeroconfSupport}"
"-Dgstreamer=${mesonEnable gstreamerSupport}" "-Dgstreamer=${mesonEnable gstreamerSupport}"
@ -133,6 +137,7 @@ let
"-Dbluez5-backend-hsphfpd=${mesonEnable hsphfpdSupport}" "-Dbluez5-backend-hsphfpd=${mesonEnable hsphfpdSupport}"
"-Dsysconfdir=/etc" "-Dsysconfdir=/etc"
"-Dpipewire_confdata_dir=${placeholder "lib"}/share/pipewire" "-Dpipewire_confdata_dir=${placeholder "lib"}/share/pipewire"
"-Dsession-managers=${mesonList (lib.optional withMediaSession "media-session")}"
]; ];
FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
@ -187,6 +192,7 @@ let
paths-out-media-session = [ paths-out-media-session = [
"nix-support/etc/pipewire/media-session.d/alsa-monitor.conf.json" "nix-support/etc/pipewire/media-session.d/alsa-monitor.conf.json"
"nix-support/etc/pipewire/media-session.d/bluez-monitor.conf.json" "nix-support/etc/pipewire/media-session.d/bluez-monitor.conf.json"
"nix-support/etc/pipewire/media-session.d/bluez-hardware.conf.json"
"nix-support/etc/pipewire/media-session.d/media-session.conf.json" "nix-support/etc/pipewire/media-session.d/media-session.conf.json"
"nix-support/etc/pipewire/media-session.d/v4l2-monitor.conf.json" "nix-support/etc/pipewire/media-session.d/v4l2-monitor.conf.json"
]; ];
@ -203,7 +209,7 @@ let
homepage = "https://pipewire.org/"; homepage = "https://pipewire.org/";
license = licenses.mit; license = licenses.mit;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ jtojnar ]; maintainers = with maintainers; [ jtojnar kranzes ];
}; };
}; };

View File

@ -16099,6 +16099,8 @@ in
libffi = callPackage ../development/libraries/libffi { }; libffi = callPackage ../development/libraries/libffi { };
libfreeaptx = callPackage ../development/libraries/libfreeaptx { };
libfreefare = callPackage ../development/libraries/libfreefare { libfreefare = callPackage ../development/libraries/libfreefare {
inherit (darwin) libobjc; inherit (darwin) libobjc;
}; };