PI5 Audio

hudiy
Site Admin
Posts: 440
Joined: Mon Jul 14, 2025 7:42 pm

Re: PI5 Audio

Post by hudiy »

State: RUNNING
Name: alsa_output.platform-107c706400.hdmi.hdmi-stereo
That means the audio from virtual sinks (equalizer, echo-cancel) reaches the sink of physical device but for some reason it is not audible when PipeWire uses virtual sink modules (equalizer, echo-cancel).

Is audio audible when in qpwgraph you disconnect hudiy_equalizer_sink from Echo-Cancel Sink and connect it (hudiy_equalizer_sink) to Audio Digital Stereo?
Olli
Posts: 18
Joined: Mon Nov 10, 2025 3:06 pm

Re: PI5 Audio

Post by Olli »

I've now tried it again with a Bluetooth speaker. Unfortunately, with the same result. The sound works on the OS interface, but nothing works on the Hudy interface.
Olli
Posts: 18
Joined: Mon Nov 10, 2025 3:06 pm

Re: PI5 Audio

Post by Olli »

With these two variants, there is absolutely no sound.
Attachments
WIN_20251115_21_19_58_Pro.jpg
WIN_20251115_21_19_58_Pro.jpg (3.82 MiB) Viewed 1187 times
WIN_20251115_21_26_55_Pro.jpg
WIN_20251115_21_26_55_Pro.jpg (3.62 MiB) Viewed 1187 times
Olli
Posts: 18
Joined: Mon Nov 10, 2025 3:06 pm

Re: PI5 Audio

Post by Olli »

Here we have sound on the OS surface.
Attachments
WIN_20251115_21_18_25_Pro.jpg
WIN_20251115_21_18_25_Pro.jpg (4.33 MiB) Viewed 1187 times
WIN_20251115_21_23_06_Pro.jpg
WIN_20251115_21_23_06_Pro.jpg (4.14 MiB) Viewed 1187 times
Olli
Posts: 18
Joined: Mon Nov 10, 2025 3:06 pm

Re: PI5 Audio

Post by Olli »

Anything that goes through the echo-cancel playback will not produce any sound.
hudiy
Site Admin
Posts: 440
Joined: Mon Jul 14, 2025 7:42 pm

Re: PI5 Audio

Post by hudiy »

Thanks for testing. Most likely, the echo-cancel module is taking its input from one of the sink.monitor sources and treating the entire audio output as echo, effectively cutting it out.

Could you please run the following commands and check if the sound appears?

Code: Select all

cd $HOME/.local/state/wireplumber
rm -rf *
sudo reboot
Olli
Posts: 18
Joined: Mon Nov 10, 2025 3:06 pm

Re: PI5 Audio

Post by Olli »

Following these commands, storage music can play on my Bluetooth speakers. This also works on the Hudiy interface.
Olli
Posts: 18
Joined: Mon Nov 10, 2025 3:06 pm

Re: PI5 Audio

Post by Olli »

After a restart without the commands, it doesn't work again.
hudiy
Site Admin
Posts: 440
Joined: Mon Jul 14, 2025 7:42 pm

Re: PI5 Audio

Post by hudiy »

Could you please replace the content of $HOME/.hudiy/share/hudiy_startup.sh file to

Code: Select all

#!/bin/bash

EC_SINK="echo_cancel_sink"
EC_SOURCE="echo_cancel_source"
EQ_SINK="hudiy_equalizer_sink"
DUMMY_SINK="dummy_sink"

sink_exists() { pactl list short sinks 2>/dev/null | awk '{print $2}' | grep -Fxq "$1"; }
until pactl info >/dev/null 2>&1; do sleep 0.1; done

# Gives PipeWire and WirePlumber additional time to detect all audio devices
sleep 1

sink_exists "$EQ_SINK" || pactl load-module module-ladspa-sink sink_name="$EQ_SINK" master="$EC_SINK" plugin=hudiy_equalizer label=hudiy_equalizer control=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
sink_exists "$DUMMY_SINK" || pactl load-module module-null-sink sink_name="$DUMMY_SINK"
sink_exists "$EC_SINK" || pactl load-module module-echo-cancel aec_method=webrtc aec_args=\"voice_detection=false\" 
source_name="$EC_SOURCE" sink_name="$EC_SINK" source_master="${DUMMY_SINK}.monitor"

pactl set-default-sink "$EQ_SINK"
pactl set-default-source "$EC_SOURCE"

$HOME/.hudiy/share/hudiy &
then reboot the Raspberry Pi (sudo reboot) and check if that works?

The modified script creates a dummy sink which (monitor) is used as the source for echo-cancel so that the module doesn't take audio from the real sinks that actually play sound.
Olli
Posts: 18
Joined: Mon Nov 10, 2025 3:06 pm

Re: PI5 Audio

Post by Olli »

Great... now music can be played on the Hudy interface even after multiple restarts.
Attachments
WIN_20251115_23_05_47_Pro.jpg
WIN_20251115_23_05_47_Pro.jpg (3.97 MiB) Viewed 1146 times
Post Reply