iMx51 EVK Android Screen Orientation

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

iMx51 EVK Android Screen Orientation

1,530件の閲覧回数
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,196件の閲覧回数
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 件の賞賛
返信