The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


User:Tswindell/N9(XX) TV Output

From Mer Wiki
Jump to: navigation, search
 #! /bin/sh
 # Usage: $0 enable|disable pal|ntsc
 
 FB0PATH="/sys/class/graphics/fb0"
 FB1PATH="/sys/class/graphics/fb0"
 FB2PATH="/sys/class/graphics/fb2"
 DSSPATH="/sys/devices/platform/omapdss"
 
 function enable_pal() {
     echo 0 > "$DSSPATH/overlay0/enabled"
     echo 0 > "$DSSPATH/overlay2/enabled"
     echo 0 > "$DSSPATH/display1/enabled"
 
     echo            > "$FB2PATH/overlays"
     echo 0,2        > "$FB0PATH/overlays"
     echo 658,520    > "$DSSPATH/overlay2/output_size"
     echo tv         > "$DSSPATH/overlay2/manager"
     echo 35,35      > "$DSSPATH/overlay2/position"
     echo pal        > "$DSSPATH/display1/timings"
 
     echo 1 > "$DSSPATH/overlay0/enabled"
     echo 1 > "$DSSPATH/overlay2/enabled"
     echo 1 > "$DSSPATH/display1/enabled"
 }
 
 function enable_ntsc() {
     echo 0 > "$DSSPATH/overlay0/enabled"
     echo 0 > "$DSSPATH/overlay2/enabled"
     echo 0 > "$DSSPATH/display1/enabled"
 
     echo            > "$FB2PATH/overlays"
     echo 0,2        > "$FB0PATH/overlays"
     echo 655,455    > "$DSSPATH/overlay2/output_size"
     echo tv         > "$DSSPATH/overlay2/manager"
     echo 40,15      > "$DSSPATH/overlay2/position"
     echo ntsc       > "$DSSPATH/display1/timings"
 
     echo 1 > "$DSSPATH/overlay0/enabled"
     echo 1 > "$DSSPATH/overlay2/enabled"
     echo 1 > "$DSSPATH/display1/enabled"
 }
 
 function enable() {
     case "$1" in
         "pal")
             enable_pal
             ;;
         "ntsc")
             enable_ntsc
             ;;
     esac
 }
 
 function disable() {
     echo 0 > "$DSSPATH/overlay0/enabled"
     echo 0 > "$DSSPATH/overlay2/enabled"
     echo 0 > "$DSSPATH/display1/enabled"
     echo   > "$FB2PATH/overlays"
     echo 0 > "$FB0PATH/overlays"
     echo 1 > "$DSSPATH/overlay0/enabled"
 }
 
 case "$1" in
     "enable")
         enable "$2"
         ;;
 
     "disable")
         disable
         ;;
 esac
Personal tools