Make laptop ALSA routing match Pi rover

This commit is contained in:
legop3
2026-07-07 00:01:26 -04:00
parent e6c4931210
commit 11340bf3f6
+39 -29
View File
@@ -1,32 +1,36 @@
# ALSA routing for the Debian laptop rover profile.
# Dedicated ALSA routing for the Debian laptop rover profile.
#
# This file intentionally mirrors the logical device names used by the Pi rover
# audio setup. roverd can keep sending horn audio to "horn", forwarded browser
# audio to "forward", and TTS to ALSA's default playback path without caring
# which physical sound card is underneath the profile.
# This intentionally mirrors pi/asound.conf as closely as a normal PC can:
# one fixed hardware card, one dmix playback engine, separate softvol controls
# for TTS/horn/forwarded audio, and a raw capture alias for the rover mic.
#
# This is NOT meant to preserve normal desktop audio behavior. The laptop rover
# installer disables PipeWire/PulseAudio so roverd owns the audio hardware like
# the Raspberry Pi rover does. If the laptop's real speaker/mic card is not ALSA
# card 0, change the hw:0,0/card 0 references below to the card shown by:
# aplay -l
# arecord -l
pcm.roverd_playback {
type plug
# Use the system's first normal ALSA playback device as the physical sink.
# This avoids referencing "default" here, because this file replaces
# pcm.!default below and using it as a slave would recurse.
slave.pcm "sysdefault"
# Mix multiple playback clients in software with a fixed low-cost format.
pcm.dmixer {
type dmix
ipc_key 1024
ipc_perm 0666
slave {
pcm "hw:0,0"
format S16_LE
rate 16000
channels 1
period_time 0
period_size 1024
buffer_size 4096
}
pcm.roverd_capture {
type plug
# The media publisher records from "default"; with pcm.!default below that
# capture side resolves here. Keeping capture separate from playback lets the
# asym default expose ordinary microphone input while playback goes through
# the TTS softvol path.
slave.pcm "sysdefault"
}
# TTS volume control (used by default playback path).
pcm.tts_softvol {
type softvol
slave.pcm "roverd_playback"
slave.pcm "dmixer"
control {
name "TTSMaster"
card 0
@@ -35,9 +39,10 @@ pcm.tts_softvol {
max_dB 12.0
}
# Horn volume control.
pcm.horn_softvol {
type softvol
slave.pcm "roverd_playback"
slave.pcm "dmixer"
control {
name "HornMaster"
card 0
@@ -46,9 +51,10 @@ pcm.horn_softvol {
max_dB 12.0
}
# Forwarded audio volume control.
pcm.forward_softvol {
type softvol
slave.pcm "roverd_playback"
slave.pcm "dmixer"
control {
name "ForwardMaster"
card 0
@@ -57,6 +63,7 @@ pcm.forward_softvol {
max_dB 12.0
}
# Per-source playback PCMs.
pcm.tts {
type plug
slave.pcm "tts_softvol"
@@ -72,14 +79,17 @@ pcm.forward {
slave.pcm "forward_softvol"
}
# Capture alias used by laptop rover config defaults.
pcm.rovermic {
type plug
slave.pcm "hw:0,0"
}
# Defaults: TTS direct playback + raw capture on the dedicated laptop sound card.
pcm.!default {
type asym
# Existing TTS engines play to their default ALSA output, so default playback
# is intentionally the TTS path. This preserves the current TTS execution
# model while still making the TTS volume control meaningful on laptops.
playback.pcm "tts"
capture.pcm "roverd_capture"
capture.pcm "rovermic"
}
ctl.!default {