Skip to content

Commit

Permalink
Merge pull request #5 from geerlingguy/mackemint/master
Browse files Browse the repository at this point in the history
Build optimizations and fix issue with Teams and some other apps w dwFrameInterval
  • Loading branch information
geerlingguy committed Jan 18, 2021
2 parents 09b4d0e + 08faad2 commit 1fb6365
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ KERNEL_DIR ?= /usr/src/linux

CC := $(CROSS_COMPILE)gcc
KERNEL_INCLUDE := -I$(KERNEL_DIR)/include -I$(KERNEL_DIR)/arch/$(ARCH)/include
CFLAGS := -W -Wall -g $(KERNEL_INCLUDE)
LDFLAGS := -g
CFLAGS := -W -Wall -O3 $(KERNEL_INCLUDE)
LDFLAGS := -O3g

all: uvc-gadget

Expand Down
4 changes: 2 additions & 2 deletions multi-gadget.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ln -s /sys/kernel/config/usb_gadget/pi4/functions/uvc.usb0/control/header/h /sys
# For 720p:
mkdir -p /sys/kernel/config/usb_gadget/pi4/functions/uvc.usb0/streaming/mjpeg/m/720p
cat <<EOF > /sys/kernel/config/usb_gadget/pi4/functions/uvc.usb0/streaming/mjpeg/m/720p/dwFrameInterval
5000000
333333
EOF
cat <<EOF > /sys/kernel/config/usb_gadget/pi4/functions/uvc.usb0/streaming/mjpeg/m/720p/wWidth
1280
Expand All @@ -49,7 +49,7 @@ EOF
# For 1080p:
# mkdir -p /sys/kernel/config/usb_gadget/pi4/functions/uvc.usb0/streaming/mjpeg/m/1080p
# cat <<EOF > /sys/kernel/config/usb_gadget/pi4/functions/uvc.usb0/streaming/mjpeg/m/1080p/dwFrameInterval
# 5000000
# 333333
# EOF
# cat <<EOF > /sys/kernel/config/usb_gadget/pi4/functions/uvc.usb0/streaming/mjpeg/m/1080p/wWidth
# 1920
Expand Down
2 changes: 1 addition & 1 deletion piwebcam
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ sudo /home/pi/uvc-gadget/multi-gadget.sh
# For 720p:
sudo /home/pi/uvc-gadget/uvc-gadget -f1 -s1 -r0 -u /dev/video1 -v /dev/video0
# For 1080p:
# sudo /home/pi/uvc-gadget/uvc-gadget -f1 -s1 -r1 -u /dev/video1 -v /dev/video0
#sudo /home/pi/uvc-gadget/uvc-gadget -f1 -s1 -r1 -u /dev/video1 -v /dev/video0

0 comments on commit 1fb6365

Please sign in to comment.