Remove ALSA CARD

This commit is contained in:
Alexandre
2025-09-15 10:30:20 +02:00
committed by GitHub
parent be6e50ec30
commit a170a90602

View File

@@ -10,22 +10,6 @@ echo " "
# Check if alsa_card is provided
CONFIG_LOCATION="/config/config.yaml"
if bashio::config.has_value "ALSA_CARD"; then
alsa_card=$(bashio::config 'ALSA_CARD')
bashio::log.info "ALSA_CARD option set to $alsa_card"
bashio::log.info "ALSA_CARD option is set to ${alsa_card}. Please ensure it is the correct card"
sed -i "s/card:.*/card: ${alsa_card}/g" "$CONFIG_LOCATION"
yq -i -y ".audio.card = \"${alsa_card}\"" "$CONFIG_LOCATION"
fi
# Adjust microphone volume if needed
if command -v amixer > /dev/null 2> /dev/null; then
current_volume="$(amixer sget Capture | grep -oP '\[\d+%\]' | tr -d '[]%' | head -1 2> /dev/null || echo "100")" || true
if [[ "$current_volume" -eq 0 ]]; then
amixer sset Capture 70%
bashio::log.warning "Microphone was off, volume set to 70%."
fi || true
fi
########################
# CONFIGURE birdnet-go #