Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipewire: enable for all images, but dont start if alsa or pulse in on #8751

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions distributions/LibreELEC/options
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
PULSEAUDIO_SUPPORT="yes"

# build and install pipewire support (yes / no)
PIPEWIRE_SUPPORT="no"
PIPEWIRE_SUPPORT="yes"

# build and install eSpeak-NG support (yes / no)
ESPEAK_SUPPORT="no"
Expand Down Expand Up @@ -164,7 +164,7 @@
KODI_PULSEAUDIO_SUPPORT="yes"

# build kodi with pipewire support (yes/no)
KODI_PIPEWIRE_SUPPORT="no"
KODI_PIPEWIRE_SUPPORT="yes"

### KODI ADDONS ###

Expand Down
7 changes: 5 additions & 2 deletions packages/audio/pipewire/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ post_install() {
# 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
# enable only if pipewire is the only enabled audio backend
if [ "${KODI_PIPEWIRE_SUPPORT}" = "yes" -a "${KODI_PULSEAUDIO_SUPPORT}" != "yes" -a "${KODI_ALSA_SUPPORT}" != "yes" ]; then
enable_service pipewire.socket
enable_service pipewire.service
fi
}
5 changes: 4 additions & 1 deletion packages/audio/wireplumber/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ EOF
}

post_install() {
enable_service wireplumber.service
# enable only if pipewire is the only enabled audio backend
if [ "${KODI_PIPEWIRE_SUPPORT}" = "yes" -a "${KODI_PULSEAUDIO_SUPPORT}" != "yes" -a "${KODI_ALSA_SUPPORT}" != "yes" ]; then
enable_service wireplumber.service
fi
}
18 changes: 8 additions & 10 deletions packages/mediacenter/kodi/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ configure_package() {
if [ "${KODI_PIPEWIRE_SUPPORT}" = yes ]; then
PKG_DEPENDS_TARGET+=" pipewire"
KODI_PIPEWIRE="-DENABLE_PIPEWIRE=ON"

if [ "${KODI_PULSEAUDIO_SUPPORT}" = "yes" -o "${KODI_ALSA_SUPPORT}" = "yes" ]; then
die "KODI_PULSEAUDIO_SUPPORT and KODI_ALSA_SUPPORT cannot be used with KODI_PIPEWIRE_SUPPORT"
fi
else
KODI_PIPEWIRE="-DENABLE_PIPEWIRE=OFF"
fi
Expand Down Expand Up @@ -341,17 +337,19 @@ post_makeinstall_target() {
-e "s|@KODI_MAX_SECONDS@|${KODI_MAX_SECONDS:-900}|g" \
-i ${INSTALL}/usr/lib/kodi/kodi.sh

if [ "${KODI_PIPEWIRE_SUPPORT}" = "yes" ]; then
KODI_AUDIO_ARGS="--audio-backend=pipewire"
elif [ "${KODI_PULSEAUDIO_SUPPORT}" = "yes" -a "${KODI_ALSA_SUPPORT}" = "yes" ]; then
# define our default audio config
# override at runtime in /storage/.config/kodi.conf
if [ "${KODI_PULSEAUDIO_SUPPORT}" = "yes" -a "${KODI_ALSA_SUPPORT}" = "yes" ]; then
KODI_AUDIO_ARGS="--audio-backend=alsa+pulseaudio"
elif [ "${KODI_PULSEAUDIO_SUPPORT}" = "yes" -a "${KODI_ALSA_SUPPORT}" != "yes" ]; then
KODI_AUDIO_ARGS="--audio-backend=pulseaudio"
elif [ "${KODI_PULSEAUDIO_SUPPORT}" != "yes" -a "${KODI_ALSA_SUPPORT}" = "yes" ]; then
KODI_AUDIO_ARGS="--audio-backend=alsa"
elif [ "${KODI_PULSEAUDIO_SUPPORT}" = "yes" -a "${KODI_ALSA_SUPPORT}" != "yes" ]; then
KODI_AUDIO_ARGS="--audio-backend=pulseaudio"
elif [ "${KODI_PIPEWIRE_SUPPORT}" = "yes" ]; then
KODI_AUDIO_ARGS="--audio-backend=pipewire"
fi

# adjust audio output device to what was built
# adjust default audio backend to our preference above
sed "s/@KODI_AUDIO_ARGS@/${KODI_AUDIO_ARGS}/" ${PKG_DIR}/config/kodi.conf.in > ${INSTALL}/usr/lib/kodi/kodi.conf

# set default display environment
Expand Down
4 changes: 0 additions & 4 deletions packages/virtual/image/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ PKG_LONGDESC="Root package used to build and create complete image"

[ "${PIPEWIRE_SUPPORT}" = "yes" ] && PKG_DEPENDS_TARGET+=" pipewire wireplumber"

if [ "${PULSEAUDIO_SUPPORT}" = "yes" -a "${PIPEWIRE_SUPPORT}" = "yes" ]; then
die "PULSEAUDIO_SUPPORT and PIPEWIRE_SUPPORT cannot be enabled together"
fi

# Automounter support
[ "${UDEVIL}" = "yes" ] && PKG_DEPENDS_TARGET+=" udevil"

Expand Down