- Use mono audio instead of stereo for microphone input
- Add cleanup to stop audio track on component unmount
- Explicitly set AudioTrack to nil when creation fails
- Prevent concurrent getUserMedia requests to fix toggle flakiness
- Add automatic track recovery when microphone track ends unexpectedly
- Fix auto-enable to only trigger on session start, not when toggling setting
- Ensure backend RPC is sent when auto-enable triggers
- Properly clean up old tracks before requesting new ones
- Add AudioInputAutoEnable and AudioOutputEnabled fields to backend config
- Implement RPC methods for get/set audio input auto-enable preference
- Load audio output enabled state from config on startup
- Make manual microphone toggle call backend to enable audio pipeline
- Auto-enable preference now persists across incognito sessions
- Reset microphone state to off when reaching login pages
- Fix issue where manual mic toggle required auto-enable to be on
Implement session-based microphone control with optional auto-enable:
- Microphone disabled by default, only requests permission when enabled
- Added persistent "Auto-enable Microphone" setting in audio settings
- Setting syncs to backend and works across browsers/devices
- Auto-enable respects secure context (HTTPS/localhost only)
- Refactored secure context check into reusable utility function
- Removed unused audioInputEnabled store properties
Added new audio-related UI components and improved localization for multiple languages. The SettingsItem component now supports badge links and variants, enhancing the user experience. Updated the AudioPopover to include quick audio controls for speakers and microphone, with descriptions and HTTPS-only warnings where applicable.
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
* 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.
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.
- 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.
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.