make sure the mic is the default hopefully

This commit is contained in:
legop3
2025-11-27 16:51:19 -05:00
parent 9289fb3467
commit e2a4d2f3e5
2 changed files with 21 additions and 3 deletions
+12 -1
View File
@@ -11,10 +11,21 @@ pcm.softvol {
}
}
# Shareable mic capture on the Google Voice HAT (card 0)
pcm.micdup {
type dsnoop
ipc_key 2048
slave {
pcm "hw:0,0"
channels 1
rate 16000
}
}
# Define a software volume (gain) for the microphone (Capture)
pcm.micboost {
type softvol
slave.pcm "dsnoop" # route through dsnoop for sharing
slave.pcm "micdup" # route through dsnoop wrapper
control {
name "Micro" # name of mic gain control
card 0
+9 -2
View File
@@ -50,7 +50,8 @@ FLIP_ARGS=(--rotation 180)
run_pipeline() {
if [[ "${AUDIO_ENABLE}" -eq 1 ]]; then
"${LIBCAMERA_BIN_PATH}" \
# Try audio + video; if audio device is missing, fallback to video-only.
if ! "${LIBCAMERA_BIN_PATH}" \
--inline \
--timeout 0 \
--width "${VIDEO_WIDTH}" \
@@ -85,7 +86,13 @@ run_pipeline() {
-flush_packets 1 \
-f mpegts \
"${PUBLISH_URL}"
else
then
echo "Audio pipeline failed; falling back to video-only this run" >&2
AUDIO_ENABLE=0
fi
fi
if [[ "${AUDIO_ENABLE}" -ne 1 ]]; then
"${LIBCAMERA_BIN_PATH}" \
--inline \
--timeout 0 \