fix: share soundcard between darkice and ISR via ALSA dsnoop

hw:0,0 is an exclusive ALSA device — darkice holding it caused arecord
to fail silently (stderr was /dev/null), leaving all recordings at 0 bytes
with no errors in the log.

asound.conf: defines a dsnoop virtual device 'shared_mic' that opens
hw:0,0 once and lets multiple processes capture simultaneously.

docker-compose.yml: mount asound.conf into the container as
/etc/asound.conf; add ipc: host so the container shares the host IPC
namespace (dsnoop uses System V shared memory which does not cross the
container IPC boundary without this).

config.example.ini: document the dsnoop setup and shared-device pattern.
README, CLAUDE.md: document the full setup procedure.
This commit is contained in:
2026-04-26 14:21:31 +02:00
parent 357b3e6ed9
commit e67e27f047
5 changed files with 65 additions and 3 deletions
+2
View File
@@ -4,9 +4,11 @@ services:
volumes:
- ./config.ini:/app/config.ini:ro
- ./recordings:/app/recordings # matches output_directory = recordings in config.ini
- ./asound.conf:/etc/asound.conf:ro # dsnoop shared-capture config
# Soundcard (ALSA) access — comment out if you only record streams
devices:
- /dev/snd:/dev/snd
ipc: host # share IPC namespace with host so dsnoop shared memory works
restart: unless-stopped
stop_grace_period: 30s # allow time for open files to be closed cleanly