fix: 修复OTG gadget重建后HID后端未重载导致键鼠失效 - #282
Merged
mofeng-git merged 2 commits intoJul 23, 2026
Merged
Conversation
当MSD或OTG网络配置变更导致gadget被重建时,新的/dev/hidg*设备 被创建但HID后端因'配置未变'跳过了reload,导致仍持有已删除设备 的旧文件描述符,键鼠操作无效。 修复: 在apply_usb_config中检测gadget是否因MSD/网络变更被重建, 若是且HID后端为OTG,强制reload HID以打开新的/dev/hidg*设备。 同时为MsdConfig添加PartialEq derive以支持变更检测。
- 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
当MSD或OTG网络配置变更导致gadget被重建时,新的/dev/hidg*设备
被创建但HID后端因'配置未变'跳过了reload,导致仍持有已删除设备
的旧文件描述符,键鼠操作无效。
修复: 在apply_usb_config中检测gadget是否因MSD/网络变更被重建,
若是且HID后端为OTG,强制reload HID以打开新的/dev/hidg*设备。
同时为MsdConfig添加PartialEq derive以支持变更检测。