From 4e4864342df696e26bdea9ae231214255a80df95 Mon Sep 17 00:00:00 2001 From: fewtarius Date: Sun, 6 Aug 2023 23:10:30 +0000 Subject: [PATCH] Working on pipewire integration. --- distributions/JELOS/options | 5 +- packages/audio/alsa-utils/autostart/005-alsa | 42 -------- packages/audio/ldacBT/package.mk | 19 ++++ packages/audio/libfreeaptx/package.mk | 40 ++++++++ packages/audio/libldac/package.mk | 25 ++--- packages/audio/pipewire/package.mk | 99 +++++++++++++++++++ packages/audio/wireplumber/package.mk | 48 +++++++++ .../devices/AOKZOE AOKZOE A1 Pro/001-audio | 15 --- .../devices/ATARI VCS 800 Onyx/001-audio | 13 --- .../quirks/devices/AYANEO AIR Plus/001-audio | 25 ----- .../quirks/devices/AYANEO AIR/001-audio | 20 ---- .../quirks/devices/GPD G1618-04/001-audio | 15 --- .../quirks/devices/GPD G1619-04/001-audio | 20 ---- .../quirks/devices/Valve Jupiter/001-audio | 43 -------- packages/jelos/profile.d/02-distribution | 19 ++-- packages/sysutils/sleep/sources/sleep.sh | 6 -- packages/sysutils/systemd/package.mk | 4 +- packages/virtual/image/package.mk | 1 + packages/wayland/weston/package.mk | 4 +- 19 files changed, 234 insertions(+), 229 deletions(-) delete mode 100755 packages/audio/alsa-utils/autostart/005-alsa create mode 100644 packages/audio/ldacBT/package.mk create mode 100644 packages/audio/libfreeaptx/package.mk create mode 100644 packages/audio/pipewire/package.mk create mode 100644 packages/audio/wireplumber/package.mk delete mode 100755 packages/hardware/quirks/devices/AOKZOE AOKZOE A1 Pro/001-audio delete mode 100644 packages/hardware/quirks/devices/ATARI VCS 800 Onyx/001-audio delete mode 100644 packages/hardware/quirks/devices/AYANEO AIR Plus/001-audio delete mode 100755 packages/hardware/quirks/devices/AYANEO AIR/001-audio delete mode 100644 packages/hardware/quirks/devices/GPD G1618-04/001-audio delete mode 100644 packages/hardware/quirks/devices/GPD G1619-04/001-audio delete mode 100644 packages/hardware/quirks/devices/Valve Jupiter/001-audio diff --git a/distributions/JELOS/options b/distributions/JELOS/options index 7412caa12..3424a03e1 100644 --- a/distributions/JELOS/options +++ b/distributions/JELOS/options @@ -38,7 +38,10 @@ GLIBC_LOCALES="yes" # build and install PulseAudio support (yes / no) - PULSEAUDIO_SUPPORT="yes" + PULSEAUDIO_SUPPORT="no" + +# build and install pipewire support (yes / no) + PIPEWIRE_SUPPORT="yes" # Define package sets to clean based on the type of build being executed. # This should be updated to be more dynamic in the future. diff --git a/packages/audio/alsa-utils/autostart/005-alsa b/packages/audio/alsa-utils/autostart/005-alsa deleted file mode 100755 index f7c9ed517..000000000 --- a/packages/audio/alsa-utils/autostart/005-alsa +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: Apache-2.0 -# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) - -. /etc/profile - -tocon "Configuring audio..." -# Revert to stored setting when bluetooth was still selected at last shutdown. -# This is a workaround - headsets that auto-connect at boot tend to be -# unreliable, so for now it's better to force a manual reconnect. -LAST_AUDIO_DEVICE=$(set-audio get) -if [[ "${LAST_AUDIO_DEVICE}" =~ ^Device.* ]] -then - set-audio restore -fi - -if [ ! -e "/storage/.config/asound.conf" ] -then - set-audio set "DEFAULT (SYSTEM PROVIDED)" -fi - -if [ ! -e "/storage/.config/asound.state" ] && [ -e /usr/config/asound.state ] -then - cp /usr/config/asound.state /storage/.config -fi - -# Initialize sound using the state if available. -if [ -e "/storage/.config/asound.state" ] -then - alsactl restore -f /storage/.config/asound.state -fi - -PREAMP=$(get_setting "audio.preamp" 2>/dev/null) -if [ -z "${PREAMP}" ] -then - PREAMP=50 - set_setting audio.preamp ${PREAMP} -fi -amixer -M set Pre-Amp -- ${PREAMP}% - -VOL=$(get_setting "audio.volume" 2>/dev/null) -amixer -M set "${DEVICE_AUDIO_MIXER}" ${VOL}% diff --git a/packages/audio/ldacBT/package.mk b/packages/audio/ldacBT/package.mk new file mode 100644 index 000000000..00000989c --- /dev/null +++ b/packages/audio/ldacBT/package.mk @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv) + +PKG_NAME="ldacBT" +PKG_VERSION="2.0.2.3" +PKG_SHA256="c02998718f9c4620437d7594b4d121b3ab4c5cfeba8d41fa31dd5c71db09edca" +PKG_LICENSE="Apache" +PKG_SITE="https://github.com/EHfive/ldacBT" +PKG_URL="https://github.com/EHfive/ldacBT/archive/v${PKG_VERSION}.tar.gz" +PKG_DEPENDS_TARGET="toolchain" +PKG_DEPENDS_UNPACK="libldac" +PKG_LONGDESC="LDAC Bluetooth encoder library (build tools)" + +PKG_CMAKE_OPTS_TARGET="-DLDAC_SOFT_FLOAT=OFF" + +post_unpack() { + rm -rf ${PKG_BUILD}/libldac + ln -sf $(get_build_dir libldac) ${PKG_BUILD}/libldac +} diff --git a/packages/audio/libfreeaptx/package.mk b/packages/audio/libfreeaptx/package.mk new file mode 100644 index 000000000..02e1150a9 --- /dev/null +++ b/packages/audio/libfreeaptx/package.mk @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv) + +PKG_NAME="libfreeaptx" +PKG_VERSION="0.1.1" +PKG_SHA256="7acf514446cae59585d9bc21e4f98f4a3856f4741c3a7a09d06e8ac5bf2f7315" +PKG_LICENSE="LGPL" +PKG_SITE="https://github.com/iamthehorker/libfreeaptx" +PKG_URL="https://github.com/iamthehorker/libfreeaptx/archive/${PKG_VERSION}.tar.gz" +PKG_DEPENDS_TARGET="toolchain" +PKG_LONGDESC="Open Source aptX codec library" +PKG_TOOLCHAIN="manual" +PKG_BUILD_FLAGS="+pic" + +make_target() { + ${CC} ${CFLAGS} -I${PKG_BUILD} -c -o ${PKG_NAME##*lib}.o ${PKG_NAME##*lib}.c + ${AR} -rcs ${PKG_NAME}.a ${PKG_NAME##*lib}.o +} + +makeinstall_target() { + mkdir -p ${SYSROOT_PREFIX}/usr/lib + cp -a ${PKG_NAME}.a ${SYSROOT_PREFIX}/usr/lib/ + + mkdir -p ${SYSROOT_PREFIX}/usr/include + cp -a ${PKG_NAME##*lib}.h ${SYSROOT_PREFIX}/usr/include/ + + mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig + cat > ${SYSROOT_PREFIX}/usr/lib/pkgconfig/${PKG_NAME}.pc << EOF +prefix=/usr +exec_prefix=\${prefix} +libdir=\${exec_prefix}/lib +includedir=\${prefix}/include + +Name: ${PKG_NAME} +Description: Open Source aptX codec library +Version: ${PKG_VERSION} +Libs: -Wl,-rpath=\${libdir} -L\${libdir} -l${PKG_NAME##*lib} +Cflags: -I\${includedir} +EOF +} diff --git a/packages/audio/libldac/package.mk b/packages/audio/libldac/package.mk index dc10f7b65..1945ace2d 100644 --- a/packages/audio/libldac/package.mk +++ b/packages/audio/libldac/package.mk @@ -1,18 +1,11 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright (C) 2022-present Marek Moeckel (wansti@discarded-ideas.org) +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv) PKG_NAME="libldac" -PKG_VERSION="af2dd23979453bcd1cad7c4086af5fb421a955c5" -PKG_LICENSE="Apache2" -PKG_SITE="https://github.com/EHfive/ldacBT" -PKG_URL="${PKG_SITE}.git" -PKG_DEPENDS_TARGET="toolchain" -PKG_LONGDESC="LDAC bluetooth audio codec" -PKG_TOOLCHAIN="cmake-make" -GET_HANDLER_SUPPORT="git" - -post_makeinstall_target() { - cp -P -r ${INSTALL}/usr/lib/* ${SYSROOT_PREFIX}/usr/lib/ - cp -P -r ${INSTALL}/usr/include/* ${SYSROOT_PREFIX}/usr/include/ - rm -rf ${INSTALL}/usr/lib/pkgconfig -} +PKG_VERSION="82b6a1abee84787b8fa167efe20290073f60db2d" +PKG_SHA256="d61edcd3bfc4b71123136895fe71e7ba974f4a91f16a158f0ec8d5eb1913c51a" +PKG_LICENSE="Apache" +PKG_SITE="https://android.googlesource.com/platform/external/libldac" +PKG_URL="https://github.com/brucehw/libldac/archive/${PKG_VERSION}.tar.gz" +PKG_LONGDESC="LDAC Bluetooth encoder library" +PKG_TOOLCHAIN="manual" diff --git a/packages/audio/pipewire/package.mk b/packages/audio/pipewire/package.mk new file mode 100644 index 000000000..7b61e063d --- /dev/null +++ b/packages/audio/pipewire/package.mk @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv) + +PKG_NAME="pipewire" +PKG_VERSION="0.3.74" +PKG_SHA256="901857530bfdb65a0282562ceeead28682e9aba2aefb4bbee10c74dcc333c72a" +PKG_LICENSE="LGPL" +PKG_SITE="https://pipewire.org" +PKG_URL="https://github.com/PipeWire/pipewire/archive/${PKG_VERSION}.tar.gz" +PKG_DEPENDS_TARGET="toolchain libpthread-stubs dbus ncurses alsa-lib systemd libsndfile libusb" +PKG_LONGDESC="PipeWire is a server and user space API to deal with multimedia pipeline" + +if [ "${BLUETOOTH_SUPPORT}" = "yes" ]; then + PKG_DEPENDS_TARGET+=" bluez sbc ldacBT libfreeaptx" + PKG_PIPEWIRE_BLUETOOTH="-Dbluez5=enabled \ + -Dbluez5-backend-hsp-native=disabled \ + -Dbluez5-backend-hfp-native=disabled \ + -Dbluez5-backend-ofono=disabled \ + -Dbluez5-backend-hsphfpd=disabled \ + -Dbluez5-codec-aptx=enabled \ + -Dbluez5-codec-ldac=enabled \ + -Dbluez5-codec-aac=disabled" +else + PKG_PIPEWIRE_BLUETOOTH="-Dbluez5=disabled" +fi + +if [ "${VULKAN_SUPPORT}" = "yes" ]; then + PKG_PIPEWIRE_VULKAN+="-Dvulkan=enabled \ + -Dx11=disabled \ + -Dx11-xfixes=disabled" +fi + +PKG_MESON_OPTS_TARGET="-Ddocs=disabled \ + -Dexamples=disabled \ + -Dman=disabled \ + -Dtests=disabled \ + -Dinstalled_tests=disabled \ + -Dgstreamer=disabled \ + -Dgstreamer-device-provider=disabled \ + -Dsystemd=enabled \ + -Dsystemd-system-service=enabled \ + -Dsystemd-user-service=disabled \ + -Dpipewire-alsa=enabled \ + -Dpipewire-jack=disabled \ + -Dpipewire-v4l2=disabled \ + -Djack-devel=false + -Dspa-plugins=enabled \ + -Dalsa=enabled \ + -Daudiomixer=enabled \ + -Daudioconvert=enabled \ + ${PKG_PIPEWIRE_BLUETOOTH} \ + -Dcontrol=enabled \ + -Daudiotestsrc=disabled \ + -Dffmpeg=disabled \ + -Djack=disabled \ + -Dsupport=enabled \ + -Devl=disabled \ + -Dtest=disabled \ + -Dv4l2=disabled \ + -Ddbus=enabled \ + -Dlibcamera=disabled \ + -Dvideoconvert=disabled \ + -Dvideotestsrc=disabled \ + -Dvolume=enabled \ + ${PKG_PIPEWIRE_VULKAN} \ + -Dpw-cat=enabled \ + -Dudev=enabled \ + -Dudevrulesdir=/usr/lib/udev/rules.d \ + -Dsdl2=disabled \ + -Dsndfile=enabled \ + -Dlibpulse=enabled \ + -Droc=disabled \ + -Davahi=disabled \ + -Decho-cancel-webrtc=disabled \ + -Dlibusb=enabled \ + -Dsession-managers=[] \ + -Draop=disabled \ + -Dlv2=disabled \ + -Dlibcanberra=disabled \ + -Dlegacy-rtkit=false" + +pre_configure_target() { + export TARGET_LDFLAGS="${TARGET_LDFLAGS} -lncursesw -ltinfow" +} + +post_makeinstall_target() { + # connect to the system bus + sed '/^\[Service\]/a Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket' -i ${INSTALL}/usr/lib/systemd/system/pipewire.service +} + +post_install() { + add_user pipewire x 982 980 "pipewire-daemon" "/var/run/pipewire" "/bin/sh" + add_group pipewire 980 + # note that the pipewire user is added to the audio and video groups in systemd/package.mk + # todo: maybe there is a better way to add users to groups in the future? + + enable_service pipewire.socket + enable_service pipewire.service +} diff --git a/packages/audio/wireplumber/package.mk b/packages/audio/wireplumber/package.mk new file mode 100644 index 000000000..fc68a8f2b --- /dev/null +++ b/packages/audio/wireplumber/package.mk @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv) + +PKG_NAME="wireplumber" +PKG_VERSION="0.4.14" +PKG_SHA256="b160424ce7c3eeeccba388726f6a448f53501d25085e5fa1bf6c690c1bcd85ea" +PKG_LICENSE="MIT" +PKG_SITE="https://gitlab.freedesktop.org/pipewire/wireplumber" +PKG_URL="https://gitlab.freedesktop.org/pipewire/wireplumber/-/archive/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz" +PKG_DEPENDS_TARGET="pipewire glib lua54 glib:host" +PKG_LONGDESC="Session / policy manager implementation for PipeWire" + +PKG_MESON_OPTS_TARGET="-Dintrospection=disabled \ + -Ddoc=disabled \ + -Dsystem-lua=true \ + -Delogind=disabled \ + -Dsystemd=enabled \ + -Dsystemd-system-service=true \ + -Dsystemd-user-service=false \ + -Dsystemd-system-unit-dir=/usr/lib/systemd/system \ + -Dtests=false" + +post_makeinstall_target() { + # connect to the system bus + sed '/^\[Service\]/a Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket' -i ${INSTALL}/usr/lib/systemd/system/wireplumber.service + + # ref https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/0da29f38181e391160fa8702623050b8544ec775 + cat > ${INSTALL}/usr/share/wireplumber/main.lua.d/89-disable-session-dbus-dependent-features.lua << EOF +alsa_monitor.properties["alsa.reserve"] = false +default_access.properties["enable-flatpak-portal"] = false +EOF + + cat > ${INSTALL}/usr/share/wireplumber/main.lua.d/89-disable-v4l2.lua << EOF +v4l2_monitor.enabled = false +EOF + + cat > ${INSTALL}/usr/share/wireplumber/bluetooth.lua.d/89-disable-session-dbus-dependent-features.lua << EOF +bluez_monitor.properties["with-logind"] = false +EOF + + cat > ${INSTALL}/usr/share/wireplumber/bluetooth.lua.d/89-disable-bluez-hfphsp-backend.lua << EOF +bluez_monitor.properties["bluez5.hfphsp-backend"] = "none" +EOF +} + +post_install() { + enable_service wireplumber.service +} diff --git a/packages/hardware/quirks/devices/AOKZOE AOKZOE A1 Pro/001-audio b/packages/hardware/quirks/devices/AOKZOE AOKZOE A1 Pro/001-audio deleted file mode 100755 index 6115bf023..000000000 --- a/packages/hardware/quirks/devices/AOKZOE AOKZOE A1 Pro/001-audio +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: Apache-2.0 -# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) - -. /etc/profile - - -MYDEVICE=$(get_setting system.audiodevice) -if [ -z "${MYDEVICE}" ] || \ - [ ! -e "/storage/.config/asound.conf" ] -then - ### Set the audio device. - set-audio set "ALC269VB (1:0)" - set-audio esset "Master" -fi diff --git a/packages/hardware/quirks/devices/ATARI VCS 800 Onyx/001-audio b/packages/hardware/quirks/devices/ATARI VCS 800 Onyx/001-audio deleted file mode 100644 index 3ab6f938a..000000000 --- a/packages/hardware/quirks/devices/ATARI VCS 800 Onyx/001-audio +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: Apache-2.0 -# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) - -. /etc/profile - -MYDEVICE=$(get_setting system.audiodevice) -if [ -z "${MYDEVICE}" ] || \ - [ ! -e "/storage/.config/asound.conf" ] -then - ### Set the audio device - set-audio set "HDMI (0:3)" -fi diff --git a/packages/hardware/quirks/devices/AYANEO AIR Plus/001-audio b/packages/hardware/quirks/devices/AYANEO AIR Plus/001-audio deleted file mode 100644 index 6f1b54250..000000000 --- a/packages/hardware/quirks/devices/AYANEO AIR Plus/001-audio +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: Apache-2.0 -# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) - -. /etc/profile - - -MYDEVICE=$(get_setting system.audiodevice) -if [ -z "${MYDEVICE}" ] || \ - [ ! -e "/storage/.config/asound.conf" ] -then - ### Set the audio device. - set-audio set "ALC269VB (1:0)" - set-audio esset "Master" -fi - -### Only enable on 6800U Plus devices. -SUBSYSTEM=$(awk '/Subsystem Id:/ {print $3}' /proc/asound/card1/codec#0) -if [ "${SUBSYSTEM}" = "0x02f3f000" ] -then - ### Disables speaker output when headphones are connected. - alsactl restore -f /storage/.config/asound.state - /usr/bin/amixer -c 1 sset "Auto-Mute Mode" Enabled - alsactl store -f /storage/.config/asound.state -fi diff --git a/packages/hardware/quirks/devices/AYANEO AIR/001-audio b/packages/hardware/quirks/devices/AYANEO AIR/001-audio deleted file mode 100755 index f9e22cfe8..000000000 --- a/packages/hardware/quirks/devices/AYANEO AIR/001-audio +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: Apache-2.0 -# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) - -. /etc/profile - - -MYDEVICE=$(get_setting system.audiodevice) -if [ -z "${MYDEVICE}" ] || \ - [ ! -e "/storage/.config/asound.conf" ] -then - ### Set the audio device. - set-audio set "ALC269VB (1:0)" - set-audio esset "Master" -fi - -### Disables speaker output when headphones are connected. -alsactl restore -f /storage/.config/asound.state -/usr/bin/amixer -c 1 sset "Auto-Mute Mode" Enabled -alsactl store -f /storage/.config/asound.state diff --git a/packages/hardware/quirks/devices/GPD G1618-04/001-audio b/packages/hardware/quirks/devices/GPD G1618-04/001-audio deleted file mode 100644 index 6115bf023..000000000 --- a/packages/hardware/quirks/devices/GPD G1618-04/001-audio +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: Apache-2.0 -# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) - -. /etc/profile - - -MYDEVICE=$(get_setting system.audiodevice) -if [ -z "${MYDEVICE}" ] || \ - [ ! -e "/storage/.config/asound.conf" ] -then - ### Set the audio device. - set-audio set "ALC269VB (1:0)" - set-audio esset "Master" -fi diff --git a/packages/hardware/quirks/devices/GPD G1619-04/001-audio b/packages/hardware/quirks/devices/GPD G1619-04/001-audio deleted file mode 100644 index b6f4a83d3..000000000 --- a/packages/hardware/quirks/devices/GPD G1619-04/001-audio +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: Apache-2.0 -# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) - -. /etc/profile - - -MYDEVICE=$(get_setting system.audiodevice) -if [ -z "${MYDEVICE}" ] || \ - [ ! -e "/storage/.config/asound.conf" ] -then - ### Set the audio device. - set-audio set "SN6140 (1:0)" - set-audio esset "Internal" -fi - -### Disables speaker output when headphones are connected. -alsactl restore -f /storage/.config/asound.state -/usr/bin/amixer -c 1 sset "Auto-Mute Mode" Enabled -alsactl store -f /storage/.config/asound.state diff --git a/packages/hardware/quirks/devices/Valve Jupiter/001-audio b/packages/hardware/quirks/devices/Valve Jupiter/001-audio deleted file mode 100644 index 5221564ec..000000000 --- a/packages/hardware/quirks/devices/Valve Jupiter/001-audio +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: Apache-2.0 -# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) - -. /etc/profile - - -### Set a custom device so we don't clobber it. -set-audio set "CUSTOM (UNMANAGED)" -set-audio esset "PCM" -### Temporary workaround until we can fix it correctly -cat </storage/.config/asound.conf -ctl.!default { - type hw - card 1 -} - -pcm.!default { - type plug - slave.pcm "softvol" -} - -pcm.softvol { - type softvol - slave.pcm "dmixer" - control { - name "PCM" - card 1 - } -} - -pcm.dmixer { - type dmix - ipc_key 1024 - slave { - pcm "hw:1,1" - period_time 0 - period_size 4096 - buffer_size 131072 - rate 176400 - } -} -EOF diff --git a/packages/jelos/profile.d/02-distribution b/packages/jelos/profile.d/02-distribution index 60bfcc0a3..5f8d8d26a 100644 --- a/packages/jelos/profile.d/02-distribution +++ b/packages/jelos/profile.d/02-distribution @@ -111,15 +111,16 @@ function set_setting() { } function set_audio() { - case ${1} in - "default") - AUDIO="alsa" - ;; - *) - AUDIO=${1} - ;; - esac - /usr/bin/rr_audio.sh ${AUDIO} + echo +# case ${1} in +# "default") +# AUDIO="alsa" +# ;; +# *) +# AUDIO=${1} +# ;; +# esac +# /usr/bin/rr_audio.sh ${AUDIO} } function battery_percent() { diff --git a/packages/sysutils/sleep/sources/sleep.sh b/packages/sysutils/sleep/sources/sleep.sh index b6e95ac24..64f34311f 100755 --- a/packages/sysutils/sleep/sources/sleep.sh +++ b/packages/sysutils/sleep/sources/sleep.sh @@ -28,10 +28,6 @@ volumectl() { fi } -alsastate() { - alsactl ${1} -f /storage/.config/asound.state >/dev/null 2>&1 -} - powerstate() { if [ "$(get_setting system.powersave)" = 1 ] then @@ -103,7 +99,6 @@ quirks() { case $1 in pre) - alsastate store headphones stop volumectl stop bluetooth stop @@ -116,7 +111,6 @@ case $1 in ;; post) ledcontrol - alsastate restore modules start powerstate start headphones start diff --git a/packages/sysutils/systemd/package.mk b/packages/sysutils/systemd/package.mk index 706df2430..b350cf923 100644 --- a/packages/sysutils/systemd/package.mk +++ b/packages/sysutils/systemd/package.mk @@ -267,7 +267,7 @@ post_install() { add_group systemd-network 193 add_user systemd-network x 193 193 "systemd-network" "/" "/bin/sh" - add_group audio 63 + add_group audio 63 pipewire add_group cdrom 11 add_group dialout 18 add_group disk 6 @@ -278,7 +278,7 @@ post_install() { add_group render 12 add_group tape 33 add_group tty 5 - add_group video 39 + add_group video 39 pipewire add_group utmp 22 add_group input 199 diff --git a/packages/virtual/image/package.mk b/packages/virtual/image/package.mk index df45ce759..0243c60b3 100644 --- a/packages/virtual/image/package.mk +++ b/packages/virtual/image/package.mk @@ -48,6 +48,7 @@ else # Sound support [ "${ALSA_SUPPORT}" = "yes" ] && PKG_DEPENDS_TARGET+=" alsa" + [ "${PIPEWIRE_SUPPORT}" = "yes" ] && PKG_DEPENDS_TARGET+=" pipewire wireplumber" fi [ "${DISPLAYSERVER}" = "wl" ] && PKG_DEPENDS_TARGET+=" weston" diff --git a/packages/wayland/weston/package.mk b/packages/wayland/weston/package.mk index 55dfde795..3ec147e72 100644 --- a/packages/wayland/weston/package.mk +++ b/packages/wayland/weston/package.mk @@ -6,7 +6,7 @@ PKG_VERSION="10.0.3" PKG_LICENSE="MIT" PKG_SITE="https://wayland.freedesktop.org/" PKG_URL="https://gitlab.freedesktop.org/wayland/weston/-/archive/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz" -PKG_DEPENDS_TARGET="toolchain wayland wayland-protocols libdrm libxkbcommon libinput cairo pango libjpeg-turbo dbus seatd glu ${OPENGL} libX11 xorg-server libXcursor xkbcomp setxkbmap cairo xterm splash" +PKG_DEPENDS_TARGET="toolchain wayland wayland-protocols libdrm libxkbcommon libinput pipewire cairo pango libjpeg-turbo dbus seatd glu ${OPENGL} libX11 xorg-server libXcursor xkbcomp setxkbmap cairo xterm splash" PKG_LONGDESC="Reference implementation of a Wayland compositor" PKG_MESON_OPTS_TARGET="-Dbackend-drm=true \ @@ -23,7 +23,7 @@ PKG_MESON_OPTS_TARGET="-Dbackend-drm=true \ -Dxwayland=true \ -Dsystemd=true \ -Dremoting=false \ - -Dpipewire=false \ + -Dpipewire=true \ -Dshell-desktop=true \ -Dshell-fullscreen=true \ -Dshell-ivi=false \