Welcome to Our Website!

If you happen across this page... well it is really like all the others on my site... notes to myself. How-some-ever, feel free to look -and use- anything you find. Hopefully, IF anything is restricted, cause it is owned by somebody else, I will have marked them. You might just double check. And IF you are one of those people that claim ownership and I have not placed proper recognition there, please e-mail me and we will take care of it.

This is a revision of one that I previously started that was a conglamoration. Not that this one is really gona be much better -but- hopefully it will at least look better. The date above is the date of the original.

Snapdragon S3 - Snapdragon SoC
Model Number Semi- conductor technology CPU Instruction Set CPU CPU Cache GPU Memory Technology Wireless Radio Technologies Sampling Availability Utilizing Devices
MSM8660 45 nm ARMv7 Up to 1.7 GHz dual-core Scorpion L2: 512 KB Adreno 220 Single-channel 500 MHz ISM/333 MHz LPDDR2 GSM (GPRS, EDGE), W-CDMA/UMTS (HSDPA, HSUPA, HSPA+), MBMS,
CDMA2000 (1xAdv, 1xEV-DO Rel.0/Rev.A/Rev.B, 1xEV-DO MC Rev.A)
Q3 2010 HTC Evo 3D (CDMA),
HTC_ReZound,
LG Connect 4G, Pantech Vega Racer,
Pantech Sky LTE EX,
Pantech Burst, LG Lucid, Samsung Galaxy Note, Xiaomi MI-One (CDMA2000 for China Telecom)

The section in Red is the only real difference between the MSM8660 and the MSM8260. Now why do we care?? Because a Youngin' named 'Sultan' got all this stuff working on the Sensation also known as the Pyramid. Will use that for a reference.
Oh the things we can find:  CM for HTC MSM8660 devices
There is also a phone called the  HTC Holiday   which uses the MSM8660 that has also been fixed. Why has ours been ignored??? Who knows? Anywho, we have purchased a new PC that is faster -and- with the newest info that we have found ... we're gona fix it ourselves. Yep ... we will probably do a LOT ... of copying.


     S4 Specs   The S4 Plus has MSM8660A.
     Android Camera   -  Camera HAL Overview   -  Android Platform Developer's Guide    Internals  
 Kernels  

 Kernel & Camera  

  Camera used in the ReZound

  • RezCamera:
    • Rear: 8 Megapixel lens
      • F2.2 Aperture
      • Autofocus
      • Dual LED flash
      • 1080p recording
      • Samsung S5K3H2YX
        In Samsung Galaxy S II it is: SLSI_S5K3H2YX_M5MOLS with firmware marked as SCEF02.
        Image Signal Processor (ISP) - WikiPedia
        Inter-Integrated Circuit (I2C) - Tutorial - Phillips - WikiPedia
    • Front: 2 Megapixel VGA
      • Aptina MT9D015

  Android Camera    Saving Media      Media Recorder    Capturing Video  
 XDA Devs Only      Chad Android Help  
Neo created a permanent and centralized github account organization that will house any and all future changes to AOSP development for the HTC Rezound (vigor). Should you choose to build an AOSP project in the future, you may do so from the following account:  https://github.com/vigor  

   

  Camera Digging

I have searched the Net for all the information that I could find, and some that I didn't know existed, concerning the operation of this Android System. Particularly the Camera and the Camcorder. I worked extensively on getting Eclipse installed -and- working. All I can say is that I got it installed... working?? ... maybe. In the last of my efforts I found a response from the AOSP group that flat out stated "Can not build Android System in Eclipse." Applications, 'Yes' but NOT the system.

 March 26th, 2015 / 8:27pm  Well, a couple of days ago. I got what I believe is a working Android Studio. When it started up I did NOT get all those "Un-Resoved types and values" that I was getting in Eclipse. I still don't know what in the heck I am doing but things are somewhat looking up

   

  New Investigation with Android Studio

All the other stuff in all my files concerning this Smarphone and the parts below this point in the file -- culminate here. Got Android Studio working and got some newer ideas. I just figured out a way to get CyanogenMod setup to a condition before any of our "cherrypics". Then I can do what I should have done in the first place... compare the files. The files changed were/are:

  1. ./frameworks/av/camera/CameraParameters.cpp
  2. ./frameworks/av/camera/Android.mk
  3. ./frameworks/av/services/camera/libcameraservice/CameraService.cpp
  4. ./frameworks/av/services/camera/libcameraservice/device1/CameraHardwareInterface.h
  5. ./frameworks/av/services/camera/libcameraservice/Android.mk
  6. ./frameworks/av/media/libstagefright/Android.mk
  7. ./frameworks/av/media/libstagefright/CameraSource.cpp
  8. ./frameworks/av/media/libstagefright/OMXCodec.cpp
  9. ./frameworks/av/include/camera/CameraParameters.h
How this info was obtained was... when you get "your own copy" of the code, all the files have the current date and time slapped on them. You either wait, or just the time it takes to perform the cherrypics and then the date/time check will show the differences in time. The linux/dolphin command used was:
      find . -cmin -660
which says 'find all the files changed within the last 11 hours'. The total number are listed in the section  What was Changed . The ones listed above are the only ones pertinent at this time.

 CameraParameters.cpp  

 Android.mk  

 CameraService.cpp  

 CameraHardwareInterface.h     // This usage flag indicates to gralloc we want the
  // buffers to come from system heap
 CameraHall  

#ifdef HTC_3D_SUPPORT
        usage |= GRALLOC_USAGE_PRIVATE_0;
#endif
From gralloc.h
/* implementation-specific private usage flags */
GRALLOC_USAGE_PRIVATE_0         = 0x10000000,

 Android.mk  

 Android.mk  

 CameraSource.cpp  

 OMXCodec.cpp  Think we have to many!! In our "cherrypics", one of which "fixes" the Camera so it will compile in. I have been told it is a 'revert'. In other words something that was removed -and- now put back in. Now then, IF you look at the file before and after, 3 of the items are already there. So, since this code is using an 'OR' operation, the first encounter would set it to one and the second would put it back to zero. So, I removed the three last ones.
    kRequiresLargerEncoderOutputBuffer
    kNeedsFlushBeforeDisable
    kRequiresFlushCompleteEmulation
    kSupportsMultipleFramesPerInputBuffer
Not only that, the only two places that these values show up, and I've searched the whole code base, are in OMXCodec.cpp and OMXCodec.h   Gona have to use those function names to find how they are used I guess.

377a378,393
>                 index, "requires-larger-encoder-output-buffer")) {
>         quirks |= kRequiresLargerEncoderOutputBuffer;
>     }
>     if (list->codecHasQuirk(
>                 index, "needs-flush-before-disable")) {
>         quirks |= kNeedsFlushBeforeDisable;
>     }
>     if (list->codecHasQuirk(
>                 index, "requires-flush-complete-emulation")) {
>         quirks |= kRequiresFlushCompleteEmulation;
>     }
>     if (list->codecHasQuirk(
>                 index, "supports-multiple-frames-per-input-buffer")) {
>         quirks |= kSupportsMultipleFramesPerInputBuffer;
>     }
>     if (list->codecHasQuirk(
The following "Conditionally Included" code would also cause duplicates. So's I removed it also!!
#ifdef DOLBY_UDC
    if (list->codecHasQuirk(
                index, "needs-flush-before-disable")) {
        quirks |= kNeedsFlushBeforeDisable;
    }
    if (list->codecHasQuirk(
                index, "requires-flush-complete-emulation")) {
        quirks |= kRequiresFlushCompleteEmulation;
    }
#endif // DOLBY_UDC
And we have here a definition of the Quirks. In: ../frameworks/av/include/media/stagefright/OMXCodec.h Along with some function declarations that look interesting. There are more -but- I don't want the whole page in here!!
    enum Quirks {
        kNeedsFlushBeforeDisable              = 1,
        kWantsNALFragments                    = 2,
        kRequiresLoadedToIdleAfterAllocation  = 4,
        kRequiresAllocateBufferOnInputPorts   = 8,
        kRequiresFlushCompleteEmulation       = 16,
        kRequiresAllocateBufferOnOutputPorts  = 32,
        kRequiresFlushBeforeShutdown          = 64,
        kDefersOutputBufferAllocation         = 128,
        kDecoderLiesAboutNumberOfChannels     = 256,
        kInputBufferSizesAreBogus             = 512,
        kSupportsMultipleFramesPerInputBuffer = 1024,
        kRequiresLargerEncoderOutputBuffer    = 2048,
        kOutputBuffersAreUnreadable           = 4096,
#if defined(OMAP_ENHANCEMENT)
        kAvoidMemcopyInputRecordingFrames     = 0x20000000,
#endif
        kRequiresGlobalFlush                  = 0x20000000, // 2^29
#ifdef QCOM_HARDWARE
        kRequiresWMAProComponent              = 0x40000000, //2^30
#endif
    };

    struct p38lit
	 {
        String8 mName;
        uint32_t mQuirks;
    };

    // for use by ACodec
    static void findMatchingCodecs(
            const char *mime,
            bool createEncoder, const char *matchComponentName,
            uint32_t flags,
            Vector *matchingCodecNamesAndQuirks);

    static uint32_t getComponentQuirks(
            const MediaCodecList *list, size_t index);

    static bool findCodecQuirks(const char *componentName, uint32_t *quirks);
Now the code name "CodecNameAndQuirks" is used in 4 files. The two OMXCodec files and
    ../frameworks/av/media/libstagefright/ACodec.cpp and
    ../hardware/qcom/media-caf/dashplayer/DashCodec.cpp.
Need to find out what those two do.

 MediaCodec  

 CameraParameters.h  

Switching to Video Mode
To quickly switch from still to video recording mode, use these
steps:
• Open a Camera and startPreview as for still mode
• Call unlock() to allow the media process to access the
camera.
• Pass the camera to MediaRecorder.setCamera(Camera).
• Follow MediaRecorder instructions on recording
• When finished recording, call reconnect() to re-acquire and
re-lock the camera.
• If desired, restart preview and take more photos or videos.
• Call stopPreview() and release()

Refer:  Android Camera Stack  

   

  Code Aurora

Branch Releases - CodeAurora

Releases are available for download using Repo and Git. A specific release is downloaded by choosing both a branch and manifest from the Releases table.

$ repo init -u git://codeaurora.org/platform/manifest.git -b [branch] -m [manifest] --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable
$ repo sync

Note: Use the below commands for syncing the code for all the releases from August 8th, 2012 onwards.

$ repo init -u git://codeaurora.org/platform/manifest.git -b release -m [manifest] --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable
$ repo sync

Since the ReZound uses the msm8660, these are the ones we are interested in. No I don't know what I am doing -but- I'm going to learn. The Camcorder will only work for three times and then you have to reset it to get another 3. And we want to change it from PMEM to ION... which is CAF as far as I can tell. Probably don't have enough information yet... but we'll get there.

Releases
Branch  Targets
release   msm7627a, msm7630, msm8660, msm8660_csfb, msm8960, apq8064, mpq8064, msm8930, msm8625, msm8974, apq8084
jb   msm7627a, msm7630, msm8660, msm8660_csfb, msm8960, apq8064, mpq8064, msm8930, msm8625
jb_rel   apq8064
ics   msm7627a, msm7630, msm8660, msm8660_csfb, msm8960, apq8064, mpq8064, msm8930

Our msm8660 initially kicked butt. April 2, 2011
  CyanogenMod Camera Dec 4, 2013

 November 09, 2012   M8260AAABQNLZA313065 - msm8660 - M8260AAABQNLZA313065.xml

The Android ION memory allocator     Hmmmm... this was introduced in December of 2011. Same time the ReZound was released. Why was it not included in/on our phone?? To new - timing to close. Yep. The ReZound was in November!!
 Linaro ION    ION Buffer Sharing    Learning ION    Learning PMEM  
 Looks like start of Rez on XDA  

   

  Camera Architecture

This, as it should be intuitively obvious, are the notes that I gathered concerning the Architecture of the Camera operations. The path thru Android should be relatively the same for all. Yes there will be differences cause of different Hardware -but- should be able to learn from each.

  Android Camera Architecture Presentation Transcript

  • Android Camera Architecture Author: Picker
  • Architecture
  •  
  • Architecture Path of the Source Code:
    frameworks/base/core/java/android/hardware/
    frameworks/base/core/jni/
    frameworks/base/libs/camera/
    frameworks/base/services/camera/libcameraservice/
    vendor/nvidia/tegra/hal/libnvomxcamera/

   

  Random Notes

These are just, for lack of a better term, Random Notes.

Don't remember why I took note of the 3, but they are here. /home/ctaylor/Android/cm11.0-rezound/kernel/htc/vigor-3.0/arch/arm/kernel/atags.c
/home/ctaylor/Android/cm11.0-rezound/kernel/htc/vigor-3.0/arch/arm/kernel/atags.h
/home/ctaylor/Android/cm11.0-rezound/kernel/htc/vigor-3.0/arch/arm/boot/compressed/atags_to_fdt.c

http://review.cyanogenmod.org/#/c/53595
http://review.cyanogenmod.org/#/c/55132

Phone Devs
Android Camera Architecture Analysis
The Snapdragon 3 SoC features a dual-core 1.5 GHz Scorpion CPU and an Adreno 220 GPU.
git clone https://github.com/sultanxda/sultan-kernel-pyramid-pure.git -b cm-11.0
git clone https://github.com/sultanxda/android_device_htc_pyramid.git -b cm-11.0
http://forum.xda-developers.com/showthread.php?t=2530073
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Frunning_eclipse.htm

 May 9th, 2014/8:54pm   XDA Developers - Android Camera Architecture
Android Camera Architecture Analysis
HTC Details Updates - Android Development - Tutorial
SMS from Gmail
- Android/Linux
Linux Kernel Prog Guide - All drivers are modules. Not all modules are drivers.

  BOARD_USES_PMEM_ADSP and TARGET_USES_ION -- media legacy and display legacy

   

  Maintainers

Maintainers
CAFE CMOS INTEGRATED CAMERA CONTROLLER DRIVER
M:	Jonathan Corbet 
L:	linux-media@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
S:	Maintained
F:	Documentation/video4linux/cafe_ccic
F:	drivers/media/video/cafe_ccic*

MOTION EYE VAIO PICTUREBOOK CAMERA DRIVER
W:	http://popies.net/meye/
S:	Orphan
F:	Documentation/video4linux/meye.txt
F:	drivers/media/video/meye.*
F:	include/linux/meye.h

SOC-CAMERA V4L2 SUBSYSTEM
M:	Guennadi Liakhovetski 
L:	linux-media@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
S:	Maintained
F:	include/media/v4l2*
F:	drivers/media/video/v4l2*

   

  HTC Sensation/Pyramid Info

This was taken from: HTC Sensation/Pyramid over on XDA. We should be able to do the same thing for our ReZound. This is for reference. Sultan used SebastianFM's, and now I'm using Sultan's... maybe.
Kernel features and details:
This is a 3.0.16 kernel based off of SebastianFM's 3.0.16 Overclocked kernel (which is very close to HTC's stock ICS kernel) with these features:
  • Full Ion
  • Self-powered USB OTG
  • More accurate battery percentage readings
  • Increased maximum charging current by ~300mA (up to 1250mA charging current), for 10% to 30% faster charging
  • Sweep2Wake
  • AC charge speed over USB (fastcharge)
  • 620MB of usable RAM
  • Ion camera drivers backported from SebastianFM's 3.4 kernel
  • Ion audio drivers backported from SebastianFM's 3.4 kernel
  • Latest CAF KitKat Ion drivers
  • Latest CAF KitKat GPU drivers (KGSL)
  • Latest CAF KitKat framebuffer drivers
  • Latest CAF KitKat video controller (vidc) drivers
  • CAF jb_chocolate power-management (PM) architecture
  • CAF jb_chocolate USB drivers
  • Newer WiFi drivers from Google's Nexus 7 2012 KitKat kernel
  • Newer wireless stack from Google's Nexus 7 2012 KitKat kernel
  • Newer Android drivers (such as lowmemorykiller) from Google's Nexus 7 2012 KitKat kernel
  • Display undervolting
  • Kernel-based mpdecision by mrg666
  • Kernel-based thermald
  • Basic display color control (choose between regular and cooler colors)
  • Lots of debugging garbage removed
  • No kernel modules (greater security)
  • SELinux
  • CPU overclockable up to 1.944GHz
  • GPU overclockable up to 320MHz

 Using Eclipse to build Android 

 May 25th, 2014/8:01am   android_device_samsung_msm8960-common/BoardConfigCommon.mk
it uses ION and i didnt even think of it
only when using 3.0 based kernel though apparently
Vigor.c needs a little cleanup
Board-vigor.c*

   

  Conversations of interest to me... from the Forums:

 May 26th, 2014/8:00am  
 Reven Tech  
git clone dude
alot less headache
 Reven Tech  
make a blank folder
cd to said folder
type git init
then type git clone git@github.com:AOKP/frameworks_av.git
 Lawrence Young  
Well, I'm going through the stuff right now, just checking to see if they have the
legacy camera stuff in there, and it looks like they do.
 Reven Tech  
takes a quarter of the time
youll need to do it this way
then after its done... cd to that frameworks av folder
then type git remote add github git@github.com:vigor/android_frameworks_av.git
then git pull github cm-11.0
if it gives conflicts ill talk with how to fix this
this will save you over an hour dude

 July 7th, 2014/7:29am  
 el Filou  
shooter/shooteru are the codenames of the HTC EVO 3D. shooter has an MSM8660
like the ReZound (shooteru has an MSM8260 - GSM only), however as the cameras
are different I don't think the source for those devices could be of any help
for the problems with the ReZound's cameras. Could they?
 bunchies  
I don't think its a device issues, we can compare msm8660 files and there shouldn't
be much of a difference in the camerawrapper, comparing vigor and shooter files is useless though

Than you can go into our kernel, and find sensation and evo 3D files there.
I've already gone through these files and found that the sensation and evo 3D use
the same driver for the camera but vigor uses a different driver

ive had Logs that show the camera driver isn't being "probed" completely,
the issue may be in the camera drivers itself

I can provide more info if needed, I'm currently not going to be working
on camera issues. I may in the future though
 Chucktr  
Please read this --- and then read it again. I am trying to present info and
obtain info on this problem. Some of this you may have heard before ... and some not.
IF this is all "old hat" ... please let me know. So far all we have done is talk around
the problem. I would like to get serious on it and get it fixed ... IF we can.

As I said to the last guy... 'ANY' info would be appreciated. The Camera -and- the Camcorder
"work" -but- the Camcorder is only good for 3 videos and then it quits saving the pics until
it is rebooted and then you get another 3.... etc. I understand there is a mixture of PMEM and ION
in this "Hybrid" version. Can't believe that it is a simple counter. It saves three... then quits.
When rebooted it will save another 3 -and- NOT overwrite the previous ones. It is NOT storing the
vids on the SDcard but in Internal Memory. There is a difference in the operation of the "Default"
camera and the "Google" Camera. The Default Camera will scramble the video IF it is started in
Portrait mode. The Google Camera WON'T... it is clear and viewable. The Default Camera will start
and immediately stop on the 4th and further tries. The Google Camera "appears" to be still recording
but it is not. I was hoping these findings would help one of you more knowledgeable Techs in solving
this problem. Everyone keeps saying that it is in the Camera Wrapper -but- I just can't see it.
I talked to Sultan and he said something about it being in the vidc section ... which is in the kernel.
I haven't done anything with the kernel ... yet... but any input and/or directions as to an area to
check into or investigate would be appreciated.

I got the impression that the drivers were written by HTC and that we can't get them. Is that true??
Is that what our stumbling block is??
 bunchies  
The kernel was written by HTC and you can always pull source from them. the source will be written for ICS though
and our kernel is mostly based on other kernels lol still by HTC though

Sultan is a smart kid, i could peek around his pyrimid kernel in vidc but anyone that does this should
be carful since he uses CAF directorys with the main drivers should be these, keep in mind that the files
call all over the kernel but im sure you know that:
drivers/media/video/msm/
drivers/video/msm/vidc/

we use ov8830 for camera driver, i dont belive the issue is in camerwrapper but i could be wrong
 Chucktr  
This was from me and I just asked for some clarification on some of the above... plus stating why I didn't
know anything.
   
   
   
   
   
.

   

  Eclipse Section

 Info from StackOverflow   StackOverflow Info
Project and Classpath files missing

.project
When a project is created in the workspace, a project description file is automatically generated that describes the project. The sole purpose of this file is to make the project self-describing, so that a project that is zipped up or released to a server can be correctly recreated in another workspace.
Basically, .project files store project-settings, such as builder and project nature settings.

The .project file is maintained by the core Eclipse platform, and its goal is to describe the project from a generic, plugin-independent Eclipse view. What's the project's name? what other projects in the workspace does it refer to? What are the builders that are used in order to build the project? (remember, the concept of "build" doesn't pertain specifically to Java projects, but also to other types of projects)

.classpath
classpath specifies which Java source files and resource files in a project are considered by the Java builder and specifies how to find types outside of the project. The Java builder compiles the Java source files into the output folder and also copies the resources into it.
for more please refer this.
.classpath files define the classpath to use during running. The classpath files contains src and target entries that correspond with folders in the project; the con entries are used to describe some kind of "virtual" entries, such as the JVM libs or in case of eclipse plug-ins dependencies (normal Java project dependencies are displayed differently, using a special src entry).

The .classpath file is maintained by Eclipse's JDT feature (feature = set of plugins). JDT holds multiple such "meta" files in the project (see the .settings directory inside the project); the .classpath file is just one of them. Specifically, the .classpath file contains information that the JDT feature needs in order to properly compile the project: the project's source folders (that is, what to compile); the output folders (where to compile to); and classpath entries (such as other projects in the workspace, arbitrary JAR files on the file system, and so forth).


Using Eclipse
Eclipse Tutorial
LK Boot Loader
Errors Resolved

 Eclipse Info  

*** System properties:
applicationXMI=org.eclipse.ui.workbench/LegacyIDE.e4xmi
eclipse.application=org.eclipse.ui.ide.workbench
eclipse.buildId=v22.0.1-685705
eclipse.commands=-os
linux
os.version=3.7.10-1.28-desktop x86_64
=================
java.version=1.6.0_45
=================
*** Features:
com.android.ide.eclipse.adt (22.6.3.v201404151837-1123206) "Android Development Toolkit"
com.android.ide.eclipse.adt.package (22.0.1.v201305230001--685705) "ADT Package"
com.android.ide.eclipse.ddms (22.6.3.v201404151837-1123206) "Dalvik Debug Monitor Service"
com.android.ide.eclipse.gldebugger (22.6.3.v201404151837-1123206) "Tracer for OpenGL ES"
com.android.ide.eclipse.hierarchyviewer (22.6.3.v201404151837-1123206) "Hierarchy Viewer"
com.android.ide.eclipse.ndk (22.6.3.v201404151837-1123206) "ADT CDT Integration"
com.android.ide.eclipse.traceview (22.6.3.v201404151837-1123206) "Traceview"
org.eclipse.cdt (8.1.2.201302132326) "Eclipse C/C++ Development Tools"
org.eclipse.cdt.gdb (7.0.0.201302132326) "GDB Common"
org.eclipse.egit (2.2.0.201212191850-r) "Git Team Provider"
org.eclipse.emf.common (2.8.0.v20130125-0546) "EMF Common"
org.eclipse.emf.ecore (2.8.3.v20130125-0546) "EMF Ecore"
org.eclipse.help (1.4.1.v20120912-144938-8R7xFOXFLWUl7PpNBh_HIGkb4) "Help System Base"
org.eclipse.jdt (3.8.2.v20130116-090414-8-8nFu3FNOfwKLRuqgXKIy9z0I83) "Eclipse Java Development Tools"
org.eclipse.jgit (2.2.0.201212191850-r) "JGit Core"
org.eclipse.platform (4.2.1.v20130118-173121-9MF7GHYdG0B5kx4E_SkfZV-1mNjVATf67ZAb7) "Eclipse Platform"
org.eclipse.rcp (4.2.2.v20130129-152330-7IARAABrMQkGSvMgQnUlz-DQz00h) "Eclipse RCP"
org.eclipse.wst.xml_ui.feature (3.4.2.v201211061806-7H7GFeJDxumUrsn5qkiQgOEhsz0p60HAmPyU6VX) "Eclipse XML Editors and Tools"
===============

   

  What was changed to get the Camera to compile

According to the "cherrypick" info, 9 files were changed... just to get the thing to compile. So this is where we can start looking. The breakdown inside the 'Kitchen' has a frameworks but does not have the av. So we move to the source files.

ctaylor@dusty-tr2:~/Android/cm11.0-rezound
> find . -cmin -660
./frameworks/av/.git
./frameworks/av/.git/HEAD
./frameworks/av/.git/COMMIT_EDITMSG
./frameworks/av/.git/FETCH_HEAD
./frameworks/av/.git/MERGE_RR
./frameworks/av/.git/index
./frameworks/av/camera
./frameworks/av/camera/CameraParameters.cpp
./frameworks/av/camera/Android.mk
./frameworks/av/services/camera/libcameraservice
./frameworks/av/services/camera/libcameraservice/CameraService.cpp
./frameworks/av/services/camera/libcameraservice/device1
./frameworks/av/services/camera/libcameraservice/device1/CameraHardwareInterface.h
./frameworks/av/services/camera/libcameraservice/Android.mk
./frameworks/av/media/libstagefright
./frameworks/av/media/libstagefright/Android.mk
./frameworks/av/media/libstagefright/CameraSource.cpp
./frameworks/av/media/libstagefright/OMXCodec.cpp
./frameworks/av/include/camera
./frameworks/av/include/camera/CameraParameters.h
./.repo/projects/frameworks/av.git/logs/HEAD
./.repo/projects/vendor/cm.git/logs/HEAD
./.repo/project-objects/CyanogenMod/android_vendor_cm.git/objects
./.repo/project-objects/CyanogenMod/android_vendor_cm.git/objects/67
./.repo/project-objects/CyanogenMod/android_vendor_cm.git/objects/67/370a54a2621fa0b938d8a55992b2ae88a5f2d4
./.repo/project-objects/CyanogenMod/android_vendor_cm.git/objects/2c
./.repo/project-objects/CyanogenMod/android_vendor_cm.git/objects/2c/846bd97e773475929788bef1e3d917d13cf811
./.repo/project-objects/CyanogenMod/android_vendor_cm.git/objects/00
./.repo/project-objects/CyanogenMod/android_vendor_cm.git/objects/00/8e2f0796778442ad2ba6410e4380ddcb618f69
./.repo/project-objects/CyanogenMod/android_vendor_cm.git/objects/1b
./.repo/project-objects/CyanogenMod/android_vendor_cm.git/objects/1b/e30e51da49940cb7b664072bd3e3ce501326cf
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/55
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/55/4b37c430ad71844cf2f8cd6575e47c30fd658d
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/e4
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/e4/7e06c368ca3a314b1f40f79499fda0faa988b7
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/8d
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/8d/6c847f729f8d823f7c6de4b74e9c29b1173324
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/dd
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/dd/2a2212140117d3c8d93d8f8830b5899be69aa2
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/a2
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/a2/af5595cfb0d7a97e446cec2d8ccc8573cf9a1d
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/d4
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/d4/05b17d3c4f538eb1b5574985fdaa5cc102b4ab
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/be
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/be/76ba9c58ed6031539726eff4cbe4b3e06c23ba
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/69
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/69/079b858a1049559b6ef2fd8a6fbaea40670903
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/6c
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/6c/45f9c4a35d7e440e7f8636144ae66bb8d05df1
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/f4
./.repo/project-objects/CyanogenMod/android_frameworks_av.git/objects/f4/91f164dec9bec070e892805a18be1f61a05e3f
./vendor/cm/.git
./vendor/cm/.git/HEAD
./vendor/cm/.git/COMMIT_EDITMSG
./vendor/cm/.git/MERGE_RR
./vendor/cm/.git/index
./vendor/cm/prebuilt/common/bootanimation
./vendor/cm/prebuilt/common/bootanimation/540.zip
./vendor/cm/prebuilt/common/bootanimation/1080.zip
./vendor/cm/prebuilt/common/bootanimation/320.zip
./vendor/cm/prebuilt/common/bootanimation/360.zip
./vendor/cm/prebuilt/common/bootanimation/600.zip
./vendor/cm/prebuilt/common/bootanimation/240.zip
./vendor/cm/prebuilt/common/bootanimation/800.zip
./vendor/cm/prebuilt/common/bootanimation/480.zip
./vendor/cm/prebuilt/common/bootanimation/720.zip
./vendor/cm/prebuilt/common/bootanimation/1200.zip
./vendor/cm/prebuilt/common/bootanimation/768.zip
ctaylor@dusty-tr2:~/Android/cm11.0-rezound
> 

=============================

ctaylor@dusty-tr2:~
> diff cm-11.0/frameworks/av/camera/CameraParameters.cpp Android/cm11.0-rezound/frameworks/av/camera/CameraParameters.cpp 
43,68d42
< #ifdef QCOM_LEGACY_CAM_PARAMS
< //Values for Continuous AF
< const char CameraParameters::CAF_OFF[] = "caf-off";
< const char CameraParameters::CAF_ON[] = "caf-on";
< //Same, for CodeAurora-based blobs
< const char CameraParameters::CAPTURE_MODE_NORMAL[] = "normal";
< const char CameraParameters::CAPTURE_MODE_BURST[] = "burst";
< const char CameraParameters::CAPTURE_MODE_CONTI_BURST[] = "contiburst";
< const char CameraParameters::CAPTURE_MODE_HDR[] = "hdr";
< const char CameraParameters::CAPTURE_MODE_HJR[] = "hjr";
< const char CameraParameters::CAPTURE_MODE_PANORAMA[] = "panorama";
< const char CameraParameters::CONTINUOUS_AF_OFF[] = "caf-off";
< const char CameraParameters::CONTINUOUS_AF_ON[] = "caf-on";
< const char CameraParameters::KEY_CONTINUOUS_AF[] = "continuous-af";
< const char CameraParameters::KEY_CAF[] = "continuous-af";
< const char CameraParameters::KEY_CAPTURE_MODE[] = "capture-mode";
< const char CameraParameters::KEY_PICTURE_COUNT[] = "picture-count";
< const char CameraParameters::KEY_MAX_BURST_PICTURE_COUNT[] = "max-burst-picture-count";
< const char CameraParameters::KEY_SUPPORTED_CONTINUOUS_AF[] = "continuous-af-mode";
< const char CameraParameters::KEY_SUPPORTED_CAF[] = "continuous-af-values";
< const char CameraParameters::KEY_SUPPORTED_CAPTURE_MODES[] = "capture-mode-values";
< const char CameraParameters::KEY_TAKING_PICTURE_ZOOM[] = "taking-picture-zoom";
< const char CameraParameters::KEY_PANORAMA_MODE[] = "panorama-mode";
< const char CameraParameters::PANORAMA_MODE_NOT_INPROGRESS[] = "not-in-progress";
< const char CameraParameters::PANORAMA_MODE_INPROGRESS[] = "in-progress";
< #endif
73d46
< const char CameraParameters::KEY_SUPPORTED_3D_FILE_FORMAT[] = "3d-file-format";
410,412d382
< #ifdef QCOM_LEGACY_CAM_PARAMS
< const char CameraParameters::FOCUS_MODE_CONTINUOUS_CAMERA[] = "continuous-camera";
< #endif
456,459d425
< #ifdef QCOM_LEGACY_CAM_PARAMS
< const char CameraParameters::KEY_MAX_SHARPNESS[] = "sharpness-max";
< const char CameraParameters::KEY_MIN_SHARPNESS[] = "sharpness-min";
< #else
461d426
< #endif
463,466d427
< #ifdef QCOM_LEGACY_CAM_PARAMS
< const char CameraParameters::KEY_MAX_CONTRAST[] = "contrast-max";
< const char CameraParameters::KEY_MIN_CONTRAST[] = "contrast-min";
< #else
468d428
< #endif
470,473d429
< #ifdef QCOM_LEGACY_CAM_PARAMS
< const char CameraParameters::KEY_MAX_SATURATION[] = "saturation-max";
< const char CameraParameters::KEY_MIN_SATURATION[] = "saturation-min";
< #else
475d430
< #endif
490,492d444
< const char CameraParameters::FILE_FORMAT_MPO[] = "mpo";
< const char CameraParameters::FILE_FORMAT_JPS[] = "jps";
< 
807,813d758
< #ifdef QCOM_LEGACY_CAM_PARAMS
< void CameraParameters::setPostviewSize(int width, int height)
< {
<     // dummy 
< }
< #endif
< 
918,922d862
< }
< 
< void CameraParameters::set3DFileFormat(const char *format)
< {
<     set(KEY_SUPPORTED_3D_FILE_FORMAT, format);
ctaylor@dusty-tr2:~
>

=============================

ctaylor@dusty-tr2:~
> diff cm-11.0/frameworks/av/camera/Android.mk Android/cm11.0-rezound/frameworks/av/camera/Android.mk 
45,47d44
< ifeq ($(BOARD_USES_QCOM_LEGACY_CAM_PARAMS),true)
<       LOCAL_CFLAGS += -DQCOM_LEGACY_CAM_PARAMS
< endif
ctaylor@dusty-tr2:~
>

=============================

ctaylor@dusty-tr2:~
> diff cm-11.0/frameworks/av/services/camera/libcameraservice/CameraService.cpp Android/cm11.0-rezound/frameworks/av/services/camera/libcameraservice/CameraService.cpp
24,25d23
< #include 
< #include 
91,108d88
< #if defined(BOARD_HAVE_HTC_FFC)
< #define HTC_SWITCH_CAMERA_FILE_PATH "/sys/android_camera2/htcwc"
< static void htcCameraSwitch(int cameraId)
< {
<     char buffer[16];
<     int fd;
< 
<     if (access(HTC_SWITCH_CAMERA_FILE_PATH, W_OK) == 0) {
<         snprintf(buffer, sizeof(buffer), "%d", cameraId);
< 
<         fd = open(HTC_SWITCH_CAMERA_FILE_PATH, O_WRONLY);
<         write(fd, buffer, strlen(buffer));
<         close(fd);
<     }
< }
< #endif
< 
< 
388,391d367
< 
< #if defined(BOARD_HAVE_HTC_FFC)
<     htcCameraSwitch(cameraId);
< #endif
ctaylor@dusty-tr2:~
>

=============================

ctaylor@dusty-tr2:~
> diff cm-11.0/frameworks/av/services/camera/libcameraservice/device1/CameraHardwareInterface.h Android/cm11.0-rezound/frameworks/av/services/camera/libcameraservice/device1/CameraHardwareInterface.h 
664,666d663
< #ifdef HTC_3D_SUPPORT
<         usage |= GRALLOC_USAGE_PRIVATE_0;
< #endif
685,692d681
< #ifdef HTC_3D_SUPPORT
<     static int __set_3d_mode(
<                       const struct preview_stream_ops *w, int r1, int r2, int r3)
<     {
<         return 0;
<     }
< #endif
< 
700,702d688
< #ifdef HTC_3D_SUPPORT
<         mHalPreviewWindow.nw.set_3d_mode = __set_3d_mode;
< #endif
ctaylor@dusty-tr2:~
> 

=============================

ctaylor@dusty-tr2:~
> diff cm-11.0/frameworks/av/services/camera/libcameraservice/Android.mk Android/cm11.0-rezound/frameworks/av/services/camera/libcameraservice/Android.mk 
61,72d60
< ifeq ($(BOARD_USES_QCOM_LEGACY_CAM_PARAMS),true)
<     LOCAL_CFLAGS += -DQCOM_LEGACY_CAM_PARAMS
< endif
< 
< ifeq ($(BOARD_HAVE_HTC_FFC),true)
<     LOCAL_CFLAGS += -DBOARD_HAVE_HTC_FFC
< endif
< 
< ifeq ($(BOARD_HTC_3D_SUPPORT),true)
<     LOCAL_CFLAGS += -DHTC_3D_SUPPORT
< endif
< 
ctaylor@dusty-tr2:~
>

=============================

ctaylor@dusty-tr2:~
> diff cm-11.0/frameworks/av/services/camera/libcameraservice/Android.mk Android/cm11.0-rezound/frameworks/av/services/camera/libcameraservice/Android.mk 
61,72d60
< ifeq ($(BOARD_USES_QCOM_LEGACY_CAM_PARAMS),true)
<     LOCAL_CFLAGS += -DQCOM_LEGACY_CAM_PARAMS
< endif
< 
< ifeq ($(BOARD_HAVE_HTC_FFC),true)
<     LOCAL_CFLAGS += -DBOARD_HAVE_HTC_FFC
< endif
< 
< ifeq ($(BOARD_HTC_3D_SUPPORT),true)
<     LOCAL_CFLAGS += -DHTC_3D_SUPPORT
< endif
< 
ctaylor@dusty-tr2:~
>

=============================

ctaylor@dusty-tr2:~
> diff cm-11.0/frameworks/av/media/libstagefright/CameraSource.cpp Android/cm11.0-rezound/frameworks/av/media/libstagefright/CameraSource.cpp
365d364
< #ifndef HTC_3D_SUPPORT // HTC uses invalid frame rates intentionally on the 3D camera
371c370
< #endif
---
> 
468d466
< #ifndef HTC_3D_SUPPORT // HTC uses invalid frame rates intentionally on the 3D camera
474c472
< #endif
---
> 
ctaylor@dusty-tr2:~
>

=============================

ctaylor@dusty-tr2:~
> diff cm-11.0/frameworks/av/media/libstagefright/OMXCodec.cpp Android/cm11.0-rezound/frameworks/av/media/libstagefright/OMXCodec.cpp 
360,375d359
<                 index, "requires-larger-encoder-output-buffer")) {
<         quirks |= kRequiresLargerEncoderOutputBuffer;
<     }
<     if (list->codecHasQuirk(
<                 index, "needs-flush-before-disable")) {
<         quirks |= kNeedsFlushBeforeDisable;
<     }
<     if (list->codecHasQuirk(
<                 index, "requires-flush-complete-emulation")) {
<         quirks |= kRequiresFlushCompleteEmulation;
<     }
<     if (list->codecHasQuirk(
<                 index, "supports-multiple-frames-per-input-buffer")) {
<         quirks |= kSupportsMultipleFramesPerInputBuffer;
<     }
<     if (list->codecHasQuirk(
6165d6148
< 
ctaylor@dusty-tr2:~
> 

=============================

ctaylor@dusty-tr2:~
> diff cm-11.0/frameworks/av/include/camera/CameraParameters.h Android/cm11.0-rezound/frameworks/av/include/camera/CameraParameters.h 
125d124
<     void set3DFileFormat(const char* buffer);
191,204d189
< #ifdef QCOM_LEGACY_CAM_PARAMS
<     static const char KEY_CAPTURE_MODE[];
<     static const char KEY_SUPPORTED_CAPTURE_MODES[];
<     static const char KEY_PICTURE_COUNT[];
<     static const char KEY_MAX_BURST_PICTURE_COUNT[];
<     static const char KEY_SUPPORTED_CONTINUOUS_AF[];
<     static const char KEY_SUPPORTED_CAF[];
<     static const char CAPTURE_MODE_NORMAL[];
<     static const char CAPTURE_MODE_BURST[];
<     static const char CAPTURE_MODE_CONTI_BURST[];
<     static const char CAPTURE_MODE_HDR[];
<     static const char CAPTURE_MODE_HJR[];
<     static const char CAPTURE_MODE_PANORAMA[];
< #endif
212,213d196
<     //HTC 3D color format
<     static const char KEY_SUPPORTED_3D_FILE_FORMAT[];
967,982d949
< #ifdef QCOM_LEGACY_CAM_PARAMS
<     static const char FOCUS_MODE_CONTINUOUS_CAMERA[];
< 
<     // Values for Continuous AF
<     static const char CAF_OFF[] ;
<     static const char CAF_ON[] ;
<     // Proprietaries from CodeAurora use these...
<     static const char CONTINUOUS_AF_OFF[] ;
<     static const char CONTINUOUS_AF_ON[] ;
<     static const char KEY_CONTINUOUS_AF[] ;
<     static const char KEY_CAF[] ;
<     static const char KEY_TAKING_PICTURE_ZOOM[];
<     static const char KEY_PANORAMA_MODE[];
<     static const char PANORAMA_MODE_NOT_INPROGRESS[];
<     static const char PANORAMA_MODE_INPROGRESS[];
< #endif
1006,1008d972
< #ifdef QCOM_LEGACY_CAM_PARAMS
<     static const char KEY_MIN_SHARPNESS[];
< #endif
1011,1013d974
< #ifdef QCOM_LEGACY_CAM_PARAMS
<     static const char KEY_MIN_CONTRAST[];
< #endif
1016,1018c977
< #ifdef QCOM_LEGACY_CAM_PARAMS
<     static const char KEY_MIN_SATURATION[];
< #endif
---
> 
1043,1046d1001
<     // Values for HTC 3D image settings.
<     static const char FILE_FORMAT_MPO[];
<     static const char FILE_FORMAT_JPS[];
< 
1114,1116d1068
< #ifdef QCOM_LEGACY_CAM_PARAMS
<     void setPostviewSize(int x, int y);
< #endif
ctaylor@dusty-tr2:~
> 

=============================

   

  pmem ion caf locations

The following are using PMEM:
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/camera/QCamera2/stack/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/display-legacy/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/media-legacy/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/display-caf/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/media-caf/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/display/msm8960/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/display/msm8974/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/msm8960/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/msm8x74/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/media/mm-core/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/audio-caf/legacy/mm-audio/adec-mp3/sw/test
/home/ctaylor/Android/cm11.0-rezound/kernel/htc/vigor-3.0/include/linux/
/home/ctaylor/Android/cm11.0-rezound/kernel/htc/vigor-3.0/include/media
/home/ctaylor/Android/cm11.0-rezound/kernel/htc/vigor-3.0/arch/
/home/ctaylor/Android/cm11.0-rezound/kernel/htc/vigor-3.0/drivers/
/home/ctaylor/Android/cm11.0-rezound/external/kernel-headers/original/linux/
/home/ctaylor/Android/cm11.0-rezound/external/qemu/hw/
/home/ctaylor/Android/cm11.0-rezound/prebuilts/ndk/ -- lots and lots
/home/ctaylor/Android/cm11.0-rezound/device/htc/msm8660-common
/home/ctaylor/Android/cm11.0-rezound/frameworks/native/include/binder/MemoryHeapPmem.h
/home/ctaylor/Android/cm11.0-rezound/bionic/libc/kernel/common/linux/
/home/ctaylor/Android/cm11.0-rezound/development/ndk/platforms/android-3/include/linux/
hardware, kernel, external, prebuilts, device, frameworks, bionic, development


And the following are using ION:

/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/camera/QCamera2/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/display-caf/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/audio-caf/legacy/msm8660/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/media-legacy/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/media-caf/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/media/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/msm8960/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/msm8x74/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/keymaster/

/home/ctaylor/Android/cm11.0-rezound/hardware/ti/omap3/ion/
/home/ctaylor/Android/cm11.0-rezound/hardware/ti/omap3/omx/video/src/openmax_il/video_decode/inc/
/home/ctaylor/Android/cm11.0-rezound/hardware/ti/omap3/omx/video/src/openmax_il/video_decode/src/
/home/ctaylor/Android/cm11.0-rezound/hardware/ti/omap4xxx/ion/
/home/ctaylor/Android/cm11.0-rezound/hardware/samsung_slsi/exynos5/

/home/ctaylor/Android/cm11.0-rezound/bionic/libc/kernel/common/linux/
/home/ctaylor/Android/cm11.0-rezound/device/htc/msm8660-common/

/home/ctaylor/Android/cm11.0-rezound/kernel/htc/vigor-3.0/arch/arm/mach-msm/
/home/ctaylor/Android/cm11.0-rezound/kernel/htc/vigor-3.0/arch/arm/configs
/home/ctaylor/Android/cm11.0-rezound/kernel/htc/vigor-3.0/drivers/gpu/ion
/home/ctaylor/Android/cm11.0-rezound/kernel/htc/vigor-3.0/drivers/
/home/ctaylor/Android/cm11.0-rezound/kernel/htc/vigor-3.0/include/

/home/ctaylor/Android/cm11.0-rezound/bootable/recovery/minui/
/home/ctaylor/Android/cm11.0-rezound/bootable/recovery-cm/minui/

/home/ctaylor/Android/cm11.0-rezound/system/core/libion/
/home/ctaylor/Android/cm11.0-rezound/system/core/include/ion/

/home/ctaylor/Android/cm11.0-rezound/frameworks/native/
/home/ctaylor/Android/cm11.0-rezound/external/chromium_org/third_party/cld/encodings/compact_lang_det/generated/
/home/ctaylor/Android/cm11.0-rezound/external/kernel-headers/original/linux/
hardware, bionic, device, kernel, bootable, system, frameworks, external,


The following have -caf OR _caf:
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/audio-caf/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/display-caf/
/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/media-caf/

/home/ctaylor/Android/cm11.0-rezound/external/

/home/ctaylor/Android/cm11.0-rezound/external/antlr/antlr-3.4/runtime/Delphi/Sources/Antlr3.Runtime/Antlr.Runtime.Tree.pas

/home/ctaylor/Android/cm11.0-rezound/external/bash/examples/complete/bash_completion

/home/ctaylor/Android/cm11.0-rezound/hardware/qcom/camera/QCamera2/HAL/QCameraParameters.cpp


hardware, external,


A summation of the above.

  1. hardware/qcom,
  2. kernel/htc/vigor-3.0,
  3. external,
  4. bionic/libc/kernel/common/linux,
  5. device/htc/msm8660-common,
  6. frameworks/native,
  7. prebuilts/ndk,
  8. development/ndk

  1. hardware/qcom - hardware/ti,
  2. kernel/htc/vigor-3.0,
  3. external,
  4. bionic/libc/kernel/common/linux,
  5. device/htc/msm8660-common,
  6. frameworks/native,
  7. bootable/recovery - bootable/recovery-cm,
  8. system/core

  1. hardware/qcom,
  2. external

   

  Trouble Shooting

CameraSource(  150): Failed to set video buffer count to 4 due to -38

Have you seen this in your logs?? I haven't found the error code -38 .... yet. This message was produced in: /frameworks/av/media/libstagefright/CameraSource.cpp
And this function:

void CameraSource::startCameraRecording() {
	ALOGV("startCameraRecording");
	// Reset the identity to the current thread because media server owns the
	// camera and recording is started by the applications. The applications
	// will connect to the camera in ICameraRecordingProxy::startRecording.
	int64_t token = IPCThreadState::self()->clearCallingIdentity();
	if (mNumInputBuffers > 0) {
		status_t err = mCamera->sendCommand(
			CAMERA_CMD_SET_VIDEO_BUFFER_COUNT, mNumInputBuffers, 0);
			
		// This could happen for CameraHAL1 clients; thus the failure is
		// not a fatal error
		if (err != OK) {
			ALOGW("Failed to set video buffer count to %d due to %d",
				mNumInputBuffers, err);
		}
	}

Well, I found it. Searched for -38 Not sure yet how to trace it back further -but- it is a start.

public class CameraBinderTestUtils {
    private final ICameraService mCameraService;
    private int mGuessedNumCameras;

    static final String CAMERA_SERVICE_BINDER_NAME = "media.camera";

    protected static final int USE_CALLING_UID = -1;
    protected static final int BAD_VALUE = -22;
    protected static final int INVALID_OPERATION = -38;
    protected static final int ALREADY_EXISTS = -17;
    public static final int NO_ERROR = 0;
    private final Context mContext;

    public CameraBinderTestUtils(Context context) {

        mContext = context;

        guessNumCameras();

        IBinder cameraServiceBinder = ServiceManager
                .getService(CameraBinderTestUtils.CAMERA_SERVICE_BINDER_NAME);
        assertNotNull("Camera service IBinder should not be null", cameraServiceBinder);

        this.mCameraService = ICameraService.Stub.asInterface(cameraServiceBinder);
        assertNotNull("Camera service should not be null", getCameraService());
    }
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/
CameraBinderTest.java
CameraBinderTestUtils.java  --   protected static final int INVALID_OPERATION = -38;
CameraDeviceBinderTest.java

/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/
MediaFrameworkIntegrationTestRunner.java 

 5/19/09  sp == strong pointer, wp == weak pointer.
The object will remain around while there are strong pointers; it is destroyed once the last one is released. All you can do with a weak pointer is comparison and attempting to promote to a strong pointer; the latter will fail if there are no other strong pointers on the object.
--
Dianne Hackborn
Android framework engineer
The Reference

Just an additional note, in case it's not obvious,

all sp<> needs to work is the incStrong() and decStrong() methods.
Since it's a template, it doesn't require the target object to derive
from RefBase().
In other words, you can use sp as long as T::incStrong() and
T::decStrong() exist and are implemented properly.

mathias
From same reference.

/frameworks/av/media/libstagefright/CameraSource.cpp --- Failed to set video buffer count to 4 due to -38
/frameworks/av/media/libstagefright/OMXCodec.cpp ---
/frameworks/av/media/libstagefright/MPEG4Writer.cpp
/hardware/qcom/media-caf/mm-video/vidc/venc/src/video_encoder_device.cpp
/hardware/qcom/media-caf/mm-video/vidc/venc/src/video_encoder_device_copper.cpp
/hardware/qcom/media-legacy/mm-video/vidc/venc/src/video_encoder_device_msm8974.cpp
/hardware/qcom/audio-caf/legacy/msm8660/AudioHardware.cpp
/hardware/qcom/audio-caf/legacy/mm-audio/aenc-aac/qdsp6/src/aenc_svr.c
/hardware/qcom/audio-caf/legacy/mm-audio/aenc-amrnb/qdsp6/src/aenc_svr.c
/hardware/qcom/audio-caf/legacy/mm-audio/aenc-evrc/qdsp6/src/aenc_svr.c
/hardware/qcom/audio-caf/legacy/mm-audio/aenc-qcelp13/qdsp6/src/aenc_svr.c
/hardware/qcom/audio-caf/mm-audio/aenc-aac/qdsp6/src/aenc_svr.c
/hardware/qcom/audio-caf/mm-audio/aenc-amrnb/qdsp6/src/aenc_svr.c
/hardware/qcom/audio-caf/mm-audio/aenc-evrc/qdsp6/src/aenc_svr.c
/hardware/qcom/audio-caf/mm-audio/aenc-qcelp13/qdsp6/src/aenc_svr.c
/frameworks/av/media/libstagefright/AudioSource.cpp
QualcommCamera
/device/htc/msm8660-common/camerawrapper/CameraWrapper.cpp
/frameworks/av/camera/CameraParameters.cpp
/frameworks/av/camera/CameraParameters2.cpp
/frameworks/av/media/libstagefright/CameraSource.cpp

/hardware/qcom/media-caf/QCMediaPlayer/com/qualcomm/
/kernel/htc/vigor-3.0/drivers/net/wireless/qualcomm_wlan
/hardware/qcom/camera/QCamera2/HAL/QCamera2Hal.cpp
/hardware/qcom/camera/QCamera2/HAL3/QCamera3Hal.cpp
/hardware/qcom/camera/QCamera2/

   


 Developers Camera    Android Hardware Qcom Legacy    Camera Source  
 Framebuffer line 396  
 CM10.2 with ION    HTTP status codes    ConnectionResult Errors  

This Package Summary has a lot of info ...  android.media package-summary    CamcorderProfile  



These ar just some things that the guys were throwin around in the conversations on the chat:
 board-holiday.h    android_device_samsung_msm8660-common    Bunchies101/Kitten_Kernel    android_device_samsung_msm8660-common  

The following is based on:  Android Camera Framework Stream 
? Camera.java
packages / apps / Camera2 / src / com / android / camera / app /
This one is to create. It extends the application... whatever that means.
? Camera.java
frameworks / base / core / java / android / hardware /
Now this one has some information!!!

  Kernel & Camera

Ok, credit here right up front, even though we are at the bottom of the WebPage. Team members Flyhalf(David), Bunchies(Jordan) and Reven Tech(Beau) were majorly instrumental in this. Flyhalf found the "holiday" stuff and presented it. Bunchies modified one of his kernels with the memory values list below and we found that we could double the number of vids with those values -but- it still failed... only now after a count of 6(six) instead of 3(three). Then later both Bunchies and the Reven helped me setup my 'first' github. My own kernel hub. This was on Oct 2nd, 2014.

What I had suspected before has become a fact. Need to modify the Vigor Kernel code in order to fix the Camcorder. They were messing with the PMEM vs ION earlier in the Jelly Bean code and I think a little in this KitKat code. -BUT- either interest was lost by those in the know -or- they just got frustrated and gave up. At any rate, the code is incomplete -and-, consequently, has errors.

Now then, we have finally been able to get our Eclipse operational -and- we have a Vigor Kernel Project in it. First thing we learned is that some of the "include" files that we are concerned with are "conditionally" included. Had a hard time finding just what the conditional include icon meant, or represented. It was NOT discussed anywhere that we could find. What it means is: the condition has NOT been met so the file will NOT be included. Now then, we don't know IF it is because the proper include paths are not set in Eclipse -or- IF the condition is intentionally NOT set. So, we have a new challenge.

The condition that we are interested in is: CONFIG_ANDROID_PMEM and it is set in include file: autoconf.h. This file is "conditionally" included via the Makefile in /home/ctaylor/vigor/vigor_aosp_kernel. Hmmmmm... gots lots of conditions here.

 /home/ctaylor/vigor/vigor_aosp_kernel/arch/arm/mach-msm/board-vigor.c  
#ifdef CONFIG_ANDROID_PMEM
#include <linux/android_pmem.h>
#endif

 /home/ctaylor/vigor/vigor_aosp_kernel/include/generated/autoconf.h  
#define CONFIG_ANDROID_PMEM 1

 /home/ctaylor/vigor/vigor_aosp_kernel/Makefile  
# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
LINUXINCLUDE    := -I$(srctree)/arch/$(hdr-arch)/include \
                   -Iarch/$(hdr-arch)/include/generated -Iinclude \
                   $(if $(KBUILD_SRC), -I$(srctree)/include) \
                   -include include/generated/autoconf.h

Ok now, I got hung up on that previous define for a number of reasons, one of which is the fact that we will be concerned with how the PMEM vs ION is handled. Another is learning how this code is laid out and another is learning to use Eclipse and the other tools that I have available to accomplish this task. Must use these tools and the PC screen cause the board-vigor.c file mentioned above is over 8,000 lines long!! That would be approximately 133 pages of print!! So, we will use these tools and maybe, maybe print out a selected page or two.

Well now, golly, the "Eclipse Project Explorer" can show you one heck of a lot of information. More than I was prepared for, at the time. When you click on the 'plus' sign beside the file, it will start listing the contents of it right there in the Explorer section! Have to be careful what you click on in this thing. Course here in the beginnings I'm thinking they got a lot -but- NOT necessarily what I want... or at least not at the moment in my undertandings.

Alllllrighty ... One of the things I wanted to do was look at the Pyramid Kernel code and compare it to our Vigor Kernel code. They are close to the same... close, so's we should be able to "steal" some code and/or ideas from them to get ours to work ... cause ... they had the same problem.

OK, right off the bat they have the same conditional include as above. -BUT- that is code here taken from CyanogenMod and NOT Sultan's personal stuff. Looking at his personal stuff and I see it is NOT the same!!
CONFIG_ION_MSM is in 4 files:

    /home/ctaylor/Android/Sultan/sultan-kernel-pyramid-pure/arch/arm/mach-msm/board-pyramid.c
This one conditionally includes two files. Late in code conditionally includes &ion_dev as part of struct_platform.

    /home/ctaylor/Android/Sultan/sultan-kernel-pyramid-pure/drivers/gpu/ion/msm/ion_cp_common.h
This one just picks a dynamic function -or- a static one. Same function just different type.

    /home/ctaylor/Android/Sultan/sultan-kernel-pyramid-pure/arch/arm/configs/Sultan_defconfig
This is where it is defined.

    /home/ctaylor/Android/Sultan/sultan-kernel-pyramid-pure/drivers/gpu/ion/Makefile
In this... explained below.

Ok, the Makefile is NOT conditional; it is absolute:

obj-$(CONFIG_ION) += ion.o ion_heap.o ion_system_heap.o ion_carveout_heap.o ion_iommu_heap.o ion_cp_heap.o
obj-$(CONFIG_CMA) += ion_cma_heap.o
obj-$(CONFIG_ION_TEGRA) += tegra/
obj-$(CONFIG_ION_MSM) += msm/
-But- it does show some files involved in the ION stuff. More input!! (as in info, knowledge) However, I'm not sure why it has the Tegra in there. Think it might be one or the other, MSM or TEGRA.

These are in both.
    /home/ctaylor/vigor/vigor_aosp_kernel/drivers/gpu/ion/ion.c
    /home/ctaylor/vigor/vigor_aosp_kernel/drivers/gpu/ion/ion_heap.c
    /home/ctaylor/vigor/vigor_aosp_kernel/drivers/gpu/ion/ion_system_heap.c
    /home/ctaylor/vigor/vigor_aosp_kernel/drivers/gpu/ion/ion_carveout_heap.c
    /home/ctaylor/vigor/vigor_aosp_kernel/drivers/gpu/ion/ion_iommu_heap.c
    /home/ctaylor/vigor/vigor_aosp_kernel/drivers/gpu/ion/ion_cp_heap.c

This one is NOT in the Vigor files.
    /home/ctaylor/Android/Sultan/sultan-kernel-pyramid-pure/drivers/gpu/ion/ion_cma_heap.c

First 2 changes which are in memory. Actually doubles the space for the memory so we get twice the number of recordings. Six instead of three.... Wow.
The following values are found in: /home/ctaylor/vigor/vigor_aosp_kernel/arch/arm/mach-msm/board-vigor.h
    #define KERNEL_SMI_SIZE 0xE00000
    #define SIZE_ADDR1 0x32000000
Made changes to board-vigor.c and board-vigor.h based on the board-holiday changes. There were lots more than just the above two memory changes. There were some changes concerning vidc -but- they kinda bounced back and forth on the code. Think I have all, or at least most of the changes in there. We'll soon find out.

 December 8th, 2014/1:46am  KERNEL_SMI_SIZE is used in board-vigor.h where it is defined... and then in board-vigor.c. Used in two calculations in the 'h' file.
    #define KERNEL_SMI_SIZE     0xE00000
    #define USER_SMI_SIZE       (MSM_SMI_SIZE - KERNEL_SMI_SIZE)
    #define USER_SMI_BASE     (KERNEL_SMI_BASE + KERNEL_SMI_SIZE)
The resultant values are used elsewhere -but- for now we are just looking at KERNEL_SMI_SIZE. Over in board-vigor.c it is used in a struct definition.

static struct memtype_reserve msm8x60_reserve_table[] __initdata = {
	/* Kernel SMI memory pool for video core, used for firmware */
	/* and encoder, decoder scratch buffers */
	/* Kernel SMI memory pool should always precede the user space */
	/* SMI memory pool, as the video core will use offset address */
	/* from the Firmware base */
	[MEMTYPE_SMI_KERNEL] = {
		.start	=	KERNEL_SMI_BASE,
		.limit	=	KERNEL_SMI_SIZE,
		.size	=	KERNEL_SMI_SIZE,
		.flags	=	MEMTYPE_FLAGS_FIXED,
	},
	/* User space SMI memory pool for video core */
	/* used for encoder, decoder input & output buffers  */
	[MEMTYPE_SMI] = {
		.start	=	USER_SMI_BASE,
		.limit	=	USER_SMI_SIZE,
		.flags	=	MEMTYPE_FLAGS_FIXED,
	},
	 [MEMTYPE_SMI_ION] = {
		.start  =  MSM_ION_MM_BASE,
		.limit  =  MSM_ION_MM_SIZE,
		.flags  =  MEMTYPE_FLAGS_FIXED,
	},
	[MEMTYPE_EBI0] = {
		.flags	=	MEMTYPE_FLAGS_1M_ALIGN,
	},
	[MEMTYPE_EBI1] = {
		.flags	=	MEMTYPE_FLAGS_1M_ALIGN,
	},
};


Now then, the following file list, is the compilation results of my changes to the two files at the top of the list. Unfortunately, it did not work. Boot looped the White HTC screen. Had to remove battery to kill it. The two files at the bottom are just for reference.

-rw-r--r-- 1 ctaylor users    8409 Oct  6 23:18 board-vigor.h
-rw-r--r-- 1 ctaylor users  216507 Oct  6 23:18 board-vigor.c
-rw-r--r-- 1 ctaylor users    3839 Oct  6 22:56 .built-in.o.cmd
-rw-r--r-- 1 ctaylor users 9996373 Oct  6 22:56 built-in.o
-rw-r--r-- 1 ctaylor users  239202 Oct  6 22:56 .board-vigor.o.cmd
-rw-r--r-- 1 ctaylor users  334864 Oct  6 22:56 board-vigor.o
-rw-r--r-- 1 ctaylor users       0 Oct  6 22:56 modules.order
-rw-r--r-- 1 ctaylor users     460 Oct  6 22:56 modules.builtin
-rw-r--r-- 1 ctaylor users  229110 Oct  6 22:45 .devices-msm8x60.o.cmd
-rw-r--r-- 1 ctaylor users  172580 Oct  6 22:45 devices-msm8x60.o
-rw-r--r-- 1 ctaylor users  222524 Oct  6 21:59 .board-vigor-wifi.o.cmd
-rw-r--r-- 1 ctaylor users   80804 Oct  6 21:59 board-vigor-wifi.o
-rw-r--r-- 1 ctaylor users   38502 Oct  6 21:59 .board-vigor-mmc.o.cmd
-rw-r--r-- 1 ctaylor users   98560 Oct  6 21:59 board-vigor-mmc.o
-rw-r--r-- 1 ctaylor users  217639 Oct  6 21:59 .board-vigor-rfkill.o.cmd
-rw-r--r-- 1 ctaylor users   79488 Oct  6 21:59 board-vigor-rfkill.o
-rw-r--r-- 1 ctaylor users   37377 Oct  6 21:59 .board-vigor-audio.o.cmd
-rw-r--r-- 1 ctaylor users   99356 Oct  6 21:59 board-vigor-audio.o
-rw-r--r-- 1 ctaylor users  223159 Oct  6 21:59 .board-vigor-keypad.o.cmd
-rw-r--r-- 1 ctaylor users   86284 Oct  6 21:59 board-vigor-keypad.o
drwxr-xr-x 2 ctaylor users    4096 Oct  6 21:58 display/
-rw-r--r-- 1 ctaylor users  155237 Oct  6 15:45 board-TR-pyra2vig.c
-rw-r--r-- 1 ctaylor users  216314 Oct  6 15:06 board-vigor-sav-inc-line-chng.c


 October 7th, 2014 / 7:33am  Well, evidentially, to much to fast and not really knowing what the heck I am doing. Trying to copy another phones stuff ... and it ain't workin'. Gona put it back the way it was and ... start again.

Alllllrighty now... First thing we are gona do restore the original files "except" the board-vigor.c file. I re-arranged the include file lines to more correspond to the board-pyramid.c file which I am trying to imitate... and saved a copy. That is the only difference between it and the original. The second thing we are gona do is make those two memory changes that allows us to make 6 vids instead of only 3. And save it!! May as well till I, or one of the others, can get it fixed.
Reference:  Bunchies Code   and    board-holiday.h   and    board-pyramid.c  

 October 8th, 2014 / 2:53am  The above two references talk about and hold the references for our memory "fix". I'm going to put the values here cause I still don't trust them thar remote places.
Increase SMI to 14MB from 7MB
Accommodate the extra 7MB by subtracting 7MB from Size Addr1 which was 762MB which is now 754MB left 1MB open by setting it to 754MB instead of 755MB

      -#define KERNEL_SMI_SIZE 0x700000  
      +#define KERNEL_SMI_SIZE 0xE00000 /* 14MB */  
      -#define SIZE_ADDR1 0x2FA00000  
      +#define SIZE_ADDR1 0x2F261568 /* 754MB */  

 December 3rd, 2014/12:14pm  More that I found concerning our problem, which was also a problem on other phones ... from HTC. The following was for the Pyramid phone.    HTC Pyramid  

Log message

vidc: 1080p: Increase the kernel SMI memory size.

Current in-kernel SMI size is not sufficient to decode four
simultaneous H.264 sessions. Fix is to increase the in-kernel
SMI memory size.

... 			
1524 	1524 		/* SMI PMEM Region, as the video core will use offset address */
1525 	1525 		/* from the Firmware base */
1526 	1526 		#define PMEM_KERNEL_SMI_BASE (MSM_SMI_BASE)
1527 		- 	#define PMEM_KERNEL_SMI_SIZE 0x300000
	1527 	+ 	#define PMEM_KERNEL_SMI_SIZE 0x600000
1528 	1528 		/* User space SMI PMEM Region for video core*/
1529 	1529 		/* used for encoder, decoder input & output buffers */
1530 	1530 		#define MSM_PMEM_SMIPOOL_BASE (PMEM_KERNEL_SMI_BASE + PMEM_KERNEL_SMI_SIZE)
1531 		- 	#define MSM_PMEM_SMIPOOL_SIZE 0x3D00000
	1531 	+ 	#define MSM_PMEM_SMIPOOL_SIZE 0x3A00000
1532 	1532 		
1533 	1533 		static unsigned fb_size = MSM_FB_SIZE;
1534 	1534 		static int __init fb_size_setup(char *p)
... 		

These two phones are messing around with the shared memory in order to handle the Camcorder. -But- they, at least the Sensation/Pyramid from Sultan, claim to be using the ION memory allocation. It is a hybrid of ION and PMEM ... I think. Believe that ours is also a hybrid -but- not enough. And I beleve that is where the problem is.


 PMEM - Process memory allocator   Like ashmem, the PMEM driver allows for sharin memory between processes. However, unlike ashmem, it allows the sharing of large chunks of physically contiguous memory regions, not virtual memory. In addition, these memory regions may be shared between processes and drivers.
 ASHMEM - Anonymous Shared Memory  ; Anonymous SHared MEMory, or ASHMEM, is a named memory block that is shared between processes that the kernel is allowed to free. This is notable as the kernel is not allowed to free standard shared memory. Ashmem is described as being similar to POSIX SHM "but with different behavior". For instance, it uses reference counting to destroy memory regions when all processes referring to them have exited, and will shrink mapped regions when all processes referring tothem have exited, and will shrink mapped regions if the system is in need of memory. "Unpinning" a region allows it to be shrunk, whereas "pinning" a region disallows the shrinking.
Typically, a first process creates a shared memory region using ashmem, and uses Binder to share the corresponding file descriptor with other processes with which it wishes to share the region. Dalvik's JIT code cache, for instance, is provided to Dalvik instances through ashmem. A lot of System Server components, such as the Surface Flinger and the Audio Flinger, rely on ashmem-- through the IMemory interface, rather than directly.
There are two sets of Android development tools; those used for Application Development and those used for Platform Development.
Android defines its own RPC/IPC (remote procedure call/inter-process communication) mechanism: Binder. Components use the in-kernel Binder mechanism accessible accessible through /dev/binder.
OOM adjustments are set on startup by the init.rc file. Some of the properties set at build time are stored in the /system/build.prop file. Use getprop to get the current list of properties and their values.
 Shared Memory with ashmem  

Ashmem - Ashmem is an Anonymous SHared
MEMory system that adds interfaces so processes can
share named blocks of memory. As an example, the
system could use Ashmem to store icons, which
multiple processes could then access when drawing
their UI. The advantage of Ashmem over traditional
Linux shared memory is that it provides a means for
the kernel to reclaim these shared memory blocks if
they are not currently in use. If a process then tries to
access a shared memory block the kernel has freed, it
will receive an error, and will then need to reallocate
the block and reload the data.
 Main Differences between Android & Linux Operating Systems  

 ReZound Processor & Memory  

  • Codename: Snapdragon S3
  • CPU Structure (complexity): RISC
  • Width of Machine Word: 32 bit
  • Primary (RAM) Data bus: 32 bit
Memory
  • 16 GB internal memory
  • Pre-loaded 16 GB microSD card with support for optional cards up to 32 GB.
  • 1 GB of RAM (DDR2)

Ok, now that we have our head straight... or at least straighter... let's see IF we use this re-learned and new knowledge and get this fixed!! For one thing... the pictures -and- the videos taken and recorded are stored on the INTERNAL SD... NOT the External one.


 CameraWrapper.cpp#L113    CameraWrapper.cpp#L167    config.xml#L37  

   


  Memory Debuging

Today... I finally found the information that I need... and have been looking for, for a long time. I must learn how to find the proper words to make these "Hunts" faster. I'm sure things from up above, -and- my other pages, will be repeated here... -BUT- hopefully that will put ALL the necessary info in one(1) spot. And here I need to mention a book that helped me find those proper words -and- provided a lot of information on the operation of Android -and- its memory.
Refer: Embedded Android: Porting, Extending, and Customizing

Now the folowing was up above -but- I felt it is needed to be included here... and possibly further modified and added to. It has become fairly obvious, to me anyway, that the problem with our Camcorder is memory allocation and release. Now then this is a 32-bit device and therefore can only address 4GB of RAM... but lots more is needed -and- available. I will probably mention this again... and again cause I think it is something we need to be mindful of. Don't want to think that it, our ReZound, just readily has access to all the memory it possesses.

  • SMI - Shared Memory Interface

"Borrowed" and slightly modified from:  Norton Support  

Collect debug logs in DDMS

  1. From the Phone Home screen, tap Settings.

  2. Depending upon your operating system, do one of the following:

    • For  Android 2.x  (Gingerbread): Settings -> Applications -> Development

    • For  Android 4.0.x  (ICS): Settings -> Developer Options -> USB Debugging

    • For  Android 4.1.x  (JellyBean): Settings -> Developer Options -> USB Debugging

    • For  Android 4.2/4.3/4.4.x  (JellyBean/KitKat): Settings -> About phone -> Build Number
      Tap Build Number seven times until you receive a dialog box which reads
              "You are now a developer".
      Return to the Settings menu, and then tap Developer options. In it tap or select USB Debugging

  3. In Developer options Tap Android debugging and USB debugging notify to turn them On or Off. The second one is usually auto-checked when the first one is Tapped. In recent CyanogenMod Systems you will probably find both of them checked after you enable Developer options. BUT it doesn't hurt to check.

  4. Read the warning on the screen, and click OK.

  5. Connect the USB cable to phone and your computer.

  6. In the Dalvik Debug Monitor Server, select the model of the device connected to start generating logs. There was not model selection when I did this. It just worked on my ReZound that I had connected.

  7. Now in the next step, they say to click on Device in the menu bar. Then in the next step you are to select Run logcat. Well, it don't work that way. Before Run logcat is selectable, you must select the app that you want to log. In this case I selected camera2. -BUT- before you can even see the app to select it... you must start it on the phone... well the Camera anyway.

  8. After selecting the app; On the menu bar, click Device.

  9. From the drop-down menu, select Run logcat.

  10. In the Remote Command window, the logs are continuously generated.

    To save the debug logs, click Cancel. Yes click Cancel. Save is greyed out. Have faith IF it goes away. It did the first time I tried. I repeated the procedure and it worked as stated.

  11. Click Save.

  12. In the Save output... dialog box that appears, navigate to a location and specify the name for the file.

    Save the file with a .doc extension to keep the debug logs in order.

  13. Click Save.

  14. Click Done.

Now then, that was all well and good to get some logs. -But- we can also use it to get a little information about what kind of memory your app is using and when. And that is what we need with our Camcorder. This section is from:  Android Developers   Now the last time, right above here, that I started this, the "monitor" didn't work for me. I had to use "DDMS". I'm going to try the monitor again. "Preliminary" tries seemed ok.

 November 11th, 2014/5:32am  Been away for a couple of weeks. I got a new PC. Needed a faster one in order to get these compiles done faster. Eight hours for a clean compile was just to long. This new one will do it in a little over an hour!! That was for the FULL Android, not just the Kernel. But those will also be even faster now. Ok, now I need to get back into this.

Debugging Memory

  1. Repeat, or do for the first time, the first 5 steps from the above "Collect the Logs".
  2. IF you don't have the "sdk tools" in your path, then you will have to move into that dir and launch the monitor tool... from the command line in a terminal window.
  3. The app that we want to debug, in the Debug Monitor, is to be selected from the list on the left. However, our Camera is NOT listed. Presumeably, directions have been followed and the Phone is connected to the 'Puter. In order to see the Camera in the list we must select it on the Phone. Find the Camera icon on the Phone and Tap it.
  4. Now if you look at the left side of the Debug Monitor screen you will see "com.android.camera2" in the list. Click on it to select it.
  5. Click Update Heap above the process list.
  6. In the right-side panel, select the Heap tab.

    The Device Monitor tool, showing the [1] Update Heap and [2] Cause GC buttons. The Heap tab on the right shows the heap results.
  7. Naturally, in order to see anything, we will have to operate the Camera.
  8. Well, once again I didn't see anything ... leastwise not intuitively obvious to me.

  The Android ION memory allocator    <-- An LWN article that covers the ION stuff fairly well.

This was taken from a WebPage on  Android Forums   -but- the value names 'look' the same as in ours. I will edit it later WITH ours.
OK, it's later... I did a massive search in all the stuff I am working with and put the results in the table below. There are two HTC boards that I am most concerned with, the Pyramid of Sultan's and, of course, my Vigor. The Holiday may also play some part in this. The Sultan board is NOT part of the "normal" stuff like the Vigor and Holiday. What do I mean by that?? Hell, I don't know!!

#define MSM_PMEM_KERNEL_EBI1_SIZE  0x600000   In Pyramid but NOT Vigor or Sultan
#define MSM_PMEM_ADSP_SIZE         0x2000000  In BOTH but diff in Sultan
#define MSM_PMEM_AUDIO_SIZE        0x28B000   In BOTH but NOT in Sultan

#define MSM_SMI_BASE               0x38000000 In BOTH
#define MSM_SMI_SIZE               0x4000000  In BOTH

#define KERNEL_SMI_BASE            (MSM_SMI_BASE) In BOTH but NOT in Sultan
#define KERNEL_SMI_SIZE            0x600000   In BOTH but NOT in Sultan
     ------ desired to be highest amount we can give it.

#define USER_SMI_BASE              (KERNEL_SMI_BASE + KERNEL_SMI_SIZE) In BOTH but NOT in Sultan
#define USER_SMI_SIZE              (MSM_SMI_SIZE - KERNEL_SMI_SIZE) In BOTH but NOT in Sultan
#define MSM_PMEM_SMIPOOL_SIZE      USER_SMI_SIZE  In BOTH but diff in Sultan

#define MSM_ION_SF_SIZE            0x4000000 /* 64MB */  In Vigor and Sultan
#define MSM_ION_CAMERA_SIZE        MSM_PMEM_ADSP_SIZE   In NEITHER
#define MSM_ION_MM_FW_SIZE         0x200000 /* (2MB) */  In Vigor and Sultan
#define MSM_ION_MM_SIZE            0x3600000 /* (54MB) */  In Vigor and Sultan
#define MSM_ION_MFC_SIZE           SZ_8K                 In Sultan ONLY
#ifdef IPRJ_ION_MEM_SETTING    This condition is in NONE of the stuff I have.
#define MSM_ION_WB_SIZE            0x2100000 /* 33MB */  In Vigor and Sultan
#else
#define MSM_ION_WB_SIZE            0x610000 /* 6MB */
#endif
#define MSM_ION_QSECOM_SIZE        0x600000 /* (6MB) */   In NEITHER
#define MSM_ION_AUDIO_SIZE         MSM_PMEM_AUDIO_SIZE   In Sultan ONLY

Which redirects the ion memory allocation to be the pmem size. It may actually use ion, but it won't exceed the allotted pmem size

 Sultan Notes  

Board-pyramid: remap memory layout [3/4]
New memory map features:
*600MB of RAM has been allocated to userspace
*No memory allocations are mapped to invalid addresses of over 0x70000000
*Framebuffer glitches have been fixed (after the phone would be on for a while,
 the framebuffer would grow past 0x70000000 and result in artifacts due to 
 addresses over 0x70000000 not existing)
*Fixed a potential glitch with the MDP allocation (the space before 0x45C00000
 is being allocated to something we don't see in board-pyramid.h, so if MDP were
 to actually grow past 0x2A90000 then it would grow into that "invisible"
 allocation and create artifacts)

I have left space for a 4th patchset should the need to make revisions arise.
MDP is dangerously small now so we will have to see if it passes the test of time.

 SIZE_ADDR1  Used in: (and only in function - in board-vigor.c)
static void __init vigor_fixup(struct machine_desc *desc, struct tag *tags, char **cmdline, struct meminfo *mi)
{
    engineerid = parse_tag_engineerid(tags);

    mi->nr_banks = 1;
    mi->bank[0].start = PHY_BASE_ADDR1;   /*0x48800000*/
    mi->bank[0].size = SIZE_ADDR1;   /*0x2FA00000 <- orig - - new?? -> 0x2F261568 */

    pr_info("vigor_fixup, parse_tag_cam(tags)=%d", parse_tag_cam(tags));
    cam_id_kvalue = parse_tag_cam(tags);
}

typedef struct meminfo {
  unsigned long type;
  unsigned long start;
  unsigned long end;
} meminfo_t;
struct tag {
	const char *name;
	int type_n_flags;
	int max_len;
};
which is called by: (and only by... at boot - in board-vigor.c)
MACHINE_START(VIGOR, "vigor")
    .fixup = vigor_fixup,
    .map_io = vigor_map_io,
    .reserve = vigor_reserve,
    .init_irq = msm8x60_init_irq,
    .init_machine = vigor_init,
    .timer = &msm_timer,
    .init_early = msm8x60_charm_init_early,
MACHINE_END
which is defined in: arch/arm/include/asm/mach/arch.h and used in a lot of places.
/*
 * Set of macros to define architecture features.  This is built into
 * a table by the linker.
 */
#define MACHINE_START(_type,_name)			\
static const struct machine_desc __mach_desc_##_type	\
 __used							\
 __attribute__((__section__(".arch.info.init"))) = {	\
	.nr		= MACH_TYPE_##_type,		\
	.name		= _name,

#define MACHINE_END				\
};


We have BOTH types defined/configured. Guess that is what they are calling "hybrid". CONFIG_ANDROID_PMEM=y

CONFIG_ION=y
CONFIG_ION_MSM=y

/*** Memory map ***/
    #define MSM_ION_HEAP_NUM    5   /* Just in board-vigor.c & .h */

    // PMEM SMI
    #define MSM_SMI_BASE          (0x38 000 000)   /*939,524,096   board-vigor.h; msm_iomap-8x50.h;
staging-devices.c
*/
    #define MSM_SMI_SIZE             0x4 000 000   /*67,108,864   board-vigor.h; board-holiday.c */

    #define KERNEL_SMI_SIZE        0xE00 000   /*14,680,064 07Oct14 was 0x700 000 board-vigor.c & .h */
    #define USER_SMI_SIZE           (MSM_SMI_SIZE - KERNEL_SMI_SIZE)   /* board-vigor.c & .h */
/* 0x4 000 000 - 0x700 000 = 0x3 900 000 ::: 0x4 000 000 - 0xE00 000 = 0x3 200 000 */
    #define MSM_PMEM_SMIPOOL_SIZE    USER_SMI_SIZE   /* board-vigor.c & .h; staging-devices.c */

    // PMEM
    #define MSM_PMEM_AUDIO_SIZE    0x239 000   /*2,330,624 2.22MB   board-vigor.c & .h */
    #define MSM_PMEM_ADSP_SIZE     0x2 200 000   /*35,651,584 34MB   board-vigor.c & .h;
staging-devices.c
*/

    // ION SMI
    #define MSM_ION_MM_SIZE        0x3 400 000   /*54,525,952 52MB   board-vigor.c & .h */

    // ION
    #define MSM_ION_WB_SIZE            0x800 000   /*8,388,608 8MB   board-vigor.c & .h */
    #define MSM_ION_SF_SIZE             0x4 000 000   /*67,108,864 64MB   board-vigor.c & .h */
    #define MSM_ION_MM_FW_SIZE       0x200 000   /*2,097,152 2MB   board-vigor.c & .h */

    // Base addresses
    #define KERNEL_SMI_BASE          (MSM_SMI_BASE) /* board-vigor.c & .h */
    #define USER_SMI_BASE             (KERNEL_SMI_BASE + KERNEL_SMI_SIZE) /* board-vigor.c & .h */
    #define MSM_PMEM_SMIPOOL_BASE    USER_SMI_BASE /* board-vigor.c & .h; staging-devices.c */
    #define MSM_ION_SF_BASE       (0x78 C00 000) /*2,025,848,832   board-vigor.c & .h*/
    #define MSM_ION_WB_BASE       (0x78 400 000) /*2,017,460,224   board-vigor.c & .h*/
    #define MSM_PMEM_AUDIO_BASE   (MSM_PMEM_ADSP_BASE + MSM_PMEM_ADSP_SIZE) /*
board-vigor.c & .h */
    #define MSM_ION_MM_BASE       (0x7C C00 000) /*2,092,957,696   board-vigor.c & .h*/
    #define MSM_ION_MM_FW_BASE    (0x78 200 000) /*2,015,363,072   board-vigor.c & .h*/
    #define MSM_PMEM_ADSP_BASE     0x40 400 000 /*1,077,936,128   board-vigor.c & .h*/

           /* PHY_BASE_ADDR1 should be 8 MB alignment */
           /* 0x48 000 000~0x48 700 000 is reserved for Vigor 8K AMSS */
    #define PHY_BASE_ADDR1         0x48800000 /* board-vigor.c & .h */
           /* 0x40 400 000~0x42 A00 000 is 38MB for SF/AUDIO/FB PMEM */
           /* 0x42 A00 000~0x48 800 000 is 94MB Reserved for something */
           /* 0x48 800 000~0x7C C00 000 is 836MB for APP */
           /* 0x7C C00 000~0x80 000 000 is 52MB for ADSP PMEM */
    #define SIZE_ADDR1      0x2F 261 568     /*791,025,000 07Oct14 was 0x2F A00 000 board-vigor.c & .h */
/*** END Memory map ***/


 KERNEL_SMI_SIZE  Used in: (and only in) board-vigor.c & .h
static struct memtype_reserve msm8x60_reserve_table[] __initdata = {
    /* Kernel SMI memory pool for video core, used for firmware */
    /* and encoder, decoder scratch buffers */
    /* Kernel SMI memory pool should always precede the user space */
    /* SMI memory pool, as the video core will use offset address */
    /* from the Firmware base */
    [MEMTYPE_SMI_KERNEL] = {
        .start = KERNEL_SMI_BASE,
        .limit = KERNEL_SMI_SIZE,
        .size = KERNEL_SMI_SIZE,
        .flags = MEMTYPE_FLAGS_FIXED,
    },
    /* User space SMI memory pool for video core */
    /* used for encoder, decoder input & output buffers */
    [MEMTYPE_SMI] = {
        .start = USER_SMI_BASE,
        .limit = USER_SMI_SIZE,
        .flags = MEMTYPE_FLAGS_FIXED,
    },
    [MEMTYPE_SMI_ION] = {
        .start = MSM_ION_MM_BASE,
        .limit = MSM_ION_MM_SIZE,
        .flags = MEMTYPE_FLAGS_FIXED,
    },
    [MEMTYPE_EBI0] = {
        .flags = MEMTYPE_FLAGS_1M_ALIGN,
    },
    [MEMTYPE_EBI1] = {
        .flags = MEMTYPE_FLAGS_1M_ALIGN,
    },
};

where msm8x60_reserve_table is used in:   board-vigor.c & System.map
        Cut out from the System.map.

c0037ec0 T acpuclk_8x60_soc_data
c0037ecc t msm8x60_reserve_info
c0037ee4 t msm8x60_reserve_table
c0037f34 T regulator_lpm_set
#ifdef CONFIG_ANDROID_PMEM
static void __init reserve_memory_for(struct android_pmem_platform_data *p)
{
    if (p->start == 0) {
        pr_info("%s: reserve %lu bytes from memory %d for %s.\r\n", __func__, p->size, p->memory_type, p->name);
        msm8x60_reserve_table[p->memory_type].size += p->size;
    }
}
#endif

        which is called by: board-vigor.c
static void __init reserve_pmem_memory(void)
{
#ifdef CONFIG_ANDROID_PMEM
    reserve_memory_for(&android_pmem_adsp_pdata);
    reserve_memory_for(&android_pmem_smipool_pdata);
    reserve_memory_for(&android_pmem_audio_pdata);
#endif
}
        which is called by: board-vigor.c & System.map
#ifdef CONFIG_ION_MSM
static void __init msm8x60_calculate_reserve_sizes(void)
{
    size_pmem_devices();
    reserve_pmem_memory();
    reserve_ion_memory();
}
#endif
        which is called by: (which is NOT conditional)   board-vigor.c & System.map
static struct reserve_info msm8x60_reserve_info __initdata = {
    .memtype_reserve_table = msm8x60_reserve_table,
    .calculate_reserve_sizes = msm8x60_calculate_reserve_sizes,
    .paddr_to_memtype = msm8x60_paddr_to_memtype,
};
        which is called by:   board-vigor.c & System.map
static void __init vigor_reserve(void)
{
    reserve_info = &msm8x60_reserve_info;
    msm_reserve();
}
Which was called from within MACHINE_START... so is the following.   board-vigor.c & System.map
static void __init vigor_map_io(void)
{
    msm_shared_ram_phys = MSM_SHARED_RAM_PHYS;
    msm_map_msm8x60_io();

    if (socinfo_init() < 0)
      pr_err("socinfo_init() failed!\n");
}
        which calls... (in board-vigor.c; io.c; board.h; System.map)
void __init msm_map_msm8x60_io(void)
{
    msm_map_io(msm8x60_io_desc, ARRAY_SIZE(msm8x60_io_desc));
}
        which calls.. (in io.c)
static void msm_map_io(struct map_desc *io_desc, int size)
{
    int i;

    BUG_ON(!size);
    for (i = 0; i < size; i++)
        if (io_desc[i].virtual == (unsigned long)MSM_SHARED_RAM_BASE)
          io_desc[i].pfn = __phys_to_pfn(msm_shared_ram_phys);

    iotable_init(io_desc, size);
}
Now then, there is a whole heck of a lot that goes on in the previous procedure... and at this time I am not gona list it all here. I will probably trace some more and maybe come back and add to this.

      -AND- msm8x60_reserve_table is used in:
static struct reserve_info msm8x60_reserve_info __initdata = {
    .memtype_reserve_table = msm8x60_reserve_table,
    .calculate_reserve_sizes = msm8x60_calculate_reserve_sizes,
    .paddr_to_memtype = msm8x60_paddr_to_memtype,
};
        Which ... is reserved by:
static void __init vigor_reserve(void)
{
    reserve_info = &msm8x60_reserve_info;
    msm_reserve();
}
Which was called from within MACHINE_START... board-vigor.c

 Dec 8th, 2014/3:54pm  Found this while looking for explanations on this:
    OMX_ErrorUndefined = (OMX_S32) 0x80001001
LG Optimus L7 is based on MSM7227a, which is not supported by the video codec sample code. Supported chipsets are MSM8655 and MSM8660. To explain what is going on though, a semaphore is set up to signal that an input buffer is available. Upon initialization, a series of input buffers is allocated and prepared. The thread is waiting for an available buffer to populate. Once all buffers are populated, the semaphore waits while the processing is occurring for an input buffer to be read in and decoded, then it will return the input buffer back to the application and signal the semaphore. If this is not occurring, then the processing may not be able to run on this version of the hardware.

OMX.google.h264.encoder is software video encoder.
You won't see VENC_DRV_OPEN error because you don't call QCOM's hardware video encoder.(qcom.video.encoder.avc if using H.264 or qcom.video.encoder.mpeg4 if using MPEG4).

   

  Fleetwood Mac