This commit is contained in:
Brad Stein 2025-07-05 15:21:12 -05:00
parent f04fc1c02a
commit 7222020631

View File

@ -156,21 +156,14 @@ for s in fs hs ss; do
done
# ── 4. VideoControl 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 subdir)
for s in fs hs ss; do
mkdir -p "$F/control/class/$s"
# give the kernel up to 0.5s to create the directory
for _ in {1..50}; do
[[ -d "$F/control/class/$s" ]] && break
sleep 0.010
done
# some gadgets (FSonly) 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"
ln -sf ../header/h "$F/control/class/$s" # ../header/h relative to …/control/class
done
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
mkdir -p "$F/control/header/strings/0x409"
echo "LesavkaUVC" >"$F/control/header/strings/0x409/label"
echo "Lesavka UVC" >"$F/control/header/strings/0x409/label"
# ----------------------- configuration -----------------------------
mkdir -p "$G/configs/c.1/strings/0x409"