Commit Graph

26 Commits

Author SHA1 Message Date
Alex P 7580d00d2b Fix HDMI hotplug video restart after sleep mode changes
The sleep mode feature from dev (PR #999) prevented video from auto-starting
when streaming_status == 0, which broke HDMI hotplug functionality.

Modified video_restart_streaming() to check detected_signal:
- No signal + not streaming -> don't start (preserve sleep mode)
- Has signal -> always stop cleanly then restart (fix hotplug)

This ensures proper encoder cleanup and prevents corrupted video output
after HDMI disconnect/reconnect cycles.
2025-11-25 00:04:40 +02:00
Alex P aa0fe18b4a Merge branch 'dev' into feat/audio-support
Integrate latest dev branch changes including:
- HID RPC handshake improvements
- Video sleep mode functionality
- IPv6 address sorting fixes
- OTA update flow improvements
- Video stream lifecycle management

All audio functionality preserved and tested.
2025-11-24 23:30:49 +02:00
Alex P 818a2ca050 Update DefaultEDID to force 60Hz video output
Replace EDID with version that only advertises 60Hz timing modes
(1920x1080@60Hz and 1280x720@60Hz), removing the 1920x1080@50Hz mode
that was causing HDMI sources to prefer 50fps over 60fps output.
2025-11-24 18:06:15 +02:00
Alex P 60fcd91377 Update default EDID to 1920x1080@60Hz
Previous EDID was configured for 29.95Hz (30 FPS). Updated to standard
1920x1080@60Hz using CEA timing (148.5 MHz pixel clock, 2200x1125 total)
for smoother video capture.
2025-11-21 21:20:29 +02:00
Alex P 72966389d9 Update default EDID to JetKVM 1920x1080@60Hz with audio support
Changes default EDID to JetKVM branded display configuration:
- Display name: JetKVM
- Full HD resolution (1920x1080@60Hz)
- Digital RGB 8-bit color support
- CEA-861 extension with PCM audio capability
- Broader compatibility with source devices

This EDID declares audio support which may improve HDMI audio detection
on certain source hardware.
2025-11-21 17:35:03 +02:00
Aveline d0f1b758c7 fix: stop video stream before enabling sleep mode (#999) 2025-11-21 14:37:51 +01:00
Alex P fba4eabf3b Merge branch 'dev' into feat/audio-support
Integrated latest dev branch changes including:
- Native process refactoring with gRPC architecture
- OTA update system refactor with new component-based updates
- Updated build system and dependencies
- UI improvements and bug fixes

Post-merge fixes applied:
- Remove duplicate OTA RPC function declarations (now in ota.go)
- Fix GetDefaultEDID reference to use native.DefaultEDID constant
- Fix IsUpdatePending to use otaState.IsUpdatePending() method
- Add missing OTA RPC handler registrations for new update system

All audio functionality from feat/audio-support preserved.
All dev branch functionality preserved.
2025-11-20 23:47:44 +02:00
Aveline d34d01c4b3
feat: add failsafe reason for video max restart attempts reached (#991) 2025-11-20 17:32:54 +01:00
Adam Shiervani 85eb4babdf
feat: handle grpc events (#986)
Co-authored-by: Siyuan <siyuan@buildjet.com>
2025-11-20 16:07:50 +01:00
Aveline 3fcd5e7def
feat: move native to a separate process, again (#964) 2025-11-19 16:02:37 +01:00
Alex P 0dbf2dfda9 Update default EDID for improved compatibility
Changes:
- Switch manufacturer ID from DEL to LNX for better open-source alignment
- Add dual audio sample rate support (44.1kHz + 48kHz) to eliminate
  resampling quality loss on MacBooks and other devices
- Declare 640×480p60 in established timings and CEA video block (VIC-1)
- Use 1920×1200p60 as secondary timing to meet validator requirements
- Fix white point coordinates to D65 standard (0.313, 0.329)

This EDID now passes edidtool.com validation and provides universal
compatibility across macOS, Linux, and Windows systems.
2025-11-19 12:31:48 +02:00
Alex P 0168fcbdbd Make config.EdidString the single source of truth for EDID
- Set DefaultEDID in config defaults instead of empty string
- Pass config EDID to Native.Start() to fix initialization race condition
- Update DefaultEDID to MacBook-compatible value (2ch, 48kHz, 16/20/24-bit)
- Add getDefaultEDID RPC endpoint for UI to fetch backend constant
- Update UI to dynamically fetch default EDID instead of hardcoding
- Remove all EDID fallback logic now that config always has a value
- Simplify rpcGetEDID to return config value directly

This ensures the configured EDID is used from startup and eliminates
sync issues between backend constant, config, and UI.
2025-11-19 11:08:32 +02:00
Alex P 11dadebb93 Fix: improve EDID compatibility and add audio configuration options
- Update default EDID with registered manufacturer ID (Dell) and proper 24-inch display dimensions (52x32cm) for better macOS/OS compatibility
- Add configurable sample rate (32/44.1/48/96 kHz) to support different HDMI audio sources
- Add packet loss compensation percentage control for FEC overhead tuning
- Fix config migration to ensure new audio parameters get defaults for existing configs
- Update all language translations for new audio settings
2025-11-18 00:53:15 +02:00
Alex P e79c6f730e Add audio output source switching and improve shutdown handling
- Add HDMI/USB audio source selection in settings UI
- Add stop flags for graceful audio shutdown
- Use immediate PCM drop instead of drain for faster switching
- Add HDMI connection refresh RPC method
- Add GetDefaultEDID helper method
2025-11-17 20:45:34 +02:00
Alex P 9e69a0cb97 Fix: set EDID before video init to ensure audio capability detection 2025-11-17 17:36:53 +02:00
Alex P 98d20d4ffa Merge branch 'dev' into feat/audio-support 2025-11-11 21:40:29 +02:00
Aveline 5fb4c629dd
feat: failsafe mode (#952)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
Co-authored-by: Marc Brooks <IDisposable@gmail.com>
2025-11-11 13:13:42 +01:00
Alex P 65531427bd fix: update default EDID to enable audio support
The previous default EDID did not advertise audio capabilities,
preventing HDMI audio capture from working. This update ensures
the JetKVM properly identifies itself to source devices and
enables audio capture out of the box.

Changes:
- Display identifies as "JetKVM HDMI" (manufacturer ID: JTK)
- Includes full audio support (2/6/8-channel LPCM, up to 192 kHz)
- Advertises all TC358743XBG capabilities (1080p60, YCbCr, Deep Color)

This allows HDMI audio to work by default without manual EDID
configuration.
2025-10-30 22:33:04 +02:00
Alex P 65975a196e Merge branch 'dev' into feat/audio-support 2025-10-30 02:14:30 +02:00
Adam Shiervani 1ce63664c0
fix: video quality (#913) 2025-10-29 16:11:07 +01:00
Alex P df87d9f5e1 fix: remove continuous sleep mode check to prevent audio interference
The continuous ensure_sleep_mode_disabled() call in the format detection
loop caused repeated I2C transactions to the TC358743, disrupting HDMI
audio capture. Sleep mode is already disabled once during video_init(),
which is sufficient.
2025-10-27 17:28:14 +02:00
Aveline 2444817455
chore: disable sleep mode when detecting video format (#887)
Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
Co-authored-by: Adam Shiervani <adamshiervani@fastmail.com>
2025-10-17 17:51:02 +02:00
Aveline c775979ccb
feat: refactoring network stack (#878)
Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
2025-10-15 18:32:58 +02:00
Aveline cc9ff74276
feat: add HDMI sleep mode (#881) 2025-10-09 14:52:51 +02:00
Alex bdd6f4247b
fix: segfault in cGo 2025-10-02 19:15:03 +02:00
Aveline 657a177462
feat: jetkvm native in cGo 2025-09-29 14:09:30 +02:00