Routing Audio data to Both HEADSET and SPEAKER.

by Anand » Thu, 22 Apr 2010 19:43:18 GMT

Sponsored Links

As particular need, I want to route the Audio data to both HEADSET and
SPEAKER. For example if I play a Music file, I want that the output
should come on speaker and on headset as well. My first question is
weather is it possible or not in the current clair SDK.

As per my understanding, the Headset plugging/unplugging is detected
by the kernel switch driver and the event is sent to Then broadcasts the intent
Intent.ACTION_HEADSET_PLUG with information about state as plugged/
unplugged. This intent is received by and the
audiomanager/audioFlinger is informed to turn on/off the speaker. The
audioManager/AudioFlinger further passes the information to (AudioHardware.cpp). Then in the end the information is
passed to kernel to switch between the speakerphone and Headset.

I have found a case in AudioHardware.cpp as

That being said, please tells me how I can enable both the Headset and
Speakerphone. Incase required, I can furnish more investigation, what
I have done so far.



Other Threads

1. emulator speed

Why is pc android emulator slower than real device but mac iphone
emulator faster than real device?

I can understand the latter but not the former!

2. "Android" tool missing?

Hi guys,

I'm an Android newbie and downloaded today the new sdk but I got stuck
even from the begining. Following the instructions, in order to create
AVD's you have to use the new android tool wich is definetly missing
in the archive and can't do anything.
Hope someone can help me.

Thank you


3. ALSA Compile Error

4. What the difference of "this" pointer?

5. Enable Logs

6. android:style/Theme.Translucent stumped

7. How add view in new layer?