mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-09-12 18:44:25 +08:00
- Add UAC1 gadget function (ConfigFS) with optimized endpoint config - Browser mic capture with Opus encoding via WebCodecs AudioEncoder - WebSocket audio transport (Opus 64kbps, 100x bandwidth reduction vs raw PCM) - aplay subprocess for reliable PCM playback to USB gadget - Settings toggle + ActionBar mic button (hidden when UAC disabled) - Dynamic PCM device resolution (/proc/asound) - c_chmask=0 + req_number=4 fixes DWC3 composite isochronous endpoint issue
46 lines
888 B
Rust
46 lines
888 B
Rust
//! USB OTG composite gadget (HID + MSD + Ethernet).
|
|
|
|
#[cfg(unix)]
|
|
pub mod bridge;
|
|
#[cfg(unix)]
|
|
pub mod configfs;
|
|
#[cfg(unix)]
|
|
pub mod function;
|
|
#[cfg(unix)]
|
|
pub mod hid;
|
|
#[cfg(unix)]
|
|
pub mod manager;
|
|
#[cfg(unix)]
|
|
pub mod msd;
|
|
#[cfg(unix)]
|
|
pub mod network;
|
|
pub mod report_desc;
|
|
pub mod self_check;
|
|
#[cfg(unix)]
|
|
pub mod service;
|
|
#[cfg(unix)]
|
|
pub mod uac;
|
|
|
|
#[cfg(unix)]
|
|
pub use manager::{wait_for_hid_devices, OtgGadgetManager};
|
|
#[cfg(unix)]
|
|
pub use msd::{MsdFunction, MsdLunConfig};
|
|
#[cfg(unix)]
|
|
pub use network::NetworkFunction;
|
|
#[cfg(unix)]
|
|
pub use service::{HidDevicePaths, OtgNetworkStatus, OtgRuntimeHealth, OtgService, UacConfig};
|
|
#[cfg(unix)]
|
|
pub use uac::UacFunction;
|
|
|
|
/// List USB Device Controller names exposed by sysfs.
|
|
pub fn list_udc_devices() -> Vec<String> {
|
|
#[cfg(unix)]
|
|
{
|
|
configfs::list_udcs()
|
|
}
|
|
#[cfg(not(unix))]
|
|
{
|
|
Vec::new()
|
|
}
|
|
}
|