1)sys_config.fex中配置如下:
配置VGA 1024x768输出
disp_init_enable = 1
disp_mode = 0
screen0_output_type = 4
screen0_output_mode = 4
screen1_output_type = 1
screen1_output_mode = 4
2)请把sys_config.fex中的fb0_scaler_mode_enable = 1改为fb0_scaler_mode_enable = 0;
3)android/system/core/init/init.c console_init_action 函数注释掉这一行 //init_initdisplay();
4)android\frameworks\base\services\java\com\android\server \system\SystemServer.java
中对热插拔检测和输出模式的控制全部屏蔽掉
5)android\frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\policy\DisplayController.java
中控制显示输出的策略模式由mDispHotPolicy = new HomletHotPlug()改成mDispHotPolicy = new StatusBarPadHotPlug()
6)设置中切换HDMI
android/device/softwinner/common/packages/TvdSettings/src/com/android/settings/DisplaySettings.java
switchDispMode函数
- if (displayManager.getDisplayOutputType(0) != item.mOutputType
- || displayManager.getDisplayOutputFormat(0) != item.mFormat) {
+ if (displayManager.getDisplayOutputType(1) != item.mOutputType
+ || displayManager.getDisplayOutputFormat(1) != item.mFormat) {
// displayManager.setDisplayOutputType(0, item.mOutputType,
// item.mFormat);
- displayManager.setDisplayParameter(0, item.mOutputType,
+ displayManager.setDisplayParameter(1, item.mOutputType,
item.mFormat);
+ //displayManager
+ // .setDisplayMode(DisplayManagerAw.DISPLAY_MODE_SINGLE_FB_GPU);
displayManager
- .setDisplayMode(DisplayManagerAw.DISPLAY_MODE_SINGLE_FB_GPU);
+ .setDisplayMode(DisplayManagerAw.DISPLAY_MODE_DUALSAME);
// 设置音频输出模式
设置中的切边
--- a/packages/TvdSettings/src/com/android/settings/DisplayTrimmingPreference.java
+++ b/packages/TvdSettings/src/com/android/settings/DisplayTrimmingPreference.java
@@ -112,7 +112,7 @@ public class DisplayTrimmingPreference extends SeekBarDialogPreference implement
return ret;
}
private void setDisplayPercent(int value) {
- mDisplayManagerAw.setDisplayAreaPercent(0,value);
+ mDisplayManagerAw.setDisplayAreaPercent(1,value);^M
}
设置中的饱和度
--- a/packages/TvdSettings/src/com/android/settings/SaturationPreference.java
+++ b/packages/TvdSettings/src/com/android/settings/SaturationPreference.java
@@ -85,7 +85,7 @@ public class SaturationPreference extends SeekBarDialogPreference implements
Settings.System.COLOR_SATURATION, value);
}
private void setSaturation(int saturation) {
- mDisplayManagerAw.setDisplaySaturation(0,saturation);
+ mDisplayManagerAw.setDisplaySaturation(1,saturation);^M
}
设置中的亮度
--- a/packages/TvdSettings/src/com/android/settings/TVBrightnessPreference.java
+++ b/packages/TvdSettings/src/com/android/settings/TVBrightnessPreference.java
@@ -152,7 +152,7 @@ public class TVBrightnessPreference extends SeekBarDialogPreference implements
DisplayManagerAw dm = (DisplayManagerAw) getContext().getSystemService(Context.DISPLAY_SERVICE_AW);
if (dm != null) {
- dm.setDisplayBright(0,brightness);
+ dm.setDisplayBright(1,brightness);
}
}
设置中的对比度
--- a/packages/TvdSettings/src/com/android/settings/ContrastPreference.java
+++ b/packages/TvdSettings/src/com/android/settings/ContrastPreference.java
@@ -90,7 +90,7 @@ public class ContrastPreference extends SeekBarDialogPreference implements
Settings.System.COLOR_CONTRAST,value);
}
private void setContrast(int Contrasrt) {
- mDisplayManagerAw.setDisplayContrast(0,Contrasrt);
+ mDisplayManagerAw.setDisplayContrast(1,Contrasrt);^M
}