From f786a4625cdae66f912bf71bf277b0e61e31633d Mon Sep 17 00:00:00 2001 From: Paul Robertson Date: Sun, 19 Apr 2026 07:33:01 +1200 Subject: [PATCH 1/2] fix: increase speaker, TTS, and media volume defaults --- configure.sh | 6 +++--- mqtt-bridge.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.sh b/configure.sh index 46430ae..3105eea 100755 --- a/configure.sh +++ b/configure.sh @@ -562,7 +562,7 @@ section "Speaker Volume" # the volume button service. if amixer -c seeed2micvoicec controls 2>/dev/null | grep -qi "speaker"; then info "Setting WM8960 hardware speaker to 94% (fixed master level)..." - amixer -c seeed2micvoicec sset 'Speaker' 94% -q + amixer -c seeed2micvoicec cset numid=13 127,127 -q success "Hardware speaker level set." else warn "Could not find Speaker control on seeed2micvoicec — skipping (card not loaded yet)." @@ -616,7 +616,7 @@ done # This must be re-applied every boot because alsactl restore can be beaten by the # driver resetting codec registers after enumeration. Keeping it here rather than # in asound.state makes the intent explicit and self-documenting. -amixer -c seeed2micvoicec cset numid=13 122,122 -q 2>/dev/null || true +amixer -c seeed2micvoicec cset numid=13 127,127 -q 2>/dev/null || true # Re-apply ALC settings explicitly. Enumerated controls (type=ENUMERATED) are # not reliably restored by alsactl on all kernel/driver versions. @@ -902,7 +902,7 @@ pkill wfbar || true # This runs here in addition to smart-display-audio-init.service because the # audio-init service fires early in boot before the codec registers have fully # settled; by the time the desktop session starts the driver is stable. -amixer -c seeed2micvoicec cset numid=13 122,122 -q 2>/dev/null || true +amixer -c seeed2micvoicec cset numid=13 127,127 -q 2>/dev/null || true # Hide the mouse cursor unclutter --timeout 1 & diff --git a/mqtt-bridge.py b/mqtt-bridge.py index 146663e..c97adb4 100755 --- a/mqtt-bridge.py +++ b/mqtt-bridge.py @@ -189,8 +189,8 @@ def on_connect(client, userdata, connect_flags, reason_code, properties): client.publish(topic, json.dumps(payload), retain=True) # Publish current state so HA sliders reflect actual values immediately - client.publish(state_topic("tts_volume"), str(_read_state(TTS_VOL_FILE, 90)), retain=True) - client.publish(state_topic("media_volume"), str(_read_state(MEDIA_VOL_FILE, 75)), retain=True) + client.publish(state_topic("tts_volume"), str(_read_state(TTS_VOL_FILE, 100)), retain=True) + client.publish(state_topic("media_volume"), str(_read_state(MEDIA_VOL_FILE, 90)), retain=True) client.publish(state_topic("brightness"), str(_read_brightness_pct()), retain=True) client.publish(state_topic("mic_gain"), str(_read_mic_gain_pct()), retain=True) From 2be9720a06093253204940f3a51a28d856bad054 Mon Sep 17 00:00:00 2001 From: Paul Robertson Date: Thu, 23 Apr 2026 06:13:48 +1200 Subject: [PATCH 2/2] fix: bump state-file seed defaults to match raised volume levels --- configure.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.sh b/configure.sh index 3105eea..77de6a0 100755 --- a/configure.sh +++ b/configure.sh @@ -570,12 +570,12 @@ else fi # Seed default per-stream software volumes if state files don't exist yet. -# TTS at 90%, media at 75% — voice slightly louder than music by default. +# TTS at 100%, media at 90% — voice slightly louder than music by default. # Mic gain at 63% — maps to ALSA value 40 (0 dB on the WM8960 Capture PGA). -[ -f "$CURRENT_HOME/.smart-display-tts-volume" ] || echo "90" > "$CURRENT_HOME/.smart-display-tts-volume" -[ -f "$CURRENT_HOME/.smart-display-media-volume" ] || echo "75" > "$CURRENT_HOME/.smart-display-media-volume" +[ -f "$CURRENT_HOME/.smart-display-tts-volume" ] || echo "100" > "$CURRENT_HOME/.smart-display-tts-volume" +[ -f "$CURRENT_HOME/.smart-display-media-volume" ] || echo "90" > "$CURRENT_HOME/.smart-display-media-volume" [ -f "$CURRENT_HOME/.smart-display-mic-gain" ] || echo "63" > "$CURRENT_HOME/.smart-display-mic-gain" -success "Default stream volumes seeded (TTS: 90%, Media: 75%, Mic: 63%)." +success "Default stream volumes seeded (TTS: 100%, Media: 90%, Mic: 63%)." # Persist all ALSA mixer settings so they survive reboot. # alsactl store writes to /var/lib/alsa/asound.state.