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. debugging problems Samsung ACE on win XP, not seen with Samsung Galaxy S


I recently bought a Samsung ACE and I'm having a problem debugging on
WIN XP. After executing an app from eclipse, the phone stops
responding, I need to restart it.

I got also an Galaxy S and I have no problem with that. But as soon as
I swap to ACE, I can debug once if I'm lucky and I need to restart it.

I suspect something wrong with USB drivers, I got them with Kies.
Reinstalled them, but no luck.

Thanks in advance,

Device:Samsung Galaxy ACE GT-S5830
Carrier: {*filter*}
Country / Language:
Android version: 2.2.1
OS / Browser / build number (if applicable): FROYO.XWKB7
Kernel Version: root@DELL104#1


2. Ang.: Ang.: Ang.: Activity is destroyed than instantly created when pushing the sleep/lock-screen button

There's nothing wrong with my app. I just want to prevent it from restarting 
unnecessarily since it loads textures n' stuff. If i need it, I will handle 
configuration changes at runtime.


3. WT Curhat

4. Ang.: Ang.: Activity is destroyed than instantly created when pushing the sleep/lock-screen button

5. Preference Radio Buttons holding settings

6. [WTI] Tablet Asus Ngebut dengan Chip Nvidia Tegra 3

7. Controlling allowed orientations at runtime