Monday, August 9, 2010

RE: audio limitations @

I finally went and checked my linked-in account for the first time in a while. I was a little surprised to find this article describing some problems observed in the performance of audio in Android. I began a conversation with the author and we basically agreed - something is wrong.

Coincidentally, I am just launching into a new season of white papers here at the office. My chosen topic is related . Now I have even more ideas bouncing in this jumbled mind and am better for it.

Thanks to the now well documented benefits of working in (and with) an opensource community, it seems I may need to put off my first paper topic to focus on outlining the basics and how to move forward instead of extending the capabilities of the audio framework.

Thursday, June 17, 2010

opensource = participation

No opensource project can be successful without people participating in it. Since many people on the Android team are a little new to opensource and to Linux, I thought I would start my first tip with some advice: participate.

To that end, you must be a learner and a do-er. The best tip I can give regarding this is to start using Internet Relay Chat (IRC).
You can listen in and learn from people, you can ask your own questions and learn directly, and when ready you can answer others questions and influence the community in a positive way.

For starters:
1. join server. You can get a nice GUI app for any OS these days - on Ubuntu Linux, I like XChat.
2. Create (AND REGISTER) a nick-name with the freenode NickServ.
3. Join the #linux-omap channel at minimum.
4. Browse the channel list and pick topics that are relevant to you. As an audio aficionado , I constantly listen/learn and participate on #alsa and #alsa-soc channels. You can certainly find channels for your domain as well. I know there are channels speficif to V4L, DSS, BlueZ, etc. You can also learn alot on the #ubuntu-arm channel. I have noticed a recent increase in TI presence here since our L23 GL efforts have started making Ubuntu releases for OMAP...

5. Explore, don't be shy. Ask a question if you have one; challenge some one else's answer if you don't agree 100%. After all, in opensource, the goal is always to be better.

Wednesday, June 16, 2010

So, what is an AudioFlinger?

Its been some time since I posted anything, so I will try to make this relevant to my chosen topic.
[Aside: a blog specific to one topic is harder than I thought]

Due to constant shifting responsibilities and a flux of new FAE's into the Linux/Android wireless group here at the office, I have decided (read "been asked") to work on some training presentations. While doing so, I have been going deeper into some sections of code than I have in recent history.

So, what is an AudioFlinger?

An AudioFlinger (sorry google engineers for over simplifying) exists to handle these main responsibilities:
  1. Provide a single (stereo/mono) output path for PCM at a specified sample rate (OMAP3/4 is using 44.1KHz). I am (also) ignoring the oft-ignored DIRECT_OUT option for simplicity.
  2. Provide a software mixer for various playback stream types: ringer, notifications, voice-calls, music, touch tones, and key clicks.
  3. Resample these playback streams as necessary to match the desired output frequency.
  4. Provide a single input capture path at a determined sample rate.
In a single sentence - AudioFlinger is... not something people are likely to learn about from me. Unless they ask questions during my training next week.... maybe I will post some block diagrams afterward...

Friday, December 18, 2009

smart phones on the battlefield

Sorry to all my regular readers, but this is slightly off topic from usual, but it is to interesting to ignore. So I guess you all (by that I mean me and possibly one other person so far) will just have to bear with me.

RITS (or maybe it will be) iRaTS vs. RATS

It looks like Google and Apple are now competing on (or for?) the battlefield. I don't know about you you, but it makes me feel a little unnerved that our military may be using something like an iPhone (flaky consumer oriented devices) or a DROID (yay!!) on the battlefield. How secure can one of these really be?

  1.  I looked for Raytheon on the list and it doesn't look like they are contributing anything back to the community - suppose that is a good thing in this case.
  2. What happens when one of these RIT/RATs is captured by some enemy force? I can imagine some extremist group clicking around on a 3" touch screen guiding a Drone UAV with multi-touch fingers sliding around. Hopefully some ROM code has been tweaked to add enhanced log-in.
  3. I have already heard that a group in Pakistan/Afghanistan was able to intercept Drone video streams using OTS $26 s/w. Security gaps already exist -what else is there being exposed in the open by using an iPhone.
Conclusion. I really would feel more secure about this if DOD sticks with RATS instead of iRTS (or whatever it is called). Linux is designed to be deployed, OS X is not. In this case, the Moto DROID commercial really says it all!

Monday, October 26, 2009

Who is in charge here anyways OR ResourceManager part 2

The deeper I have been looking into power management topics, the more I get confused. In any society, there are limited resources and all persons in this society must either compete for these resources or some form of government is required. This is easy to understand. We all wrote the compare/contrast essay in 6th grade Social Studies where we did such basic comparisons between Socialism, Capitalism, pure Democracy and Dictatorship.

Now, given that each society is unique and respectable in its ways (and that this is a politically correct blog posting), how do we say which form of government is best? Obviously the choice will be unique to each society.

Let us pretend that our society is a population of Linux Android living on OMAP Island. The population has many applications in Java and some in native C/C++, kernel drivers, etc. Some in the population have been given by God (or Google? or Linus?) certain unalienable rights and roles to be managers, servants, governors, or general citizens each with specific permissions.

I am particularly interested in the class of governors that are available in Linux Android. Performance, Userspace, Conservative, and OnDemand are all up for election this year. Who should we support?

The Democratic candidate, OnDemand runs on a needs based platform. If citizens need more MHz, OnDemand will do his best to give it to them. However requests do seem to be getting stalled in the bottle neck of beurocracy. 

The independent, Userspace, believes the citizens should be in control, and he faces stiff opposition this year. He has run for election before, but w/o much success. Userspace seems to need to refine his policies or nominate a solid running mate from among the many native processes.

Performance does not have much chance of election as he simply can not maintain a balanced budget. There will be no savings under his administration because he will constantly push society to run at full tilt - even until the power plant shuts down and none of the working class can operate.

Ah, then there is my favorite... the Republican Conservative. Mr. Conservative has been around a long time. His age old wisdome it tried and true. He will only allocate resources to those who demonstrate a real need. The increases in spending will always be incremental so only just enough MHz are spent to get the job done.

For my vote, Mr. Conservative will be governor this year... poor OnDemand has some good ideas, but will always spend the lot at the first sign of trouble.

Monday, September 14, 2009

donuts vs eclairs

What is a donut? A donut is a cake of some variety which is typically covered with some frosting or sprinkled topping. The curious toroidal shape of this fancied pastry is what intrigues me most.

But what about an eclair - what is that? I have never thought to try to define eclair. No more than I have paused to ponder the design of a donut anyways. An eclair is like a donut, but in many ways I think it is just better.

For example, it is more akin to a cylinder and a torus. There are big benefits here: I can definitely eat faster from one end to another in a straight line instead of eating in a circle. And you can avoid that messy first bite where you have to break the loop.

Also, an eclair has cream filling instead of a gaping hole. That delicious cream filling really set's an eclair apart from a simple donut in my eyes.

It is interesting how aptly named the Android releases have been. Cupcake was a good choice for a first time baker. You can learn alot about how to mix ingredients and add toppings. A donut is a bit of  a twist with some added complications - primarily caused by that often misunderstood shape. And then there is eclair: it is all stretched out and filled in. No more gaps. Quite simply it is a donut evolved.

Especially in the eyes of an audio engineer. I am going to have fun playing with all the creamy filling in eclair.

Wednesday, September 2, 2009

Motorola developers get ready!

I saw this and thought I would just pass it on. Looks like Motorola is launching a developer program and is even offering developers an integrated development studio. Check it out -