mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
Make laptop ALSA routing match Pi rover
This commit is contained in:
@@ -1,88 +1,98 @@
|
||||
# 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"
|
||||
}
|
||||
|
||||
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"
|
||||
# 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
|
||||
}
|
||||
}
|
||||
|
||||
# TTS volume control (used by default playback path).
|
||||
pcm.tts_softvol {
|
||||
type softvol
|
||||
slave.pcm "roverd_playback"
|
||||
control {
|
||||
name "TTSMaster"
|
||||
card 0
|
||||
}
|
||||
min_dB -60.0
|
||||
max_dB 12.0
|
||||
type softvol
|
||||
slave.pcm "dmixer"
|
||||
control {
|
||||
name "TTSMaster"
|
||||
card 0
|
||||
}
|
||||
min_dB -60.0
|
||||
max_dB 12.0
|
||||
}
|
||||
|
||||
# Horn volume control.
|
||||
pcm.horn_softvol {
|
||||
type softvol
|
||||
slave.pcm "roverd_playback"
|
||||
control {
|
||||
name "HornMaster"
|
||||
card 0
|
||||
}
|
||||
min_dB -60.0
|
||||
max_dB 12.0
|
||||
type softvol
|
||||
slave.pcm "dmixer"
|
||||
control {
|
||||
name "HornMaster"
|
||||
card 0
|
||||
}
|
||||
min_dB -60.0
|
||||
max_dB 12.0
|
||||
}
|
||||
|
||||
# Forwarded audio volume control.
|
||||
pcm.forward_softvol {
|
||||
type softvol
|
||||
slave.pcm "roverd_playback"
|
||||
control {
|
||||
name "ForwardMaster"
|
||||
card 0
|
||||
}
|
||||
min_dB -60.0
|
||||
max_dB 12.0
|
||||
type softvol
|
||||
slave.pcm "dmixer"
|
||||
control {
|
||||
name "ForwardMaster"
|
||||
card 0
|
||||
}
|
||||
min_dB -60.0
|
||||
max_dB 12.0
|
||||
}
|
||||
|
||||
# Per-source playback PCMs.
|
||||
pcm.tts {
|
||||
type plug
|
||||
slave.pcm "tts_softvol"
|
||||
type plug
|
||||
slave.pcm "tts_softvol"
|
||||
}
|
||||
|
||||
pcm.horn {
|
||||
type plug
|
||||
slave.pcm "horn_softvol"
|
||||
type plug
|
||||
slave.pcm "horn_softvol"
|
||||
}
|
||||
|
||||
pcm.forward {
|
||||
type plug
|
||||
slave.pcm "forward_softvol"
|
||||
type plug
|
||||
slave.pcm "forward_softvol"
|
||||
}
|
||||
|
||||
pcm.!default {
|
||||
type asym
|
||||
# Capture alias used by laptop rover config defaults.
|
||||
pcm.rovermic {
|
||||
type plug
|
||||
slave.pcm "hw:0,0"
|
||||
}
|
||||
|
||||
# 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"
|
||||
# Defaults: TTS direct playback + raw capture on the dedicated laptop sound card.
|
||||
pcm.!default {
|
||||
type asym
|
||||
playback.pcm "tts"
|
||||
capture.pcm "rovermic"
|
||||
}
|
||||
|
||||
ctl.!default {
|
||||
type hw
|
||||
card 0
|
||||
type hw
|
||||
card 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user