From e44a5bf719cf1038bf5301ab1849bd9f505c4936 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 9 May 2014 11:31:25 +0300 Subject: [PATCH] android/handsfree: Fix always setting BT_VOICE If codec negotication is not supported just skip setting BT_VOICE. --- android/handsfree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/handsfree.c b/android/handsfree.c index b3926f330..1effb0582 100644 --- a/android/handsfree.c +++ b/android/handsfree.c @@ -896,8 +896,9 @@ static bool connect_sco(void) if (device.sco) return false; - if ((device.features & HFP_HF_FEAT_CODEC) && - device.negotiated_codec != CODEC_ID_CVSD) + if (!(device.features & HFP_HF_FEAT_CODEC)) + voice_settings = 0; + else if (device.negotiated_codec != CODEC_ID_CVSD) voice_settings = BT_VOICE_TRANSPARENT; else voice_settings = BT_VOICE_CVSD_16BIT; -- 2.47.3