-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_ids.sh
More file actions
executable file
·25 lines (20 loc) · 827 Bytes
/
Copy pathsetup_ids.sh
File metadata and controls
executable file
·25 lines (20 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
MDEV="/dev/media0"
VDEV="/dev/video0"
OV_ID=39
CSI_ID=1
echo "--- Step 1: Linkage ---"
# Try alternative syntaxes for the link
media-ctl -d $MDEV -l "39:0->1:0[1]" || \
media-ctl -d $MDEV -l "'ov7251 3-0060':0->'ipu3-csi2 0':0[1]" || \
echo "FAILED to link sensor to CSI2"
echo "--- Step 2: Subdev Formats ---"
media-ctl -d $MDEV --set-v4l2 "39:0 [fmt:SBGGR10_1X10/640x480]"
media-ctl -d $MDEV --set-v4l2 "1:0 [fmt:SBGGR10_1X10/640x480]"
media-ctl -d $MDEV --set-v4l2 "1:1 [fmt:SBGGR10_1X10/640x480]"
echo "--- Step 3: Capture Node Format ---"
# IPU3 capture nodes often need v4l2-ctl to agree on the resolution
v4l2-ctl -d $VDEV --set-fmt-video=width=640,height=480,pixelformat=ip3G
echo "--- Step 4: Verification ---"
media-ctl -d $MDEV -p | grep -E "entity (39|1|4):" -A 4
v4l2-ctl -d $VDEV --get-fmt-video