feat: UAC USB microphone passthrough

- 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
This commit is contained in:
arounyf
2026-07-23 06:56:53 +00:00
parent 4e32b05124
commit e9bed3688f
27 changed files with 977 additions and 16 deletions

View File

@@ -92,7 +92,8 @@ export default {
},
actionbar: {
paste: '粘贴文本',
virtualMedia: '虚拟媒体',
micStart: '开始传声',
micStop: '停止传声',
virtualMediaTip: '管理虚拟媒体设备',
power: '电源',
keyboard: '虚拟键盘',
@@ -652,6 +653,8 @@ export default {
otgNetworkDriver: '目标机驱动模式',
otgNetworkInterface: '桥接网卡',
otgNetworkNone: '无',
uacMic: 'USB 麦克风',
uacMicDesc: '启用后目标机将看到一个 USB 麦克风设备,音频从浏览器传入',
otgDescriptor: 'USB 设备描述符',
vendorId: '厂商 ID (VID)',
productId: '产品 ID (PID)',