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:
@@ -144,3 +144,19 @@ format = auto
|
||||
# sample_rate = 44100
|
||||
# channels = 2
|
||||
# format = flac
|
||||
#
|
||||
# SHARING A DEVICE WITH ANOTHER APP (e.g. darkice):
|
||||
# ALSA hw: devices are exclusive — only one process can open them at a time.
|
||||
# Use the dsnoop virtual device defined in asound.conf to share the hardware:
|
||||
#
|
||||
# 1. sudo cp asound.conf /etc/asound.conf (once, on the host)
|
||||
# 2. Change the other app (darkice etc.) to use device "shared_mic" too
|
||||
# 3. Use device = shared_mic in ISR config (docker-compose.yml mounts asound.conf automatically)
|
||||
#
|
||||
# [usb_mic_shared]
|
||||
# type = soundcard
|
||||
# device = shared_mic
|
||||
# backend = alsa
|
||||
# sample_rate = 48000
|
||||
# channels = 2
|
||||
# format = flac
|
||||
|
||||
Reference in New Issue
Block a user