iMx51 EVK Android Screen Orientation

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

iMx51 EVK Android Screen Orientation

1,537 次查看
Davros
Contributor III

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.

标记 (1)
0 项奖励
回复
1 回复

1,203 次查看
Davros
Contributor III

This has been resolved.  By adding the following line to the init.rc file, just after the indicated lines above, as seen below:

# Define fsl display init mode
     setprop ro.FSL_LANDSCAPE_MODE 1
     setprop ro.sf.hwrotation 90

This will result in the desired effect.

0 项奖励
回复