From 5f3ccdc426ae00d6caacc33810d373ac2f1a4d50 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Thu, 21 Oct 2010 11:49:45 -0700 Subject: Fix issue 3119463. There is no call audio uplink when headphones w/o mic are connected. This change together with a corresponding change in the kernel driver adds a separate device for headphonjes without mic: output is routed to headphones and input is routed from built-in mic. Change-Id: I19955f76ece19f661ae25d6a42bbcbe235a9e652 --- libaudio/AudioHardwareALSA.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libaudio') diff --git a/libaudio/AudioHardwareALSA.cpp b/libaudio/AudioHardwareALSA.cpp index db2a767..45223f3 100755 --- a/libaudio/AudioHardwareALSA.cpp +++ b/libaudio/AudioHardwareALSA.cpp @@ -118,7 +118,7 @@ static const char *deviceSuffix[] = { /* ROUTE_EARPIECE */ "_Earpiece", /* ROUTE_SPEAKER */ "_Speaker", /* ROUTE_HEADSET */ "_Headset", - /* ROUTE_HEADPHONE */ "_Headset", + /* ROUTE_HEADPHONE */ "_Headphone", /* ROUTE_BLUETOOTH_SCO */ "_Bluetooth", /* ROUTE_BLUETOOTH_SCO_HEADSET */ "_Bluetooth", /* ROUTE_BLUETOOTH_SCO_CARKIT */ "_Bluetooth", //"_Bluetooth_Carkit" @@ -333,7 +333,6 @@ status_t AudioHardwareALSA::setVoiceVolume(float volume) LOGI("### route(%d) call volume(%f)", routes, volume); switch (routes) { case AudioSystem::ROUTE_EARPIECE: - case AudioSystem::ROUTE_HEADPHONE: // Use receive path with 3 pole headset. LOGI("### earpiece call volume"); setCallVolume(mRilClient, SOUND_TYPE_VOICE, int_volume); break; @@ -352,6 +351,7 @@ status_t AudioHardwareALSA::setVoiceVolume(float volume) break; case AudioSystem::ROUTE_HEADSET: + case AudioSystem::ROUTE_HEADPHONE: // Use receive path with 3 pole headset. LOGI("### headset call volume"); setCallVolume(mRilClient, SOUND_TYPE_HEADSET, int_volume); break; -- cgit v1.1