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. suggestion about time interval selection

On the time selection GUI element it would be nice to hold the up or
down arrow for the minutes and instead of it going one digit at a
time, it would follow the following behavior:

Digits 1 thru 9 would be one at a time, when 10 was reached a
vibration feedback event would happen and then it would go by 5's or
10's. If you wanted 43, you would hold the button until 40 was reached
then lift your finger, and tap the up arrow 3 more times to reach 43.

-- 
.

2. Location problem

Hi!!

i am new to android and not being able to display current location on
map so can you provide me the code for
displaying Location with manifest.xml and main.xml...


please reply fast!!!!!
it nis urgent!!!!

--

3. ScrollView question

4. launching picasa from my app

5. Can't achieve focus under cascading framelayouts!

6. LocationListener sometimes not receiving updates from "network" provider

7. Unit Testing - Activity shutdown