Commit Graph

247 Commits

Author SHA1 Message Date
Alex P de74ae1a12 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 516a953f41 Merge branch 'dev' into feat/audio-support 2025-10-30 02:14:30 +02:00
Marc Brooks 7955ee9d35
Improves OTA update reporting and process (#838) 2025-10-29 23:10:23 +01:00
Adam Shiervani 4b6e796a0e
fix: ensure proper redirection and page reload (#909) 2025-10-29 02:04:58 +01:00
Adam Shiervani 50fc88aae1
bug: fix null pointer in wakeDisplay (#907) 2025-10-28 18:48:30 +01:00
Alex P cd7a098f76 fix: track audio autoplay status separately to handle Safari blocking audio while allowing video 2025-10-28 15:47:36 +02:00
Alex P ef86af8afc fix: enable audio playback via manual start stream button
Browser autoplay policy blocks audio without user interaction.
Store audio elements in ref and trigger playback when user clicks
the existing 'Manually start stream' button.
2025-10-28 14:28:30 +02:00
Alex P b2a57a64e9 Merge branch 'dev' into feat/audio-support 2025-10-27 19:22:45 +02:00
Alex P be2bb518ed Merge branch 'dev' into feat/audio-support 2025-10-27 19:19:41 +02:00
Marc Brooks b1c788cc5e
chore/Automatically sort language files after machine-translate run (#902)
This should ensure that newly added strings are kept in their correct location so later changes yield clean GIT diffs.
Also bumped a couple minor dependencies
2025-10-27 16:34:07 +01:00
Adam Shiervani 71fe95bf57
More UI translations (#899)
* Enhance localization for reboot messages in multiple languages, including descriptions for device rebooting, IP address changes, and reconnection prompts in Danish, German, English, Spanish, French, Italian, Norwegian, Swedish, and Chinese.

* Update Swedish localization strings

* Update German localization strings

* Update Spanish localization strings

* Update Danish localization strings

* Update French localization strings

* Update Italian localization strings

* Update Norwegian localization strings

* Update Chinese localization strings

* sort translation keys

---------

Co-authored-by: Adam Shiervani <adamshiervani@fastmail.com>
2025-10-27 16:33:58 +01:00
Adam Shiervani ce9f95b8c8
refactor: ota redirecting (#898)
* refactor: improve URL handling in RebootingOverlay component

* refactor: enhance redirect URL handling in TryUpdate function

* refactor: disable old ota rebooting method in new version

* refactor: streamline version retrieval logic and enhance error handling in useVersion hook

* refactor: rename to RedirectTo

* fix: force page reload when redirecting from reboot actions

* refactor: consolidate sleep utility and update usages across components

* refactor: update JsonRpcCallOptions to use maxAttempts and attemptTimeoutMs, implement exponential backoff for retries

---------

Co-authored-by: Adam Shiervani <adamshiervani@fastmail.com>
2025-10-27 16:21:11 +01:00
Alex P 557b3bf3e6 Fix: app not loading via HTTP 2025-10-27 11:21:49 +02:00
Alex P 450836daba chore: revert golangci-lint config and remove audio stub
- Revert .golangci.yml to dev branch state (removed custom build-tags)
- Remove internal/audio/cgo_source_stub.go (not needed with proper cross-compilation)
- Fix import ordering in ui/src/utils.ts

Use 'make lint-go' for proper ARM cross-compilation environment.
2025-10-24 01:31:06 +03:00
Alex P 54cbd98781 fix: verify audio source change and show accurate feedback
After setting audio output source, fetch the actual value from backend
to verify the change was applied successfully. This prevents the UI
from showing incorrect state when the backend fails to apply the change.

The optimistic update provides immediate feedback, but we now verify
the actual result and show error if backend returned a different value
than expected.
2025-10-23 23:59:02 +03:00
Alex P 47782856f3 feat: add translations and fix audio settings page
Added comprehensive translations for audio settings page:
- Page title and description
- Audio output/input settings
- Audio source selector (HDMI/USB labels)
- Success/error messages for all operations
- Translations added for all 9 languages

Updated devices.$id.settings.audio.tsx:
- Import and use translation keys (m.audio_settings_*)
- Use existing audio_output_* and audio_input_* keys for notifications
- Fix dropdown not updating: update UI optimistically, revert on error
- This prevents the dropdown from appearing stuck after source change

The optimistic update pattern improves UX by immediately reflecting
the user's choice while the backend processes the change.
2025-10-23 23:56:15 +03:00
Alex P c96c3e215a fix: use translation key for audio button in ActionBar
Changed hardcoded 'Audio' string to use m.action_bar_audio()
translation key for proper internationalization.
2025-10-23 23:26:23 +03:00
Alex P 9a82df662f feat: add proper translations for audio features across all languages
Added comprehensive translations for audio-related UI strings:
- Action bar audio button
- Audio popover (title, output/input settings)
- Enable/Disable button labels
- Success/error notification messages
- USB device audio preset labels

Translations added for all 9 supported languages:
- English (en)
- Danish (da)
- German (de)
- Spanish (es)
- French (fr)
- Italian (it)
- Norwegian Bokmål (nb)
- Swedish (sv)
- Chinese Simplified (zh)

Updated AudioPopover.tsx to use translation keys instead of
hardcoded English strings for all UI elements.

Total of 19 new translation keys per language:
- action_bar_audio
- audio_disable/enable
- audio_input_* (title, description, enabled/disabled, failed)
- audio_output_* (title, description, enabled/disabled, failed)
- audio_popover_title
- usb_device_enable_audio_* (title, description)
- usb_device_keyboard_mouse_mass_storage_and_audio
2025-10-23 23:22:38 +03:00
Alex P 50b938d13e Merge dev into feat/audio-support
- Resolved conflicts in .gitignore, ActionBar, UsbDeviceSetting, and devices.$id.tsx
- Added audio-related translations to all language files:
  - action_bar_audio
  - usb_device_enable_audio_title
  - usb_device_enable_audio_description
  - usb_device_keyboard_mouse_mass_storage_and_audio
- Updated UI components to use localization messages
- Added separate USB preset for keyboard/mouse/storage without audio
- Kept OPUS_STEREO_PARAMS import from audio branch
- Preserved AudioPopover component from audio branch
2025-10-23 23:11:17 +03:00
Marc Brooks 9a4d061034
Localize the client/browser UI with inlang paraglide-js (#864) 2025-10-23 14:27:29 +02:00
Marc Brooks 374fc310d3
Merge branch 'dev' into feat/audio-support 2025-10-22 16:35:00 -05: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
Alex P a81544070b Merge branch 'dev' into feat/audio-support
This merge integrates the latest dev branch changes while preserving all
audio support functionality. Key changes include:

- Network stack refactoring: migrated from internal/network to pkg/nmlite
- New NetworkManager architecture with jetdhcpc client
- Function-based config pattern to avoid shared pointer bugs
- Updated UI components for network settings
- GitHub workflow and PR templates

- config.go: Retained AudioOutputSource field in Config struct
- config.go: Kept Audio: true in defaultUsbDevices
- config.go: Set AudioOutputSource: "usb" as default
- config.go: Adopted dev's types.NetworkConfig import path
- config.go: Adopted dev's function-based getDefaultConfig() pattern

1. config.go Config struct: Combined audio fields with dev's network refactoring
2. config.go default config: Adopted dev's function-based pattern while preserving audio defaults
3. ui/src/utils/jsonrpc.ts: Fixed unused error variable in catch block

All linters pass with 0 errors and 0 warnings.
2025-10-17 00:33:32 +03: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
Adam Shiervani 403141c96a
refactor: safe Comboxbox onChange (#886) 2025-10-14 22:45:48 -05:00
Alex 71553bcef7
Merge branch 'dev' into feat/audio-support 2025-10-07 14:30:07 +03:00
Alex P 532e83e514 Cleanup: reduce drift from dev 2025-10-07 14:00:49 +03:00
Alex P bb5634be58 refactor: Remove subprocess audio infrastructure, use CGO-only
Remove all subprocess-based audio code to simplify the audio system and
reduce complexity. Audio now uses CGO in-process mode exclusively.

Changes:
- Remove subprocess mode: Deleted Supervisor, IPCSource, embed.go
- Remove audio mode selection from UI (Settings → Audio)
- Remove audio mode from backend config (AudioMode field)
- Remove JSON-RPC handlers: getAudioMode/setAudioMode
- Remove Makefile targets: build_audio_output/input/binaries
- Remove standalone C binaries: jetkvm_audio_{input,output}.c
- Remove IPC protocol implementation: ipc_protocol.{c,h}
- Remove unused IPC functions from audio_common.{c,h}
- Simplify audio.go: startAudio() instead of startAudioSubprocesses()
- Update all function calls and comments to remove subprocess references
- Add constants to cgo_source.go (ipcMaxFrameSize, ipcMsgTypeOpus)
- Keep update_opus_encoder_params() for potential future runtime config

Benefits:
- Simpler codebase: -1,734 lines of code
- Better performance: No IPC overhead on embedded hardware
- Easier maintenance: Single audio implementation
- Smaller binary: No embedded audio subprocess binaries

The audio system now works exclusively via CGO direct C function calls,
with ALSA device selection (HDMI vs USB) still configurable via settings.
2025-10-07 13:34:03 +03:00
Aylen e755a6e1b1
Update openSUSE image reference to Leap 16.0 (#865) 2025-10-07 11:57:10 +02:00
Alex P 1bca60ae6b Merge branch 'feat/dual-audio-mode' into feat/audio-support 2025-10-07 11:26:09 +03:00
Alex P dd09cbcdc3 Cleanup: PR Comments 2025-10-07 11:14:16 +03:00
Alex P 035ba4c35f [WIP] Updates: support in-process mode 2025-10-07 11:00:59 +03:00
Alex P 00b8da45d9 [WIP] Updates: support in-process mode 2025-10-07 10:17:06 +03:00
Alex P 9abb2aa026 [WIP] Updates: support in-process mode 2025-10-07 10:13:11 +03:00
Alex P 9c72db913b feat: Optimize audio quality and default to USB audio
Audio quality improvements:
- Enable constrained VBR to prevent bitrate starvation at low volumes
- Increase Opus complexity from 2 to 5 for better quality
- Enable DTX for bandwidth optimization
- Enable FEC (Forward Error Correction)
- Add DTX and FEC signaling in SDP (usedtx=1;useinbandfec=1)

Default configuration changes:
- Change default audio output source from HDMI to USB
- Enable USB Audio device by default
- USB audio works on current stable image (HDMI requires newer device tree)

These changes fix crackling issues at low volumes and provide better
overall audio quality for both USB and HDMI audio paths.
2025-10-07 01:38:42 +03:00
Alex P 5158c89103 fix: Replace 'any' with proper React.ChangeEvent type in AudioPopover
Replace 'as any' type assertions with proper React.ChangeEvent<HTMLInputElement>
type for synthetic events passed to audio toggle handlers.
2025-10-06 22:13:21 +03:00
Alex P 7872ddc8fc Refactor: Simplify / rewrite Audio 2025-10-06 21:59:44 +03:00
Marc Brooks 437f0b854a
upgrade ui packages (#861) 2025-10-01 21:43:46 +02:00
Alex P 74f73d9496 Merge branch 'dev' into feat/audio-support 2025-10-01 13:09:03 +00:00
Marc Brooks 9438ab7778
Fix the lazy loading for the settings page. (#837)
Move SettingsItem into it's own page

Packages upgraded
@headlessui/react 2.2.8 -> 2.2.9
framer-motion 12.23.18 -> 12/23/22
react-router 7.9.1 -> 7.9.3
@tailwindcss/typography 0.6.18 -> 0.5.19
@types/react 19.1.13 -> 19.1.14
eslint-plugin-react-refresh 0.4.21 -> 0.4.22
2025-10-01 11:43:15 +02:00
Alex P 160a925f40 Merge branch 'dev' into feat/audio-support 2025-09-30 20:08:33 +00:00
Alexander 12d31a3d8e
Add da_DK keyboard Layout (#839) 2025-09-30 14:27:17 +02:00
Alex P f6dd605ea6 [WIP] Updates: simplify audio system 2025-09-30 09:36:19 +00:00
Alex P 680607e82e [WIP] Updates: simplify audio system 2025-09-30 09:08:55 +00:00
Aveline 657a177462
feat: jetkvm native in cGo 2025-09-29 14:09:30 +02:00
Alex P dcce0fefb7 Merge branch 'dev' into feat/audio-support 2025-09-26 12:53:23 +00:00
Adam Shiervani 703625d59a
fix: faster paste speed (#824)
* fix: update delay handling in PasteModal component

- Changed default delay value to 20 and adjusted validation to allow values between 0 and 65534.
- Cleaned up code formatting for better readability.

* fix: formatting
2025-09-25 10:26:11 +02:00
Marc Brooks cb24ef6d4f
Update UI dependencies (#819) 2025-09-24 12:16:02 +02:00
Alex P 630571da25 [WIP] Improvements, Bugfixes: Improve audio experience when running in HTTP mode 2025-09-21 22:05:19 +00:00
Alex P d311dee4c6 [WIP] Improvements, Bugfixes: Improve audio experience when running in HTTP mode 2025-09-21 21:20:05 +00:00