core: fix debugfs fifo parsing

This commit is contained in:
Brad Stein 2026-01-10 13:22:07 -03:00
parent 11c615d0b7
commit 298aeabc10
2 changed files with 8 additions and 3 deletions

View File

@ -133,14 +133,14 @@ uvc_fifo_min() {
uvc_fifo_min_debugfs() {
local path="$1"
awk -F': ' '/^g_tx_fifo_size\\[/{print $2}' "$path" 2>/dev/null | awk '
awk -F': ' '/^g_tx_fifo_size\[/{print $2}' "$path" 2>/dev/null | awk '
$1 > 0 { if (min == "" || $1 < min) min = $1 }
END { if (min != "") print min }'
END { if (min != "") print min }' || true
}
uvc_fifo_np_debugfs() {
local path="$1"
awk -F': ' '/^g_np_tx_fifo_size/{print $2; exit}' "$path" 2>/dev/null
awk -F': ' '/^g_np_tx_fifo_size/{print $2; exit}' "$path" 2>/dev/null || true
}
compute_uvc_payload_cap() {

View File

@ -295,6 +295,11 @@ impl UvcConfig {
cap.non_periodic_dw
);
}
} else {
eprintln!(
"[lesavka-uvc] payload cap unavailable; using max_packet {}",
max_packet
);
}
if env::var("LESAVKA_UVC_BULK").is_ok() {
max_packet = max_packet.min(512);