About getting audio streams to A2DP headphone and Headphone

by Rangan » Wed, 16 Sep 2009 00:57:26 GMT

Sponsored Links
 Dear All,

There is a function setRouting to set the audio for a specified mode.
                   public void setRouting (int mode, int routes, int

The parameters for the routes are:
      int ROUTE_BLUETOOTH This constant is deprecated. use
      int ROUTE_BLUETOOTH_A2DP Routing audio output to bluetooth
      int ROUTE_BLUETOOTH_SCO Routing audio output to bluetooth SCO
      int ROUTE_EARPIECE Routing audio output to earpiece
      int ROUTE_HEADSET Routing audio output to headset
      int ROUTE_SPEAKER Routing audio output to speaker
Using the OR of these parameters, theoritically we should be able to
get the routing to 2 routes. For eg. if we need blue tooth A2DP
headphone and Speaker, we should be able to achieve it using

Bu it does not work as expected on say HTC phones. It will just stay
with A2DP headphone which means, it is most likely a MIPS issue as
well and the Android system default is built this way. Am I right?

Any idea on what other ways we can achieve streaming to A2DP headphone
and also to have the same stream or different stream locally played
back on speakers.


Other Threads

1. help me:Compile the android kernel for the Emulator

My platform:   CentOS 5.3
compilor:       arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-
android sdk 1.5  jdk1.6
elipse 3.4
 /home/nature/Software/arm-2009q1(untar the packege directory)

1,  get the kernel:  git clone git://android.git.kernel.org/kernel/common.git
3, yum update
2, I check the tools according the kernel/Documentation/Changes
install the missed software.
3, $emulator -avd myavd1.5(my avd name is myavd1.5)   //running the
   $cd /home/nature/Program/common
   $adb pull /proc/config.gz .
   $gunzip config.gz
  $mv config  .config
  $gedit Makefile

  change two points:

1>   CROSS_COMPILE = /home/nature/Software/arm-2009q1/arm-none-linux-

#LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
#                             $(call ld-option, -Wl$(comma)--build-id,))

exit the gedit back in the old terminal.
$export PATH=$PATH:/home/nature/Software/arm-2009q1/bin
$export ARCH=arm
$make oldconfig
List some options. All are default.
Produce the zImage in the common/arch/arm/boot/
In the compile, no error output.
$emulator @myavd1.5 -kernel /home/nature/Program/common/arch/arm/boot/

Nothing output.

In the another terminal
#ps -a
  PID TTY          TIME CMD
 5242 pts/1    00:00:00 su
 5246 pts/1    00:00:00 bash
20676 pts/2    00:00:04 emulator
20681 pts/2    00:00:00 java <defunct>
20697 pts/1    00:00:00 ps

I don't know why is it?
who can help me?
unsubscribe: android-kernel+unsubscr...@googlegroups.com

2. Help me: Compile 2.6.29 for Htc Hero


I would like to build a 2.6.29 kernel for Hero for us to run properly
Donut roms.

Here is my progress so far:

- I have sync the android kernel msm from git.
# git clone git://android.git.kernel.org/kernel/msm.git
# cd msm
# git checkout --track -b android-msm-2.6.29 origin/android-msm-2.6.27
- then:
# adb pull config.gz ./
# gunzip config.gz && mv config .config
# make PATH=$PATH:android-1.6_r1/prebuilt/linux-x86/toolchain/arm-
eabi-4.2.1/bin ARCH=arm SUBARCH=arm CROSS_COMPILE=arm-eabi-

But no luck: it asks me questions to configure the kernel (error
in .config?)

I copied the hero .config file to kernel root, then "make menuconfig"
and loaded .config, then exit and yes to "write .config" question.
Make failed.

I then applied TigerTael sapphire patch (http://forum.xda-
developers.com/showthread.php?t=553350) as he "tends to think the
memory locations may be correct". Tried to manually load
hero's .config and got error compiling.

I then "make msm_defconfig" and could compile a kernel. But no luck it
does not work and adb logcat waits for device.... while I am waiting
for advices. (anyway to debug kernel ?)


unsubscribe: android-kernel+unsubscr...@googlegroups.com

3. activity leaked a window

4. Chosse the connection interface before sending request?

5. Auto answer calls and hangup programmetically

6. ActivityManager.restartPackage() and syncing - Sync on StatusBar remains after killing

7. Persistent data even when app uninstalled