Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Troubles with pulseaudio-15.0-r1 on Raspberry Pi 4
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
costel78
Guru
Guru


Joined: 20 Apr 2007
Posts: 407

PostPosted: Wed Nov 17, 2021 12:20 pm    Post subject: Troubles with pulseaudio-15.0-r1 on Raspberry Pi 4 Reply with quote

With pulseaudio-15.0-r1, when pulseaudio daemon is started, mouse and keyboard freezes during sound cards detection.
Also, during video playback (browser, mpv, vlc), mouse and keyboard freezes. When playback is done, everything returns to normal.

The diff between ebuilds is quite extensive:
Code:
--- pi/media-sound/pulseaudio/pulseaudio-15.0.ebuild   2021-11-12 11:15:11.000000000 +0200
+++ gentoo/media-sound/pulseaudio/pulseaudio-15.0-r1.ebuild   2021-10-29 14:39:45.000000000 +0300
@@ -17,7 +17,7 @@
    EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}"
 else
    SRC_URI="https://freedesktop.org/software/${PN}/releases/${MY_P}.tar.xz"
-   KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+   KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux"
 fi
 
 # libpulse-simple and libpulse link to libpulse-core; this is daemon's
@@ -29,7 +29,7 @@
 SLOT="0"
 
 # +alsa-plugin as discussed in bug #519530
-# TODO: Deal with bluez5-gstreamer
+# TODO: Deal with bluez5-gstreamer - requires ldacenc and rtpldacpay gstreamer elements
 # TODO: Find out why webrtc-aec is + prefixed - there's already the always available speexdsp-aec
 # NOTE: The current ebuild sets +X almost certainly just for the pulseaudio.desktop file
 IUSE="+alsa +alsa-plugin +asyncns bluetooth dbus +daemon doc elogind equalizer +gdbm
@@ -51,6 +51,7 @@
       !bluetooth
       !equalizer
       !gdbm
+      !gstreamer
       !gtk
       !jack
       !lirc
@@ -73,6 +74,8 @@
 "
 
 BDEPEND="
+   dev-lang/perl
+   dev-perl/XML-Parser
    sys-devel/gettext
    sys-devel/m4
    virtual/libiconv
@@ -123,7 +126,7 @@
    systemd? ( sys-apps/systemd:= )
    tcpd? ( sys-apps/tcp-wrappers )
    udev? ( >=virtual/udev-143[hwdb(+)] )
-   webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2 )
+   webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2:0 )
    X? (
       >=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}]
       daemon? (
@@ -136,6 +139,7 @@
    zeroconf? ( >=net-dns/avahi-0.6.12[dbus] )
 "
 
+# pulseaudio ships a bundle xmltoman, which uses XML::Parser
 DEPEND="
    ${COMMON_DEPEND}
    dev-libs/libatomic_ops
@@ -165,6 +169,10 @@
 
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=(
+   "${FILESDIR}"/pulseaudio-15.0-xice-xsm-xtst-daemon-only.patch
+)
+
 src_prepare() {
    default
 
@@ -173,45 +181,57 @@
 
 multilib_src_configure() {
    local emesonargs=(
-      -Dadrian-aec=false # Not packaged?
       --localstatedir="${EPREFIX}"/var
+
+      $(meson_native_use_bool daemon)
+      $(meson_native_use_bool doc doxygen)
+      -Dgcov=false
+      # tests involve random modules, so just do them for the native # TODO: tests should run always
+      $(meson_native_use_bool test tests)
+      -Ddatabase=$(multilib_native_usex gdbm gdbm simple) # tdb is also an option but no one cares about it
+      -Dstream-restore-clear-old-devices=true
+      -Drunning-from-build-tree=false
+
+      # Paths
       -Dmodlibexecdir="${EPREFIX}/usr/$(get_libdir)/${PN}/modules" # Was $(get_libdir)/${P}
       -Dsystemduserunitdir=$(systemd_get_userunitdir)
       -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
       -Dbashcompletiondir="$(get_bashcompdir)" # Alternatively DEPEND on app-shells/bash-completion for pkg-config to provide the value
+
+      # Optional features
       $(meson_native_use_feature alsa)
+      $(meson_feature asyncns)
+      $(meson_native_use_feature zeroconf avahi)
       $(meson_native_use_feature bluetooth bluez5)
-      $(meson_native_use_bool daemon)
-      $(meson_native_use_bool doc doxygen)
+      -Dbluez5-gstreamer=disabled # no ldacenc/rtpldacpay gst elements packaged yet
       $(meson_native_use_bool native-headset bluez5-native-headset)
       $(meson_native_use_bool ofono-headset bluez5-ofono-headset)
+      $(meson_feature dbus)
+      $(meson_native_use_feature elogind)
+      $(meson_native_use_feature equalizer fftw)
+      $(meson_feature glib) # WARNING: toggling this likely changes ABI
       $(meson_native_use_feature glib gsettings) # Supposedly correct?
       $(meson_native_use_feature gstreamer)
       $(meson_native_use_feature gtk)
+      -Dhal-compat=true # Consider disabling on next revbump
+      $(meson_use ipv6)
       $(meson_native_use_feature jack)
-      -Dsamplerate=disabled # Matches upstream
-      -Dstream-restore-clear-old-devices=true
       $(meson_native_use_feature lirc)
+      $(meson_native_use_feature ssl openssl)
       $(meson_native_use_feature orc)
       $(meson_native_use_feature oss oss-output)
-      $(meson_native_use_feature ssl openssl)
-      # tests involve random modules, so just do them for the native # TODO: tests should run always
-      $(meson_native_use_bool test tests)
-      $(meson_native_use_feature udev)
-      $(meson_native_use_feature webrtc-aec)
-      $(meson_native_use_feature zeroconf avahi)
-      $(meson_native_use_feature equalizer fftw)
+      -Dsamplerate=disabled # Matches upstream
       $(meson_native_use_feature sox soxr)
-      -Ddatabase=$(multilib_native_usex gdbm gdbm simple) # tdb is also an option but no one cares about it
-      $(meson_feature glib) # WARNING: toggling this likely changes ABI
-      $(meson_feature asyncns)
-      #$(meson_use cpu_flags_arm_neon neon-opt)
-      $(meson_native_use_feature tcpd tcpwrap)
-      $(meson_feature dbus)
-      $(meson_native_use_feature elogind)
-      $(meson_feature X x11)
+      -Dspeex=enabled
       $(meson_native_use_feature systemd)
-      $(meson_use ipv6)
+      $(meson_native_use_feature tcpd tcpwrap) # TODO: This should technically be enabled for 32bit too, but at runtime it probably is never used without daemon?
+      $(meson_native_use_feature udev)
+      -Dvalgrind=auto
+      $(meson_feature X x11)
+
+      # Echo cancellation
+      -Dadrian-aec=false # Not packaged?
+      $(meson_native_use_feature webrtc-aec)
    )
 
    if multilib_is_native_abi; then
@@ -222,6 +242,7 @@
          emesonargs+=( -Dpulsedsp-location="${EPREFIX}"'/usr/\\$$LIB/pulseaudio' )
       fi
    else
+      emesonargs+=( -Dman=false )
       if ! use elibc_glibc; then
          # Non-glibc multilib is probably non-existent but just in case:
          ewarn "padsp wrapper for OSS emulation will only work with native ABI applications!"
@@ -268,7 +289,7 @@
          use "${1}" && echo "-D${define}" || echo "-U${define}"
       }
 
-      unifdef \
+      unifdef -x 1 \
          $(use_define zeroconf AVAHI) \
          $(use_define alsa) \
          $(use_define bluetooth) \
@@ -304,6 +325,8 @@
    gnome2_schemas_update
 
    if use system-wide; then
+      tmpfiles_process "${PN}.conf"
+
       elog "You have enabled the 'system-wide' USE flag for pulseaudio."
       elog "This mode should only be used on headless servers, embedded systems,"
       elog "or thin clients. It will usually require manual configuration, and is"


I tried one by one every option, and, despite compiling time involved, I was unable to found the error.
Anyone else encounter this error ?
_________________
Sorry for my English. I'm still learning this language.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3918

PostPosted: Wed Nov 17, 2021 4:57 pm    Post subject: Reply with quote

I have no problem whatsoever with this specific version of pulseaudio in RPI4.
Yet again I DID have a lot of problems in the past with stuttering sound and slow keyboard response which somehow got remedied by editing
/etc/pulse/default.pa and modifying
Code:


load-module module-udev-detect
to
load-module module-udev-detect tsched=0


Maybe it helps you too.
_________________
:)
Back to top
View user's profile Send private message
costel78
Guru
Guru


Joined: 20 Apr 2007
Posts: 407

PostPosted: Wed Nov 17, 2021 6:50 pm    Post subject: Reply with quote

No improvement, unfortunately.
Thank you!
_________________
Sorry for my English. I'm still learning this language.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum