audio: Fix BT sample rate handling properly
This should now support both old and new headsets,
as we rely on codec negotiation in the bluetooth
stack for narrow/wide band switching.
Change-Id: Ie9d308dfc55726fd1591a7d158f610bd267340e6
(cherry picked from commit d462f7b86e957f858959ef5d80fd1744689ee6ea)
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 169f5c7..c050dd5 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -4139,11 +4139,8 @@
value,
sizeof(value));
if (ret >= 0) {
- /* TODO: Add support in voice calls */
if (strcmp(value, AUDIO_PARAMETER_VALUE_ON) == 0) {
adev->voice.bluetooth_wb = true;
- ALOGI("%s: Implement support for BT SCO wideband calls!!!",
- __func__);
} else {
adev->voice.bluetooth_wb = false;
}
@@ -4553,6 +4550,7 @@
adev->voice.volume = 1.0f;
adev->voice.bluetooth_nrec = true;
adev->voice.in_call = false;
+ adev->voice.bluetooth_wb = false;
/* adev->cur_hdmi_channels = 0; by calloc() */
adev->snd_dev_ref_cnt = calloc(SND_DEVICE_MAX, sizeof(int));