For further clarification I discussed this issue with claude.ai and here's what seems to be going on. It's not related to libsndfile, it's actually PortAudio's fault.
*Issue:* The device enumeration produces spurious ALSA error messages to stderr during application startup, despite audio working correctly. These errors are cosmetic but pollute stderr output, making it difficult to identify actual problems. *Root Cause:* Xournalpp links against PortAudio, which enumerates all ALSA PCM devices at initialization via snd_device_name_hint() or similar discovery APIs. ALSA's default configuration files (e.g., /usr/share/alsa/alsa.conf) define references to numerous hardware PCM devices (surround configurations, HDMI, modem, phoneline, etc.) regardless of whether the hardware exists. When PortAudio probes these devices, ALSA attempts to open each one, generating error messages to stderr for every non-existent device.

