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 Freenode.net 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...