Letux Kernel

Video

You are looking at an old revision of the page Video. This revision was created by Nikolaus Schaller.

Table of Content

How to control the DSS outputs (LCD, TV-Out, DVI) and touch screen

LCD and touch screen

LCD

can be selected by adding "omapdss.def_disp=lcd" to the boot args. This is done by "setenv defaultdisplay lcd" in our boot.scr.

To disable/enable (power down/up) the LCD (state=0: off, state=1: on)

echo "$state" >/sys/devices/omapdss/display2/enabled

For more information about switching the DSS2 system, see the examples below. And please refer to http://processors.wiki.ti.com/index.php/DSS2_SYSFS_Examples

Touch Screen

is mapped to

/dev/input/touchscreen (on debian lenny)
/dev/input/event1 (on debian squeeze)

pen down status can be read asynchronously through

cat /sys/devices/virtual/gpio/gpio160/value

The raw ADC values, plate resistance, the temperature sensors and the AUX input (optional ambient light sensor) can be read through

cat /sys/bus/i2c/drivers/tsc2007/2-0048/values

The order of the values is

x, y, pressure, pendown(0/1), z1, z2, temp0, temp1, aux, resistance

The temp and aux values are updated every 100ms and the other values only on pen-down every 1ms.

Pressure values are an estimate and are lower for touches with small area (fingernail, stylus) and higher for bigger touch area (finger tip or multitouch). Typical range:

  • 300 for stylus
  • 700 for finger tip
  • 2000-15000 for two fingers

Resistance is an estimate with a reference value of 600 Ohms.

Note: the x and y values are the raw values before any calibration (which is usually done through libts or similar means).

Video out (can't be used in parallel to headset microphone input)

can be selected by adding "omapdss.def_disp=venc" to the boot args

To disable/enable (power down/up) the LCD (state=0: off, state=1: on) in the DSS system:

echo "$state" >/sys/devices/omapdss/display1/enabled

The video out amplifier is automatically controlled by enabling display1, but it can be controlled independently through (state=0: off, state=1: on)

echo $state >/sys/devices/virtual/gpio/gpio23/value

NOTES: * while gpio23 is "1", you can't use the headset microphone * there is no automatic detection of a video display connection * the 75 Ohm output is short circuit protected

DVI (on Beagleboard only!)

can be selected by adding "omapdss.def_disp=dvi" to the boot args

power (state=0: off, state=1: on)

echo $state >/sys/devices/virtual/gpio/gpio170/value

This is only available if the kernel is configured for the BeagleBoard.

Switch LCD to TV-out

Note: you must follow a specific order or it does fail (with timeouts). The order is to first disable the overlay (graphics source), then disconnect the display from the manager and finally disable the display before changing the framebuffer and timings. For enabling a different display, the reverse order is required. Firstly, enable the new display, then connect the manager and finally enable the overlay.

echo 0 > /sys/devices/platform/omapdss/overlay0/enabled
echo "" > /sys/devices/platform/omapdss/overlay0/manager
echo 0 > /sys/devices/platform/omapdss/display2/enabled
echo "pal" > /sys/devices/platform/omapdss/display1/timings
fbset -fb /dev/fb0 -xres 720 -yres 574 -vxres 720 -vyres 574
echo 1 > /sys/devices/platform/omapdss/display1/enabled
echo "tv" > /sys/devices/platform/omapdss/overlay0/manager
echo 1 > /sys/devices/platform/omapdss/overlay0/enabled

For NTSC:

echo "ntsc" > /sys/devices/platform/omapdss/display1/timings
fbset -fb /dev/fb0 -xres 720 -yres 482 -vxres 720 -vyres 482

Switch TV-Out to LCD

echo 0 > /sys/devices/platform/omapdss/overlay0/enabled
echo "" > /sys/devices/platform/omapdss/overlay0/manager
echo 0 > /sys/devices/platform/omapdss/display1/enabled
fbset -fb /dev/fb0 -xres 480 -yres 640 -vxres 480 -vyres 640
echo 1 > /sys/devices/platform/omapdss/display2/enabled
echo "lcd" > /sys/devices/platform/omapdss/overlay0/manager
echo 1 > /sys/devices/platform/omapdss/overlay0/enabled