diff options
author | Trolli Schmittlauch <t.schmittlauch+nixos@orlives.de> | 2022-04-09 12:39:09 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2022-04-20 15:07:16 +0200 |
commit | 7a2605e0f3dc99e02cd577634f792f7a4d229378 (patch) | |
tree | 7b7c264481ea75e67f7fcb08d9c1536263e21628 /pkgs/servers/pulseaudio | |
parent | 528db1977feb45a4b7ea4ea459a87df967a03394 (diff) |
pulseaudio: support advanced codecs when enabling bluetooth support
- this relies on gstreamer for encoding - advanced bluetooth codecs include LDAC and aptX
Diffstat (limited to 'pkgs/servers/pulseaudio')
-rw-r--r-- | pkgs/servers/pulseaudio/default.nix | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index b0ccd5f76354d..f3d5e83b5945f 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -4,7 +4,8 @@ , avahi, libjack2, libasyncns, lirc, dbus , sbc, bluez5, udev, openssl, fftwFloat , soxr, speexdsp, systemd, webrtc-audio-processing -, check, meson, ninja, m4 +, gst_all_1 +, check, meson, ninja, m4, wrapGAppsHook , x11Support ? false @@ -48,7 +49,9 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; nativeBuildInputs = [ pkg-config meson ninja makeWrapper perlPackages.perl perlPackages.XMLParser m4 ] - ++ lib.optionals stdenv.isLinux [ glib ]; + ++ lib.optionals stdenv.isLinux [ glib ] + # gstreamer plugin discovery requires wrapping + ++ lib.optional bluetoothSupport wrapGAppsHook; propagatedBuildInputs = lib.optionals stdenv.isLinux [ libcap ]; @@ -64,7 +67,9 @@ stdenv.mkDerivation rec { ++ lib.optional useSystemd systemd ++ lib.optionals stdenv.isLinux [ alsa-lib udev ] ++ lib.optional airtunesSupport openssl - ++ lib.optionals bluetoothSupport [ bluez5 sbc ] + # aptX and LDAC codecs are in gst-plugins-bad so far, rtpldacpay is in -good + ++ lib.optionals bluetoothSupport ([ bluez5 sbc ] + ++ (builtins.attrValues { inherit (gst_all_1) gst-plugins-bad gst-plugins-good gst-plugins-base gstreamer; })) ++ lib.optional remoteControlSupport lirc ++ lib.optional zeroconfSupport avahi ); @@ -74,7 +79,8 @@ stdenv.mkDerivation rec { "-Dasyncns=${if !libOnly then "enabled" else "disabled"}" "-Davahi=${if zeroconfSupport then "enabled" else "disabled"}" "-Dbluez5=${if !libOnly then "enabled" else "disabled"}" - "-Dbluez5-gstreamer=disabled" + # advanced bluetooth audio codecs are provided by gstreamer + "-Dbluez5-gstreamer=${if (!libOnly && bluetoothSupport) then "enabled" else "disabled"}" "-Ddatabase=simple" "-Ddoxygen=false" "-Delogind=disabled" |