今天小7又有CM11啦~

耗费了我几天修bug..小7(S7568)的cm11也编译好了,讲真感觉spreadturm还不错,很多东西都开源
这么想来,家里的中档手机(垃圾中的战斗机),基本都上Android 4.4了,还能多战斗几年
大部分功能都能正常使用,除了录像还有bug..
下载地址和笔记记录在下边~

下载地址 CM11
笔记记录:

  1. WIFI调试之方法:在adb中以root权限执行wpa_supplicant,观察出错状况,wpa_supplicant的命令参数来自init.sp8810.rc(具体文件具体分析,此处以kyletdcmcc为例子),这次记录了,避免下次又不知道咋整了。。

这次是删掉一部分参数就能工作了,对了,还可通过wpa_cli,测试能否扫描wifi

  1. 这次的wifi bug出现在android socket部分,提示unable to create。。错误信息诸如此类:mkdir[ctrl_interface=@android:wpa_wlan0]: Read-only file system,反正跟@android:wpa_wlan0有关,一看便知极大可能性是selinux的问题,果不其然,wifi bug终于被我攻克了哈哈哈哈哈哈哈。。。

更新:发现wifi跟个permission文件有关,暂不清楚其原因:wifi.direct,删去在permissive下wifi才能正常工作

  1. 录像卡住问题尚未解决,camera source获取视频流超时,不知道用啥方法好了..
  2. 相机是永远的痛,使用开源驱动hwcomposer和gralloc手机比较流畅,稳定,但是相机不能正常工作。会出现两种情况:一是相机绿屏,即相机采用的CbCr_420sp编码,但是系统以CrCb_420sp来解码导致绿屏?二是相机黑屏,即gralloc.sc8810,hwcomposer.sc8810,libcamera.sc8810,都配置成CbCr_420sp编码,但是最后EGL合成图像就出问题了。。提示GLconsumer cannot create image !相机这部分目前只能放弃了,能力不足以让我修好它,我都投入好多天了,浪费了我宝贵的暑假时间唉。。。暂且做个记录,以后懂点了再修也不迟,嗯。
  3. Media Decoder用下面的patch

错误信息大概这样:

E/SprdCameraHardware( 1549): Non-metadata buffer mode is not supported!
E/OMXCodec( 1549): [OMX.google.h264.encoder] color format 2130706434 is not supported
F/OMXCodec( 1549): frameworks/av/media/libstagefright/OMXCodec.cpp:1297 CHECK_EQ( (status_t)OK,findTargetColorFormat(meta, &colorFormat)) failed: 0 vs. -2147483648
F/libc    ( 1549): Fatal signal 6 (SIGABRT) at 0x0000060d (code=-6), thread 1566 (Binder_1)
E/audio_hw_primary( 1549): Error, vbc_ctrl_thread_routine read head failed(c), need to read again
E/AudioService(  446): Media server died.

Patch大概是下面的地址这里,防止以后没有就贴份在这儿

diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 607b7b0..8dd8541 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -93,8 +93,10 @@
 #include "include/ExtendedUtils.h"
 
 #ifdef USE_SAMSUNG_COLORFORMAT
+#ifndef SPRD_HARDWARE
 #include <sec_format.h>
 #endif
+#endif
 
 #include "include/avc_utils.h"
 
@@ -1053,6 +1055,10 @@ void ACodec::setNativeWindowColorFormat(OMX_COLOR_FORMATTYPE &eNativeColorFormat
     if (!strcasecmp(mComponentName.c_str(), "OMX.SEC.AVC.Decoder")
         || !strcasecmp(mComponentName.c_str(), "OMX.SEC.FP.AVC.Decoder")
         || !strcasecmp(mComponentName.c_str(), "OMX.SEC.MPEG4.Decoder")
 6.        || !strcasecmp(mComponentName.c_str(), "OMX.sprd.mpeg4.decoder")
 7.        || !strcasecmp(mComponentName.c_str(), "OMX.sprd.h263.decoder")
 8.        || !strcasecmp(mComponentName.c_str(), "OMX.sprd.h264.decoder")
 9.        || !strcasecmp(mComponentName.c_str(), "OMX.sprd.vpx.decoder")
         || !strcasecmp(mComponentName.c_str(), "OMX.Exynos.AVC.Decoder")) {
         switch (eNativeColorFormat) {
             case OMX_COLOR_FormatYUV420SemiPlanar:
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 006ef5e..07d2c23 100644
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -108,7 +108,7 @@ static int32_t getColorFormat(const char* colorFormat) {
     }
 
     if (!strcmp(colorFormat, CameraParameters::PIXEL_FORMAT_YUV420SP)) {
-#ifdef USE_SAMSUNG_COLORFORMAT
+#if defined(USE_SAMSUNG_COLORFORMAT) && !defined(SPRD_HARDWARE)
         static const int OMX_SEC_COLOR_FormatNV12LPhysicalAddress = 0x7F000002;
         return OMX_SEC_COLOR_FormatNV12LPhysicalAddress;
 #else
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 3706e9b..a10fc25 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -116,8 +116,10 @@
 #endif
 
 #ifdef USE_SAMSUNG_COLORFORMAT
+#ifndef SPRD_HARDWARE
 #include <sec_format.h>
 #endif
+#endif
 
 #ifdef USE_S3D_SUPPORT
 #include "Exynos_OMX_Def.h"
@@ -416,6 +418,11 @@ uint32_t OMXCodec::getComponentQuirks(
     if (info->hasQuirk("requires-global-flush")) {
         quirks |= kRequiresGlobalFlush;
     }
+#ifdef SPRD_HARDWARE
 10.    if (info->hasQuirk("needs-flush-before-disable")) {
 11.        quirks |= kNeedsFlushBeforeDisable;
 12.    }
+#endif
 
 #ifdef ENABLE_AV_ENHANCEMENTS
     quirks |= ExtendedCodec::getComponentQuirks(info);
@@ -2509,9 +2516,11 @@ void OMXCodec::setNativeWindowColorFormat(OMX_COLOR_FORMATTYPE &eNativeColorForm
     // Convert OpenMAX color format to native color format
     switch (eNativeColorFormat) {
         // In case of SAMSUNG color format
+#ifndef SPRD_HARDWARE
         case OMX_SEC_COLOR_FormatNV12TPhysicalAddress:
             eNativeColorFormat = (OMX_COLOR_FORMATTYPE)HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP_TILED;
             break;
+#endif
         case OMX_SEC_COLOR_FormatNV12Tiled:
             eNativeColorFormat = (OMX_COLOR_FORMATTYPE)HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED;
break;

标签: none

添加新评论