Skip to content

Commit

Permalink
Merge pull request #1141 from rern/UPDATE
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
rern authored Dec 14, 2022
2 parents c085a9f + fbb7bda commit c763b34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 3 additions & 4 deletions srv/http/bash/settings/player-conf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,14 @@ fi

( sleep 2 && systemctl try-restart rotaryencoder ) &> /dev/null &

systemctl stop shairport-sync shairport spotifyd &> /dev/null

if [[ $equalizer || $dsp || ( ! $Acard && ! $btmixer ) ]]; then
$dirbash/status-push.sh
$dirsettings/player-data.sh pushrefresh
exit
fi

# renderers -----------------------------------------------------------------------------

if [[ -e /usr/bin/shairport-sync ]]; then
########
conf="$( sed '/^alsa/,/}/ d' /etc/shairport-sync.conf )
Expand All @@ -165,7 +164,7 @@ alsa = {"
#-------
echo "$conf" > /etc/shairport-sync.conf
pushstream airplay '{"stop":"switchoutput"}'
systemctl -q is-enabled shairport-sync && systemctl start shairport-sync
systemctl try-restart shairport-sync
fi

if [[ -e /usr/bin/spotifyd ]]; then
Expand All @@ -190,7 +189,7 @@ volume_controller = "alsa"'
#-------
fi
echo "$conf" > /etc/spotifyd.conf
systemctl -q is-enabled spotifyd && systemctl start spotifyd
systemctl try-restart spotifyd
fi

$dirbash/status-push.sh
Expand Down
6 changes: 1 addition & 5 deletions srv/http/bash/settings/player-devices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ for card in $cards; do
device=${hw: -1}
aplayname=$( sed -E 's/.*\[(.*)],.*/\1/; s/^snd_rpi_//; s/_/-/g' <<< $line ) # some aplay -l: snd_rpi_xxx_yyy > xxx-yyy
if [[ $aplayname == Loopback ]]; then
device=; hw=; hwmixer=; mixers=; mixerdevices=; mixermanual=; mixertype=; name=;
device=; hw=; hwmixer=; mixers=; mixerdevices=; mixertype=; name=;
devices+=',{
"aplayname" : "'$aplayname'"
, "card" : '$card'
Expand Down Expand Up @@ -79,10 +79,8 @@ for card in $cards; do
mixers=${#controls[@]}
fi

mixermanual=false
hwmixerfile="$dirsystem/hwmixer-$aplayname"
if [[ -e $hwmixerfile ]]; then # manual
mixermanual=true
hwmixer=$( < "$hwmixerfile" )
elif [[ $aplayname == rpi-cirrus-wm5102 ]]; then
mixers=4
Expand All @@ -104,7 +102,6 @@ for card in $cards; do
, "hwmixer" : "'$hwmixer'"
, "mixers" : '$mixers'
, "mixerdevices" : '$mixerdevices'
, "mixermanual" : '$mixermanual'
, "mixertype" : "'$mixertype'"
, "name" : "'$name'"
}'
Expand All @@ -115,7 +112,6 @@ for card in $cards; do
Ahw[card]=$hw
Ahwmixer[card]=$hwmixer
Amixers[card]=$mixers
Amixermanual[card]=$mixermanual
Amixertype[card]=$mixertype
Aname[card]=$name
done
Expand Down

0 comments on commit c763b34

Please sign in to comment.