Daryl Jarman

iMx51 EVK Android Screen Orientation

Discussion created by Daryl Jarman on Mar 20, 2012
Latest reply on Mar 21, 2012 by Daryl Jarman

Greetings everyone,

 

I currently have running Android on an iMX51 board closely cloned from the FreeScale iMX51 EVK reference design.  The board in question uses an 800x480 resolution display.

When Android runs, it runs in Landscape mode.  I would like to change it to Portrait by default.  However there are no options for screen orientation under Settings->Display, nor any settings that I have found. 

 

I did track down the following line in the "init.rc" file:

# Define fsl display init mode
    setprop ro.FSL_LANDSCAPE_MODE 1

 

Changing this to a '0' had no affect what so ever.

 

So, the question is, is there some global system screen orientation setting that I am simply missing?

 

If there is not, then I would presume there is a way of controlling this through the sensor interface.  However, this interface does not seem to be fleshed out at all with this port.  How does this get enabled?  I would also think the Android system will rely on some Linux driver.  What does it look for, ie. what is the descriptor name it will use?  And, is there an API definition I can use to implement this driver?

 

Many thanks for your help.

Outcomes