2021-12-21, 15:33
Shouldn’t you ask that of someone involved in pipewire? They’ll know better than us here.
(2021-10-19, 10:26)wastis Wrote:I'm moving away from Libreelec because it can't do something basic like audio equalization. I'm trying OSMC, but I can't get the alsa equalizer to work either (Kodi doesn't pick up the audio device).(2021-09-12, 09:40)heysoundude Wrote: What about on the Pi4? 4GB of RAM should help…
This is a Feature I would LOVE to be able to use
Ok, I did a closer look to it, still using Pi3, the performance actually is not the problem, it consumes about 25% of one core, so 6% overall.
The problem currently is that Kodi somehow is set to ALSA output only, so far I did not manage to output the sound directly to pulseaudio (without ALSA in-between).
There is this ALSA plugin pulseaudio, which is currently use for BT devices. I did hijack this to route the audio from Kodi via ALSA to the pulse equalizer and this works perfect with the annoying drawback, that the audio latency naturally caused by the equalizer is not reported back to Kodi and thus Audio and Video are out of sync of about 350ms.
Currently I have no Idea how to fix this other than changing Kodi source, a route I currently don't want to go.
The changes to the Kodi PulseEqualizer GUI Addon are minor and only required if ALSA would remain the main source for the equalizer.
Any ideas are welcome, I did use latests Raspberry Pi OS Lite version for testing with default Kodi 18.7.
EDIT: OK, I go this sorted. Update on Addon package will follow.
(2022-09-11, 23:21)wastis Wrote: What hardware are you on? Pulseaudio + pulseaudio-equalizer consumes more cpu than ALSA+ALSA equalizer, but this is not a problem, if your HW is powerful enough. I have it running with Kodi on a raspberry pi 2 playing H264 video hw decoded.raspberry pi 4, with 8GB of RAM. 4k playback is too limited, it only works with x265/HEVC, so I gave up on that.
I do not know OSMC in detail, but I am very happy with Debian based installs. Here is a HOWTO for Debian & Kodi & Equalizer on a x86 and one for raspberry pi os lite + kodi + equalizer + bluetooth.
I personally would select full chain pulseaudio if it comes to equalization with Kodi.
(2022-09-11, 23:48)teus Wrote: but I don't even know how to work my way around ALSA if I'm installing Pulseaudio afterwards. OSMC is debian-based, however.ok, as I wrote I do not know OSMC, but this should be the principal steps:
sudo apt install -y pulseaudio pulseaudio-equalizer
#daemon.conf pulseaudio buffer size
default-fragments = 8
default-fragment-size-msec = 15
# enable pulseaudio
systemctl --user daemon-reload
systemctl --user enable pulseaudio.service
systemctl --user start pulseaudio.service
...
[Service]
Environment = KODI_AE_SINK=PULSE
...
#stop kodi and disable the start of it (testing purpose)
sudo systemctl stop mediacenter
sudo systemctl disable mediacenter
#install the missing packages
sudo apt install -y pulseaudio pulseaudio-equalizer dbus-user-session
#enable and pulseaudio as user
systemctl --user daemon-reload
systemctl --user enable pulseaudio.service
systemctl --user start pulseaudio.service
#ensure dbus-module is loaded by pulseaudio
mkdir -p ~/.config/pulse
cp /etc/pulse/daemon.conf /etc/pulse/default.pa ~/.config/pulse/
echo -e 'load-module module-dbus-protocol\n' >> ~/.config/pulse/default.pa
#reboot to get dbus --session up and running
sudo reboot now
#looks good pulseaudio daemon is running
osmc@osmc:~$ ps -ef | grep pulseaudio
osmc 462 416 0 11:13 ? 00:00:00 /usr/bin/pulseaudio --daemonize=no
#looks good dbus-daemon --session is running
osmc@osmc:~$ ps -ef | grep dbus
message+ 201 1 0 11:13 ? 00:00:00 /usr/bin/dbus-daemon --system --address=systemd: ...
osmc 480 416 0 11:13 ? 00:00:00 /usr/bin/dbus-daemon --session --address=systemd: ...
#looks good at least one pulseaudio sink is available
osmc@osmc:~$pactl list sinks
Sink #0
State: SUSPENDED
Name: alsa_output.platform-3f902000.hdmi.hdmi-stereo
....
#looks good, pulseaudio sockets exists
osmc@osmc:~$ ls -l /run/user/1000/pulse
total 4
srwxrwxrwx 1 osmc osmc 0 Sep 12 11:13 dbus-socket
srw-rw-rw- 1 osmc osmc 0 Sep 12 11:13 native
-rw------- 1 osmc osmc 4 Sep 12 11:13 pid
#start kodi from command line
KODI_AE_SINK=PULSE
export KODI_AE_SINK
/usr/lib/kodi/kodi.bin --debug