全志A20平台实现VGA和HDMI双屏同显

http://blog.csdn.net/wlwl0071986/article/details/50052759

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
}

全志R16平台 parrotv1.1(Android4.4.2) /* * Store information about the video data format. */ static struct sensor_format_struct { __u8 *desc; //__u32 pixelformat; enum v4l2_mbus_pixelcode mbus_code;//linux-3.0 struct regval_list *regs; int regs_size; int bpp; /* Bytes per pixel */ } sensor_formats[] = { //{ // .desc = "YUYV 4:2:2", // .mbus_code = V4L2_MBUS_FMT_YUYV8_2X8,//linux-3.0 // .regs = sensor_fmt_yuv422_yuyv, // .regs_size = ARRAY_SIZE(sensor_fmt_yuv422_yuyv), // .bpp = 2, //}, //{ // .desc = "YVYU 4:2:2", // .mbus_code = V4L2_MBUS_FMT_YVYU8_2X8,//linux-3.0 // .regs = sensor_fmt_yuv422_yvyu, // .regs_size = ARRAY_SIZE(sensor_fmt_yuv422_yvyu), // .bpp = 2, //}, { .desc = "UYVY 4:2:2", .mbus_code = V4L2_MBUS_FMT_UYVY8_2X8,//linux-3.0 .regs = sensor_fmt_yuv422_uyvy, .regs_size = ARRAY_SIZE(sensor_fmt_yuv422_uyvy), .bpp = 2, }, //{ // .desc = "VYUY 4:2:2", // .mbus_code = V4L2_MBUS_FMT_VYUY8_2X8,//linux-3.0 // .regs = sensor_fmt_yuv422_vyuy, // .regs_size = ARRAY_SIZE(sensor_fmt_yuv422_vyuy), // .bpp = 2, //}, //{ // .desc = "Raw RGB Bayer", // .mbus_code = V4L2_MBUS_FMT_SBGGR8_1X8,//linux-3.0 // .regs = sensor_fmt_raw, // .regs_size = ARRAY_SIZE(sensor_fmt_raw), // .bpp = 1 //}, }; #define N_FMTS ARRAY_SIZE(sensor_formats) /* * Then there is the issue of window sizes. Try to capture the info here. */ static struct sensor_win_size sensor_win_sizes[] = { // /* UXGA */ // { // .width = UXGA_WIDTH, // .height = UXGA_HEIGHT, // .hoffset = 0, // .voffset = 0, // .regs = sensor_uxga_regs, // .regs_size = ARRAY_SIZE(sensor_uxga_regs), // .set_size = NULL, // }, //// /* 720p */ //// { //// .width = HD720_WIDTH, //// .height = HD720_HEIGHT, //// .hoffset = 0, //// .voffset = 0, //// .regs = Gc2015_sensor_hd720_regs, //// .regs_size = ARRAY_SIZE(Gc2015_sensor_hd720_regs), //// .set_size = NULL, //// }, // /* SVGA */ // { // .width = SVGA_WIDTH, // .height = SVGA_HEIGHT, // .hoffset = 0, // .voffset = 0, // .regs = sensor_svga_regs, // .regs_size = ARRAY_SIZE(sensor_svga_regs), // .set_size = NULL, // }, // /* VGA */ // { // .width = VGA_WIDTH, // .height = VGA_HEIGHT, // .hoffset = 0, // .voffset = 0, // .regs = sensor_vga_regs, // .regs_size = ARRAY_SIZE(sensor_vga_regs), // .set_size = NULL, // }, /* VGA */ { .width = VGA_WIDTH, .height = VGA_HEIGHT, .hoffset = 0, .voffset = 0, .regs = sensor_default_regs, .regs_size = ARRAY_SIZE(sensor_default_regs), .set_size = NULL, }, };
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值