-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bluez APTX support in pipewire (#50)
* add pipewire aptx --------- Co-authored-by: Guillaume <gplourde@proton.me>
- Loading branch information
Showing
15 changed files
with
134 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
set -oex pipefail | ||
|
||
SPA_VERSION=0.2 | ||
PIPEWIRE_VERSION=$(rpm -q --queryformat '%{VERSION}' pipewire) | ||
BUILT_DIR=/tmp/built | ||
|
||
mkdir /tmp/pipewire | ||
pushd /tmp/pipewire | ||
|
||
# install build deps | ||
dnf install -y meson gcc cmake glib2-devel dbus-devel sbc-devel bluez-libs-devel | ||
|
||
# install libfreeaptx | ||
git clone https://github.com/iamthehorker/libfreeaptx /tmp/pipewire/libfreeaptx | ||
pushd /tmp/pipewire/libfreeaptx | ||
make install PREFIX=/tmp/built/usr | ||
popd | ||
|
||
# export LIBRARY_PATH=/tmp/built/usr/lib64:${LIBRARY_PATH} | ||
# export LD_LIBRARY_PATH=/tmp/built/usr/lib64:${LD_LIBRARY_PATH} | ||
# export C_INCLUDE_PATH=/tmp/built/usr/include:${C_INCLUDE_PATH} | ||
export PKG_CONFIG_PATH=/tmp/built/usr/lib/pkgconfig:${PKG_CONFIG_PATH} | ||
|
||
# build bluez5-codec-aptx | ||
rm -rf /tmp/pipewire/src | ||
# get source | ||
git clone --depth 1 --branch "${PIPEWIRE_VERSION}" https://gitlab.freedesktop.org/pipewire/pipewire.git /tmp/pipewire/src | ||
pushd /tmp/pipewire/src | ||
|
||
meson setup build | ||
meson configure build -D bluez5-codec-aptx=enabled --auto-features=disabled \ | ||
-D examples=disabled -D bluez5=enabled -D bluez5-codec-aptx=enabled \ | ||
-D session-managers=[] | ||
meson compile -C build spa-codec-bluez5-aptx | ||
mkdir -p "${BUILT_DIR}"/usr/lib64/spa-"${SPA_VERSION}"/bluez5 | ||
install -pm 0755 ./build/spa/plugins/bluez5/libspa-codec-bluez5-aptx.so \ | ||
"${BUILT_DIR}"/usr/lib64/spa-"${SPA_VERSION}"/bluez5/ | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Section "OutputClass" | ||
Identifier "nvidia" | ||
MatchDriver "nvidia-drm" | ||
Driver "nvidia" | ||
Option "AllowEmptyInitialConfiguration" | ||
Option "SLI" "Auto" | ||
Option "BaseMosaic" "on" | ||
EndSection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
GBM_BACKEND=nvidia-drm | ||
__GLX_VENDOR_LIBRARY_NAME=nvidia | ||
__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1 | ||
MOZ_DISABLE_RDD_SANDBOX=1 | ||
LIBVA_DRIVER_NAME=nvidia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1 @@ | ||
# prevent nouveau module from loading | ||
blacklist nouveau | ||
|
||
# force modeset and fbdev | ||
options nvidia_drm modeset=1 | ||
options nvidia_drm fbdev=1 | ||
options nvidia NVreg_EnableGpuFirmware=1 | ||
|
||
# save and restore memory allocations | ||
options nvidia NVreg_PreserveVideoMemoryAllocations=1 | ||
options nvidia NVreg_TemporaryFilePath=/var/tmp | ||
options nvidia-drm modeset=1 fbdev=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm " | ||
install_optional_items+=" /etc/modprobe.d/nvidia.conf " | ||
install_optional_items+=" /usr/lib/modprobe.d/nvidia.conf " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Nouveau must be blacklisted here as well beside from the initrd to avoid a | ||
# delayed loading (for example on Optimus laptops where the Nvidia card is not | ||
# driving the main display). | ||
|
||
blacklist nouveau | ||
|
||
# Make a soft dependency for nvidia-uvm as adding the module loading to | ||
# /usr/lib/modules-load.d/nvidia-uvm.conf for systemd consumption, makes the | ||
# configuration file to be added to the initrd but not the module, throwing an | ||
# error on plymouth about not being able to find the module. | ||
# Ref: /usr/lib/dracut/modules.d/00systemd/module-setup.sh | ||
|
||
# Even adding the module is not the correct thing, as we don't want it to be | ||
# included in the initrd, so use this configuration file to specify the | ||
# dependency. | ||
|
||
softdep nvidia post: nvidia-uvm | ||
|
||
# Enable complete power management. From: | ||
# file:///usr/share/doc/nvidia-driver/html/powermanagement.html | ||
|
||
options nvidia NVreg_DynamicPowerManagement=0x02 | ||
options nvidia NVreg_EnableS0ixPowerManagement=1 | ||
options nvidia NVreg_PreserveVideoMemoryAllocations=1 |
Oops, something went wrong.