Routing Audio data to Both HEADSET and SPEAKER.

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


Sponsored Links
 Hi,

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
HeadsetObserver.java. Then HeadsetObserver.java broadcasts the intent
Intent.ACTION_HEADSET_PLUG with information about state as plugged/
unplugged. This intent is received by PhoneApps.java and the
audiomanager/audioFlinger is informed to turn on/off the speaker. The
audioManager/AudioFlinger further passes the information to
Libaudio.so (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
SND_DEVICE_HEADSET_AND_SPEAKER.

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.

Thanks
Anand

--



Other Threads

1. Android di Metro

Lagi di metro tivi

salam,
Hermanto

@pahlawan putih

-- 
--------------
"Indonesian Android Community [id-android]" 

2. java issues in mac and window

hi all,


So i opened my android project(from win7 environment) in my mac.

then i have these java problems :

@Override
                public void onFocusChange(View v, boolean hasFocus) {
                        // TODO Auto-generated method stub

                }



@Override
            public void onLocationChanged(Location location) {


        @Override
                public void onClick(View v)
                        {



removing those @override notation solve the issues. why is this
happening in the first place?

who is right? mac or window

thanks!

-- 

3. Possible to display a string or button on top a listview?

4. HTTP Multipart POST: data + text

5. Testing C2DM service on Android 2.2 emulator

6. Call Blocking through ndk or latest sdk

7. How do I write Android.mk for an application using com.google.android.maps.jar