Commit Graph

634 Commits

Author SHA1 Message Date
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 55f40cb729 fix: move ipcMsgTypeOpus constant to source.go for cross-platform builds 2025-10-23 23:13:23 +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
Adam Shiervani 74e64f69a7
Add stale issues and PRs workflow (#890) 2025-10-16 16:21:37 +02:00
Adam Shiervani eb68c0ea5f
chore: add PR templates (feature, bug fix) (#889) 2025-10-16 15:51:56 +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
Adam Shiervani 403141c96a
refactor: safe Comboxbox onChange (#886) 2025-10-14 22:45:48 -05:00
Alex 0951f150bf
Merge branch 'dev' into feat/audio-support 2025-10-09 22:42:16 +03:00
Aveline cc9ff74276
feat: add HDMI sleep mode (#881) 2025-10-09 14:52:51 +02: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
Marc Brooks b144d9926f
Remove the temporary directory after extracting buildkit (#874) 2025-10-07 11:57:26 +02:00
Aylen e755a6e1b1
Update openSUSE image reference to Leap 16.0 (#865) 2025-10-07 11:57:10 +02:00
Marc Brooks 99a8c2711c
Add podman support (#875)
Reimplement #141 since we've changed everything since
2025-10-07 11:43:25 +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 0f16e0b11a [WIP] Updates: support in-process mode 2025-10-07 09:54:48 +03:00
Alex P 9d7fd878a1 [WIP] Updates: support in-process mode 2025-10-07 09:51:08 +03:00
Alex P 58fad71112 [WIP] Updates: support in-process mode 2025-10-07 08:49:49 +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 19fe908426 refactor: Simplify audio implementation
Remove dynamic gain code and rely on Opus encoder quality improvements:
- Increase Opus complexity from 2 to 5 for better quality
- Change bandwidth from FULLBAND (20kHz) to SUPERWIDEBAND (16kHz) for better quality at 128kbps
- Disable FEC to allocate all bits to audio quality
- Increase ALSA buffer from 40ms to 80ms for stability

The dynamic gain code was adding complexity without solving the underlying
issue: TC358743 HDMI chip captures digital audio at whatever volume the
source outputs. Users should adjust volume at the source or in their browser.
2025-10-07 00:25:45 +03:00
Alex P 04dd37f58f fix: Add noise gate to prevent amplifying silence artifacts
Add noise gate threshold at peak > 256 (-42dB) to prevent dynamic gain
from amplifying quantization noise and hardware noise floor. This fixes
crackling, buzzing, and static-like noise when HDMI audio is at very
low volume or during silence.

Without the gate, signals below -42dB (peak < 256) would get 8x gain
applied, amplifying noise floor to audible levels. Now these signals
pass through unmodified, eliminating the artifacts.
2025-10-06 22:23:23 +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 141e2f9099 fix: Address linting errors in audio code
- Check SetReadDeadline error in IPC client
- Explicitly ignore Kill() error (process may be dead)
- Remove init() function and rely on explicit ExtractEmbeddedBinaries() call
2025-10-06 22:12:20 +03:00
Alex P 7872ddc8fc Refactor: Simplify / rewrite Audio 2025-10-06 21:59:44 +03:00
Marc Brooks 317218a682
docs: debugging UI builds because of ui symlink (#873)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-04 12:05:14 +02:00
Aveline 62b8dee170
chore: downgrade gin to v1.10.1 (#869) 2025-10-03 08:48:51 +02:00
Alex bdd6f4247b
fix: segfault in cGo 2025-10-02 19:15:03 +02:00
Alex P 67447e4e5e [WIP] Updates: reduce PR complexity 2025-10-02 00:08:42 +03:00
Alex P c8e220334d [WIP] Updates: reduce PR complexity 2025-10-01 22:58:37 +03:00
Alex P 178c7486cc [WIP] Updates: reduce PR complexity 2025-10-01 22:54:37 +03:00
dependabot[bot] 63aa940f42
build(deps): bump github.com/prometheus/client_golang (#851)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 21:44:24 +02:00
dependabot[bot] 043ef9ddfc
build(deps): bump github.com/gin-gonic/gin from 1.10.1 to 1.11.0 (#852)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 21:44:08 +02:00
Marc Brooks 437f0b854a
upgrade ui packages (#861) 2025-10-01 21:43:46 +02:00
dependabot[bot] a45d55123c
build(deps): bump github.com/prometheus/common from 0.66.0 to 0.66.1 (#855)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 21:42:08 +02:00
dependabot[bot] 213e750e04
build(deps): bump github.com/coder/websocket from 1.8.13 to 1.8.14 (#854)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 21:41:48 +02:00
dependabot[bot] 6dcb0286e3
build(deps): bump golang.org/x/net from 0.43.0 to 0.44.0 (#856)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 21:40:57 +02:00
dependabot[bot] 74ccca0b1a
build(deps): bump golang.org/x/crypto from 0.41.0 to 0.42.0 (#849)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 21:39:31 +02:00
dependabot[bot] 0ad435475b
build(deps): bump github.com/go-co-op/gocron/v2 from 2.16.5 to 2.16.6 (#859)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 21:39:15 +02:00
dependabot[bot] 23bf3978fa
build(deps): bump actions/setup-go from 5 to 6 (#848)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-01 21:35:35 +02:00
Alex P 257993ec20 [WIP] Updates: reduce PR complexity 2025-10-01 22:21:04 +03:00
Alex P 56c02f1067 [WIP] Updates: reduce PR complexity 2025-10-01 22:07:45 +03:00