mirror of
https://github.com/DrHo1y/orangepi-build.git
synced 2026-03-23 17:16:43 +07:00
opi5plus: update REVISION to 1.0.4
rk3588: kde-plasma: support ctrl+alt+t shortcut to open the command line terminal rk3588: kde-plasma: add konsole and chromium shortcuts to the taskbar rk3588: fix realteck 8821cu usb wifi (from Joshua Riek) rk3588: update audio configurations (from Joshua Riek)
This commit is contained in:
23
external/packages/bsp/common/usr/share/initramfs-tools/hooks/usb_modeswitch
vendored
Executable file
23
external/packages/bsp/common/usr/share/initramfs-tools/hooks/usb_modeswitch
vendored
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
PREREQ=""
|
||||
prereqs()
|
||||
{
|
||||
echo "$PREREQ"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
prereqs)
|
||||
prereqs
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
. /usr/share/initramfs-tools/scripts/functions
|
||||
. /usr/share/initramfs-tools/hook-functions
|
||||
|
||||
copy_exec /usr/sbin/usb_modeswitch /usr/sbin/usb_modeswitch
|
||||
copy_exec /etc/udev/rules.d/40-usb_modeswitch.rules /etc/udev/rules.d/40-usb_modeswitch.rules
|
||||
copy_exec /lib/udev/rules.d/40-usb_modeswitch.rules /lib/udev/rules.d/40-usb_modeswitch.rules
|
||||
|
||||
exit 0
|
||||
@@ -17,10 +17,17 @@ hdmi0_card=$(aplay -l | grep "hdmi0" | cut -d ':' -f 1 | cut -d ' ' -f 2)
|
||||
hdmi1_card=$(aplay -l | grep "hdmi1" | cut -d ':' -f 1 | cut -d ' ' -f 2)
|
||||
hdmiin_card=$(arecord -l | grep "hdmiin" | cut -d ":" -f 1 | cut -d ' ' -f 2)
|
||||
|
||||
DISPLAY=:0.0 gst-launch-1.0 v4l2src device=${device_id} io-mode=4 ! videoconvert \
|
||||
! video/x-raw,format=NV12,width=${width},height=${heigh} \
|
||||
! videoscale ! video/x-raw,width=1280,height=720 \
|
||||
! autovideosink sync=false 2>&1 > /dev/null &
|
||||
if [[ $XDG_SESSION_TYPE == wayland ]]; then
|
||||
DISPLAY=:0.0 gst-launch-1.0 v4l2src device=${device_id} ! videoconvert \
|
||||
! videoscale ! video/x-raw,width=1280,height=720 \
|
||||
! waylandsink sync=false 2>&1 > /dev/null &
|
||||
else
|
||||
DISPLAY=:0.0 gst-launch-1.0 v4l2src device=${device_id} io-mode=4 ! videoconvert \
|
||||
! video/x-raw,format=NV12,width=${width},height=${heigh} \
|
||||
! videoscale ! video/x-raw,width=1280,height=720 \
|
||||
! autovideosink sync=false 2>&1 > /dev/null &
|
||||
|
||||
fi
|
||||
|
||||
gst-launch-1.0 alsasrc device=hw:${hdmiin_card},0 ! audioconvert ! audioresample ! queue \
|
||||
! tee name=t ! queue ! alsasink device="hw:${hdmi0_card},0" \
|
||||
|
||||
Reference in New Issue
Block a user