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. using G1 without network

Is it possible to use the G1 without a sim card if we only intend to use the 
wifi/usb interfaces?

Thanks,
Rob


--~--~---------~--~----~------------~-------~--~----~

2. What is the definitive/official situation regarding native development/JNI?

I would like to know what the definitive, hopefully official,
situation regarding native development.

Whenever anybody posts a question regarding native development the
stock answer that is given is "There is no support for native
development".

I simply want to know the answers to:
1) If I want to write/port a C/C++ application engine and write a Java
App that accesses it, how can this be achieved?


2) If this is not possible, will it be possible in the future? If so
when?


3) Is this is not possible, is it only not possible for 3rd party
developers? If I am a hugh corporation, suppose I'm SAP or Oracle, or
a major international games developer and have multi-million selling
products in C/C++ that I wish to port to Android, are Google going to
tell me sorry its not possibe? Are they really going to say that? If
not then who do you talk to in order to open doors?

--~--~---------~--~----~------------~-------~--~----~

3. What is the definitive/official situation regarding native development/JNI?

4. Announcing new documents for OpenCORE

5. Application did not load to market place now the app is gone, please help

6. Is it possible to have 2 launcher Activity in a single apk?

7. 2 questions about Browser