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. Resource files XML imports

Hi,

Does android resource files for values and layouts have any way to
import other xml files.

This is a good approach for products, where there is a core module and
many sub modules. The Submodule may also use some of the core defined
key value pairs etc.

Also, in case with a module, if the view is very complex.. better to
manage them as different xml's.

Are there any other approach to handle this.. by way R inheritance
etc.. I suppose only one R supported per application..

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
--~--~---------~--~----~------------~-------~--~----~

2. android.graphics.Camera is stable in SDK 1.0?

Hi guys,

anyone knows whether the android.graphics.Camera is stable in the 1.0
SDK ?

I thinking not, because the documentation is still not there:
http://code.google.com/intl/de/android/reference/android/graphics/Camera.html

...and I remember running in some deadlocks, when using it for some
time.

Best Regards,
plusminus
--~--~---------~--~----~------------~-------~--~----~

3. Geocoder county code started to return NULL

4. Android emulator Interface

5. Opencore in Windows?

6. highlight the focused item on list view.

7. I want to emulate the simple listview's rows