Reduce mixer and Bluetooth buffers from 500 ms to 200 ms

SBC medium, not the larger buffer, removed the headphone relay dropouts,
so cut dmix, bluealsa-aplay and alsaloop buffers to 200 ms and the
Shairport backend buffer to 0.15 s. Verified by listening (iPhone ->
headphones, with AirPlay mixed in) with no RTP loss or underruns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jsahn
2026-10-12 19:07:34 +09:00
co-authored by Claude Opus 5.5
parent 432eca1755
commit 7ac8cd1dbb
6 changed files with 22 additions and 9 deletions
+4 -1
View File
@@ -112,7 +112,10 @@ sudo journalctl -u radxa-mixer-web -n 40 --no-pager
기준 보드에서는 버퍼만 500 ms로 늘려서는 끊김이 남았고, 송신 SBC 품질을
high에서 medium으로 낮춘 뒤(`bluealsa --sbc-quality=medium`) 해결됐습니다.
같은 컨트롤러로 수신과 송신을 동시에 하므로 송신 전송량이 수신 손실에 영향을 줍니다.
현재 송신 버퍼는 500 ms이며 그만큼 지연이 추가됩니다.
SBC medium 적용 후에는 500 ms 버퍼가 필요 없어 믹서(dmix), Bluetooth 입력
(`bluealsa-aplay`), 헤드폰 송신(`alsaloop`) 버퍼를 각각 200 ms로 줄였습니다.
버퍼를 다시 늘리면 지연이 그만큼 늘어나므로, 끊김이 생기면 먼저 로그로
수신 손실인지 버퍼 오류인지 구분하세요.
청취 확인 시에는 `bluealsa-aplay -l`의 PLAYBACK 목록에 헤드폰이 있는지 먼저 봅니다.
없으면 헤드폰이 휴대폰에 직접 연결돼 Radxa를 거치지 않은 소리일 수 있습니다.