summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioSystem.cpp
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2010-05-26 00:55:46 -0700
committerEric Laurent <elaurent@google.com>2010-05-26 01:13:36 -0700
commitc6ea35372854521ea059eccaba5958a920228959 (patch)
tree1b785849be918f429d7916e1313eee7bc048437e /media/libmedia/AudioSystem.cpp
parenta14aded514540578b7024918c82c81810622a91a (diff)
downloadframeworks_base-c6ea35372854521ea059eccaba5958a920228959.zip
frameworks_base-c6ea35372854521ea059eccaba5958a920228959.tar.gz
frameworks_base-c6ea35372854521ea059eccaba5958a920228959.tar.bz2
Fix issue 2712130: Sholes: problem when playing audio while recording over bluetooth SCO.
The problem is that when an input stream is opened for record over bluetooth SCO, the kernel mono audio device should be opened in RW mode to allow further use of this same device by an output stream also routed to bluetooth SCO. This does not happen because of a bug in AudioSystem::isBluetoothScoDevice() that does not return true when the device is DEVICE_IN_BLUETOOTH_SCO_HEADSET (input device for blurtooth SCO). Change-Id: I9100e972931d8142295c7d64ec06e31304407586
Diffstat (limited to 'media/libmedia/AudioSystem.cpp')
-rw-r--r--media/libmedia/AudioSystem.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 5e6ce42..4478abd 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -721,7 +721,8 @@ bool AudioSystem::isBluetoothScoDevice(audio_devices device)
if ((popCount(device) == 1 ) &&
(device & (AudioSystem::DEVICE_OUT_BLUETOOTH_SCO |
AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_HEADSET |
- AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT))) {
+ AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT |
+ AudioSystem::DEVICE_IN_BLUETOOTH_SCO_HEADSET))) {
return true;
} else {
return false;