Permalink
Browse files

Fix audio routing issues

Firstly, make input source VOICE_COMMUNICATION work correctly. Notably,
this fixes Android's integrated SIP client.

Secondly, really disable combo device support in libaudio. This
disables the internal speaker for notifications and the like if
headphones are attached.

Change-Id: I6391c5d442594ef2b1852d66f7480964833427bd
  • Loading branch information...
1 parent 3c41837 commit 2c4a270a7e7222d23efdb1ca8a0e6475fb70e0bb @grigorig committed Jan 20, 2013
Showing with 4 additions and 4 deletions.
  1. +1 −1 libaudio/AudioHardware.cpp
  2. +3 −3 prebuilt/system/etc/audio_policy.conf
@@ -1322,7 +1322,7 @@ status_t AudioHardware::doRouting(AudioStreamInMSM72xx *input)
} else if (outputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT) {
ALOGI("Routing audio to Bluetooth PCM\n");
new_snd_device = SND_DEVICE_CARKIT;
-#ifdef COMBO_DEVICE_SUPPORTED
+#if defined(COMBO_DEVICE_SUPPORTED) && COMBO_DEVICE_SUPPORTED
} else if ((outputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADSET) &&
(outputDevices & AudioSystem::DEVICE_OUT_SPEAKER)) {
ALOGI("Routing audio to Wired Headset and Speaker\n");
@@ -5,7 +5,7 @@
global_configuration {
attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER
default_output_device AUDIO_DEVICE_OUT_SPEAKER
- attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC
+ attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_COMMUNICATION
}
# audio hardware module section: contains descriptors for all audio hw modules present on the
@@ -33,9 +33,9 @@ audio_hw_modules {
inputs {
primary {
sampling_rates 8000|11025|16000|22050|32000|44100
- channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
+ channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT
formats AUDIO_FORMAT_PCM_16_BIT
- devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET
+ devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_COMMUNICATION
}
}
}

0 comments on commit 2c4a270

Please sign in to comment.