core: fix debugfs fifo parsing
This commit is contained in:
parent
11c615d0b7
commit
298aeabc10
@ -133,14 +133,14 @@ uvc_fifo_min() {
|
|||||||
|
|
||||||
uvc_fifo_min_debugfs() {
|
uvc_fifo_min_debugfs() {
|
||||||
local path="$1"
|
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 }
|
$1 > 0 { if (min == "" || $1 < min) min = $1 }
|
||||||
END { if (min != "") print min }'
|
END { if (min != "") print min }' || true
|
||||||
}
|
}
|
||||||
|
|
||||||
uvc_fifo_np_debugfs() {
|
uvc_fifo_np_debugfs() {
|
||||||
local path="$1"
|
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() {
|
compute_uvc_payload_cap() {
|
||||||
|
|||||||
@ -295,6 +295,11 @@ impl UvcConfig {
|
|||||||
cap.non_periodic_dw
|
cap.non_periodic_dw
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
eprintln!(
|
||||||
|
"[lesavka-uvc] payload cap unavailable; using max_packet {}",
|
||||||
|
max_packet
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if env::var("LESAVKA_UVC_BULK").is_ok() {
|
if env::var("LESAVKA_UVC_BULK").is_ok() {
|
||||||
max_packet = max_packet.min(512);
|
max_packet = max_packet.min(512);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user