Saturday, September 24, 2011

Outside looking in, or inside looking out?

So as most of you know I work with the CyanogenMod (CM) team to get and maintain CM running on a couple different devices.  Since I have joined the group, I have paid more attention to what people say and how people react to different things related to CM, and more importantly how people perceive the CM team as a whole.
**I want to note this post is my own personal view and interpretation and is in no way the combined opinion of the CM Project as a whole.**

When I first started working with android projects I had no real programming experience (still dont really). I read all the guides and various information outlets for themeing and changing aspects of ROMs.  After a few failed attempts, and hours upon hours of reading online, it hit me.  Why go through the trouble of decompiling/unzipping, running files through various editors and recompiling/zipping files, when I could do it all from source?  I quickly realized how powerful the android build environment could be after reading a post about build overlays from koush.

This got me into my first couple of themes, and doing some personal edits of my own.  My biggest downfall as a themer is that I am not a graphic designer.  I realized that after trying to get the whole theme look to really get together.  I stopped on the theming but still enjoyed doing my own "nightly" builds with my own look and overlay.  I remember thinking to myself how awesome the open source aspect of android is, and how awesome it was for this great group of devs (CM) to add to and put the code out there for everyone.  After a few months and getting more and more comfortable with the code and gerrit etc, I started submitting patches to CM.  Nothing major, just little bug fixes or updates here and there.  And then it happened, Gingerbread had came out, and koush no longer had a DINC to get GB fully going on.  So he asked me if I wanted to join the team and keep CM alive in the DINC.  I gladly accepted.
Now I am still no star developer.  The core of the CM team really makes things happen.  All I have done is attempted to take the devices I have in hand, and make then as stable and feature rich as possible with the assistance of the CM team.  And so far, I think its worked out well.

Lets get on to the purpose of the post.  Back when I first started with android, if it weren't due to CM and the availability of the code, and the device workarounds they came up with, I would not be doing this today.  I have always looked up to these guys and their amazing work and dedication to the CM project.  Now that I am a small part of the team, I look up to them even more.  I have a major respect for everyone in the team and all the contributors.

Now recently between sitting idle in various IRC channels, or reading through forum posts, I see a small percentage of people saying things like "CM guys are elitist ass holes." or "The CM guys are total dicks." and "the CM team is just to full of itself, get over it".  As i see things like this it makes me read the context and get the picture of why people are expressing these opinions.  I want to explore a few of these and see if we can clear some things up.

1.  "I pm'd <insert-nick-here> and they never replied.  Guess I am not good enough for them to answer my questions."
     This is a great one.  First, how many pm's do you think CM team members get? 5? 10? 100?  Who knows, but I guarantee you its a huge number.  They may have not seen it, or have the time to answer it.
     Also, maybe they are not at the computer.  Amazingly enough we have lives outside of android/CM that includes jobs, spouses, kids, car accidents, flooding and anything else that YOU are subject to.
    This one, I am especially keen to.  Maybe the answer to your question is a simple google search away.  I have had no formal training whatsoever when it comes to programming, and code.  EVERYTHING I have learned has been through reading, trial and error, and examples of other open source code.  If you can't take the time to do a google search, why should I search it and link it to you?

2.  "CM attacked <insert-random-aosp-rom-here> for kanging, whats the friggin problem, its open source?"
     This is another good one.  People are absolutely right.  The code is there and for the taking.  Where the biggest issue comes from is the taking of code and people attempting to pass it off as their own.  Now to some this may seem petty, but lets spin it this way. You just spent all night with no sleep getting X new feature working, with no help from anyone else.  It took reverse engineering and  some guessing and hours of log reading to get it right.  You clean up the code, make it a bit better, and then you post it to gerrit for other CM team members to verify it works for the various devices and that it causes no issues.  Then after getting a couple hours of sleep you wake up to a link to a forum post, for "Super awesome double XX 2 AOSP built from source rom, NOW WITH FEATURE X!!!" and as you read the post there is no mention of your name, or work, or where the source came from.  Then you notice there are posts that imply this particular dev came up with it.  How would that make you feel?  The bottom line is that the CM team has put in countless hours of sleepless nights to make CM work so well, with all the features, and for it to cover so many devices with only a single repo to build from.  They DESERVE the credit and simple human respect for the work they have done.  So many don't want to admit where the code came from.  So many want to act like they did not use CM in their ROM whatsoever, and too many want to misrepresent what work they actually did. I may be wrong, but other than CVPCS and his ccroms I can not think of a single "AOSP" Rom that didnt start with a download of the CM source.  This is the exact reason, that ROMs like Ultimate Droid (or Blackdroid) did not release their source.  They did not want it in the public eye that it was mostly CM code with some themed elements and strings changed.  And for those that do release the source, if you look back far enough you will find commits that look like:
- "CyanogenMod"
+ "My super elite god rom"
If you use an "AOSP" Rom I will pretty much guarantee that you are running some aspect of CM code.
     The other side of this, is that people who do use the CM source rarely ever submit upstream patches for fixes.  If you are going to use the code, the least you can do is submit bug fixes back to the original source.

3.  "CM wont release their source when I want it.  They are NOT open source"
     This one is fairly new.  This is really stemming from the rash of people who started building "nightlies" for devices before CM did.  although there is nothing wrong with that, some people were attempting to use this for monetary gain, which is not liked.  Also, there were several other ROM "devs" that were pulling CM commits and patches and releasing ROMs to be "first", to take credit for the work, and to make it seem like CM was taking their code.  I just want to keep people honest.  Also, other than the kernel that falls under the GPL, android source code is not required to be released at all (aka manufactures, and other roms like MIUI)  If we choose to sit on code until we are ready to release it, we can do that, and still support Open source.  Every device that is fully supported and that is in a nightly status has all the source code released.

That about covers my feelings for now.  Remember that if you use an AOSP based rom on a Phone/Tablet there is a very good chance that it stemmed from CM.  Think about all the time and effort that the CM team has put into the project, and give them a little thanks too.  We are people too, not just "wizards behind the curtain"

I want to once again mention these are MY personal views, and not the representation of the CM team as a whole.


Monday, August 15, 2011

Can you Hear me? Good!

Lets have a little talk about or what I like to call the audio driver from Hell.

Some background to start.  First off, our audio system is already a pretty big hack.  When the msm7x30 phones first started appearing, sound became the first major hurdle.  It ended up that HTC did some new and crazy stuff to the libaudio drivers that came with the phone, stuff tied directly to the framework, that made having audio on an AOSP based ROM pretty much impossible.
*Enter the G2* So came the realization that we needed an aosp based libaudio.  Turns out that CAF (Code Aurora Forums) Had the source posted for the msm7x30 audio driver. BUT it still did not work.  HTC added a DSP to the audio system for better sound reproduction based on what your current audio source was.  This DSP (aic3254) broke everything.  This is where the G2 aka Vision came in.  It was an HTC AOSP based phone, maybe, just maybe its libaudio would hold the key.  And well it did.  What occurred is that HTC is horrible about leaving code in its drivers/framework etc, tied to other devices/carriers.  The G2 Libaudio had the AOSP compatibilty but in HTC's popular fashion it also contained the code for proper profile switching for the aic3254.

So right now for the msm7x30 phones running CM7, we are actually using the libaudio from the g2(vision).
On the newer phones like mecha and vivo, we still get audio but we have found some quirks.  Apparently HTC has been adding more functionality to the aic3254 in the audio lib, and because of that, it is making the support on newer phones more difficult. (i.e. the Camcorder recording audio bug).  This is also where a few other little things have been creeping up with headphone support, skype, etc.
*Enter Kali-*
Now here is where some magic comes in from the CM team.  Kali- who supports the ACE and VIVO has been hacking away at the HTC libaudio, and putting the missing functions into the source code from CAF.  Its really come along way, but still has several little bugs as expected from reverse engineering the sound lib.

So, the question of the night is, "How does this effect the mecha users?"
Well up until 1.5.x I was using the prebuilt libaudio from vision.  I had been playing around with the source built one from Kali, and decided that it was working well enough to put out as the audio driver for mecha, or atleast give it more testing than just me.
As you can tell, 1.5.x fixed a few things, and broke some things.  I worked with Kali- to fix some of the issues, but there was some more glaring problems that just couldnt justify keeping the implementation. (Dont try voice dialing on BT trust me.)
So because of that, I swapped back to the prebuilt libaudio from vision for 1.6.x.  If you noticed some stuff got fixed, and other things got broken again.  For right now, this is the frankenstein we have to live with.  Do understand that we are trying to get the msm7x30 audio working as best as possible, but in the mean time there are somethings we have to live with.

Thursday, June 16, 2011

Life and upcoming events.

I just wanted to give an update to whats going to be happening with me and the family over the next few weeks.
First off, my wonderful wife, Sarah (@crazymommyofsix) is very pregnant.  She is due at any time now, and we are expecting #6 to be showing up within the next week.  When this happens my android time is going to come pretty close to a halt.  I have to take care of the family and the new baby, along with helping the wife recover, and keeping the rest of the kids under control.  I will still see what I can do when I might find a moment or 2, but nothing like my current rate.
Now shortly after this all occurs and the wife gets recovered, I will be getting transferred from our current area to New England.  Along with this transfer I will be attending several Navy related schools/trainings which will have me traveling a great deal.
Now along with those 2 items, I will be having to spend some time trying to get some extra money saved up for the whole family moving, new house, taking care of our current house, so on and so forth.  This again is going to take up some time.  So what I am saying, its that as much as I love working on android platform, for the next few weeks, (maybe months) I will be more focused on the family and getting our lives moved from one place to another.  Am I disappearing to never be heard of again? NO.  Is the CM7 for mecha going to fall off and disappear?  Well I sure hope not LOL.  I have enlisted the help of cvpcs to hopefully help continue on with getting mecha fully into the CM Mainline tree.
So in all I hope to continue getting little things taken care of, and hope that I will be getting help from cvpcs, toastcfh, and the rest of the CM team.

Now, to sum up the current status of the Mecha:
The device is working well and can be used as a daily driver.  The only thing that is not completely working is the Camcorder Audio, which can be hacked to work.
Items that are flaky but getting better:
3g/4g/wifi data handoffs.
Call audio loudness (for some)
LTE signal bars.

I am sure there are a few other bugs, but these are the main ones that seem to stand out. (to me)

So there it is, whats coming, and going, and the current status.

Now a few other notes of interest.

-I will not be updating the build to work with the new radios until the radios are made official.  I will not force someone to load a leaked radio in order to run CM7.

- The device repo is on the cyanogenmod github, and the kernel source is on my github.  Find some small bugs that you want to help fix?  Glad to hear it, dive in.

- Libaudio is currently a prebuilt lib.  Its the lib from the vision.  Kali- ( has a working source tree for building libaudio from source.  Look there for ideas on how to fix the camcorder audio issue.  Btw the vivo device has the same issue.

I also wanted to extend a huge thank you for those of you who have donated.  No matter how little it was I assure you it helped my family out.


So here we are.  I decided a few days ago that I needed a better place to throw out thoughts, concerns and updates.  The 140 char limit of Twitter just isn't cutting it.