@@ -22,7 +22,7 @@ function depends_audiosettings() {
22
22
23
23
function gui_audiosettings() {
24
24
# Check if the internal audio is enabled
25
- if [[ ` aplay -ql | grep bcm2835 | wc -l` < 1 ]]; then
25
+ if [[ ` aplay -ql | grep -e bcm2835 -e vc4hdmi | wc -l` < 1 ]]; then
26
26
printMsgs " dialog" " On-board audio disabled or not present"
27
27
return
28
28
fi
@@ -31,7 +31,7 @@ function gui_audiosettings() {
31
31
# * enable_compat_alsa: true - single soundcard, output is routed based on the `numid` control
32
32
# * enable_compat_alsa: false - one soundcard per output type (HDMI/Headphones)
33
33
# When PulseAudio/PipeWire is enabled, try to configure it and leave ALSA alone
34
- if _pa_cmd_audiosettings systemctl -q --user is-enabled {pulseaudio,pipewire-pulse}.socket ; then
34
+ if _pa_cmd_audiosettings systemctl -q --user is-enabled {pulseaudio,pipewire-pulse}.service ; then
35
35
_pulseaudio_audiosettings
36
36
elif aplay -l | grep -q " bcm2835 ALSA" ; then
37
37
_bcm2835_alsa_compat_audiosettings
@@ -255,10 +255,13 @@ function _pulseaudio_audiosettings() {
255
255
options+=(" $sink_index " " $sink_label " )
256
256
done < <( _pa_cmd_audiosettings pactl list sinks | \
257
257
awk -F [:= ] ' BEGIN {idx=0}; /Name:/ {
258
- do {getline} while($0 !~ "alsa.name");
259
- gsub(/"|bcm2835[^a-zA-Z]+/, "", $2);
260
- print idx,$2;
261
- idx++}'
258
+ do {getline} while($0 !~ "alsa.name" && $0 !~ "Formats");
259
+ if ( $2 != "" ) {
260
+ gsub(/"|bcm2835[^a-zA-Z]+/, "", $2);
261
+ print idx,$2;
262
+ idx++
263
+ }
264
+ }'
262
265
)
263
266
_pa_cmd_audiosettings pactl info | grep -i pipewire > /dev/null && sound_server=" PipeWire"
264
267
local cmd=(dialog --backtitle " $__backtitle " --menu " Set audio output ($sound_server )" 22 86 16)
0 commit comments