Included the installation script for audio dependencies in the Docker build context preparation. This ensures that the necessary audio components are available during the build process.
Temporarily remove the ability to switch between HDMI and USB audio
output sources. The application now uses USB audio (hw:1,0) exclusively
until HDMI audio capture issues are resolved.
Changes:
- Remove AudioOutputSource config field
- Remove audio source switching logic and UI
- Hardcode USB audio output device
- Remove related RPC methods
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.
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.
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
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.
* 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>
- 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.
Provides no-op AudioSource implementations for platforms that don't
support ARM CGO audio (x86_64, darwin, etc.). This allows golangci-lint
to run successfully on any platform without requiring ARM cross-compilation
toolchain.
The stub implementations return errors when called, ensuring that if
they're accidentally used at runtime on non-ARM platforms, it will fail
gracefully with a clear error message rather than undefined symbols.
Build constraints ensure the real CGO implementation is used on linux/arm
and linux/arm64, while stubs are used everywhere else.
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.
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.
Added documentation to .golangci.yml explaining:
- JetKVM uses ARMv7 (Rockchip RK3308, Cortex-A7) not ARM64
- golangci-lint should be run via 'make lint-go' not directly
- Audio CGO code requires cross-compilation environment from Makefile
The build-tags are explicitly listed to match the actual build configuration
used in the Makefile (netgo, timetzdata, nomsgpack).
Running 'make lint' or 'make lint-go' works correctly as it sets up
the full ARM cross-compilation environment with audio library dependencies.
The audio.go file references config.AudioOutputSource but the field
was missing from the Config struct definition, causing type errors.
Added AudioOutputSource string field with json tag 'audio_output_source'
to support configuration of audio output source ('hdmi' or 'usb').
- 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
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.