forked from joelagnel/validation-scripts
-
Notifications
You must be signed in to change notification settings - Fork 2
/
testsvideo
executable file
·40 lines (34 loc) · 1.21 KB
/
testsvideo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
# See /boot/DSS
ovl0=/sys/devices/platform/omapdss/overlay0
ovl1=/sys/devices/platform/omapdss/overlay1
ovl2=/sys/devices/platform/omapdss/overlay2
mgr0=/sys/devices/platform/omapdss/manager0
mgr1=/sys/devices/platform/omapdss/manager1
dvi=/sys/devices/platform/omapdss/display0
tv=/sys/devices/platform/omapdss/display1
w=`cat $dvi/timings | cut -d "," -f 2 | cut -d "/" -f 1`
h=`cat $dvi/timings | cut -d "," -f 3 | cut -d "/" -f 1`
echo "Current resolution is $w x $h"
# Set TV timings
echo "ntsc" > $tv/timings
#echo "pal" > $tv/timings
w=`cat $tv/timings | cut -d "," -f 2 | cut -d "/" -f 1`
h=`cat $tv/timings | cut -d "," -f 3 | cut -d "/" -f 1`
echo "Switching to TV output ($w x $h)..."
echo "0" > $tv/enabled
echo "0" > $dvi/enabled
echo "" > $mgr0/display
fbset -fb /dev/fb0 -xres $w -yres $h -vxres $w -vyres $h
echo "tv" > $mgr0/display
echo "1" > $tv/enabled
sleep 10
w=`cat $dvi/timings | cut -d "," -f 2 | cut -d "/" -f 1`
h=`cat $dvi/timings | cut -d "," -f 3 | cut -d "/" -f 1`
echo "Switching to DVI output ($w x $h)..."
echo "0" > $tv/enabled
echo "0" > $dvi/enabled
echo "" > $mgr0/display
fbset -fb /dev/fb0 -xres $w -yres $h -vxres $w -vyres $h
echo "dvi" > $mgr0/display
echo "1" > $dvi/enabled