kvm/internal
Alex P dc0ccf9af5 Fix HIGH priority issues in audio system
Addressed 5 HIGH priority issues identified in code review:

HIGH #12: safe_alsa_open validation (audio.c:314-327)
- Added validation for snd_pcm_nonblock() return value
- Properly close handle and return error if blocking mode fails
- Prevents silent failures when switching to blocking mode

HIGH #13: WebRTC write failure handling (relay.go:74-147)
- Track consecutive WebRTC write failures in OutputRelay
- Reconnect source after 50 consecutive failures
- Throttle warning logs (first failure + every 10th)
- Prevents silent audio degradation from persistent write errors

HIGH #14: Opus packet size validation (audio.c:1024-1027)
- Moved validation before mutex acquisition
- Reduces unnecessary lock contention for invalid packets
- Validates opus_buf, opus_size bounds before hot path

HIGH #15: FEC recovery validation (audio.c:1050-1071)
- Added detailed logging for FEC usage
- Log warnings when decode fails and FEC is attempted
- Log info/error messages for FEC success/failure
- Log warning when FEC returns 0 frames (silence)
- Improves debuggability of packet loss scenarios

Comment accuracy fixes (audio.c:63-67, 149-150, 164-165)
- Clarified RFC 7587 comment: RTP clock rate vs codec sample rate
- Explained why sr/fs parameters are ignored
- Added context about SpeexDSP resampling

Channel map validation (audio.c:572-579)
- Added validation for unexpected channel counts
- Check for SND_CHMAP_UNKNOWN positions
- Prevents crashes from malformed channel map data
2025-11-24 20:30:57 +02:00
..
audio Fix HIGH priority issues in audio system 2025-11-24 20:30:57 +02:00
confparser feat: refactoring network stack (#878) 2025-10-15 18:32:58 +02:00
hidrpc feat: release keyPress automatically (#796) 2025-09-18 13:35:47 +02:00
logging feat: jetkvm native in cGo 2025-09-29 14:09:30 +02:00
mdns feat: refactoring network stack (#878) 2025-10-15 18:32:58 +02:00
native Update DefaultEDID to force 60Hz video output 2025-11-24 18:06:15 +02:00
network/types chore: make udhcpc the default DHCP client (#990) 2025-11-20 16:48:07 +01:00
ota refactor: OTA (#912) 2025-11-19 15:20:59 +01:00
supervisor feat: add failsafe reason for video max restart attempts reached (#991) 2025-11-20 17:32:54 +01:00
sync feat: refactoring network stack (#878) 2025-10-15 18:32:58 +02:00
timesync feat: refactoring network stack (#878) 2025-10-15 18:32:58 +02:00
tzdata Refactor audio subsystem for improved maintainability 2025-11-19 13:42:51 +02:00
usbgadget Simplify audio configuration and error handling 2025-11-21 00:54:32 +02:00
utils feat: move native to a separate process, again (#964) 2025-11-19 16:02:37 +01:00
websecure feat(websecure): add support for ed25519 certificates (#513) 2025-05-25 11:09:58 +02:00