mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-07 21:58:21 +01:00
Remove ALSA CARD
This commit is contained in:
@@ -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 #
|
||||
|
||||
Reference in New Issue
Block a user