usb fix
This commit is contained in:
parent
f04fc1c02a
commit
7222020631
@ -156,21 +156,14 @@ for s in fs hs ss; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# ── 4. Video‑Control interface (must be a real directory) ───────────
|
# ── 4. Video‑Control interface (must be a real directory) ───────────
|
||||||
mkdir -p "$F/control/header/h" # real dir – must exist first
|
mkdir -p "$F/control/header/h" # real directory – mandatory
|
||||||
|
|
||||||
# The kernel may need a few ms to add class/{fs,hs,ss}; wait and link
|
# Create the single 'class' directory once …
|
||||||
|
mkdir -p "$F/control/class"
|
||||||
|
|
||||||
|
# … and for every speed make the symlink *itself* (NOT a sub‑dir)
|
||||||
for s in fs hs ss; do
|
for s in fs hs ss; do
|
||||||
mkdir -p "$F/control/class/$s"
|
ln -sf ../header/h "$F/control/class/$s" # ../header/h relative to …/control/class
|
||||||
# give the kernel up to 0.5 s to create the directory
|
|
||||||
for _ in {1..50}; do
|
|
||||||
[[ -d "$F/control/class/$s" ]] && break
|
|
||||||
sleep 0.010
|
|
||||||
done
|
|
||||||
# some gadgets (FS‑only) never get “hs” – skip gracefully
|
|
||||||
[[ -d "$F/control/class/$s" ]] || continue
|
|
||||||
|
|
||||||
# finally create the mandatory ‘h’ link
|
|
||||||
ln -sf ../../header/h "$F/control/class/$s/h"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo 0x0 >"$F/control/terminal/camera/default/bmControls" 2>/dev/null || true
|
echo 0x0 >"$F/control/terminal/camera/default/bmControls" 2>/dev/null || true
|
||||||
@ -178,7 +171,7 @@ echo 0x0 >"$F/control/processing/default/bmControls" 2>/dev/null || true
|
|||||||
|
|
||||||
# friendly label
|
# friendly label
|
||||||
mkdir -p "$F/control/header/strings/0x409"
|
mkdir -p "$F/control/header/strings/0x409"
|
||||||
echo "Lesavka UVC" >"$F/control/header/strings/0x409/label"
|
echo "Lesavka UVC" >"$F/control/header/strings/0x409/label"
|
||||||
|
|
||||||
# ----------------------- configuration -----------------------------
|
# ----------------------- configuration -----------------------------
|
||||||
mkdir -p "$G/configs/c.1/strings/0x409"
|
mkdir -p "$G/configs/c.1/strings/0x409"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user