projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0de0f49
)
handsfree-audio: Tweak logic a bit
author
Denis Kenzior
<denkenz@gmail.com>
Thu, 12 Sep 2013 18:07:33 +0000
(13:07 -0500)
committer
Denis Kenzior
<denkenz@gmail.com>
Thu, 12 Sep 2013 18:17:40 +0000
(13:17 -0500)
src/handsfree-audio.c
patch
|
blob
|
history
diff --git
a/src/handsfree-audio.c
b/src/handsfree-audio.c
index
c311b04
..
adb8f73
100644
(file)
--- a/
src/handsfree-audio.c
+++ b/
src/handsfree-audio.c
@@
-82,13
+82,13
@@
static ofono_bool_t apply_settings_from_codec(int fd, uint8_t codec)
{
struct bt_voice voice;
- /* CVSD is the default, no need to set BT_VOICE. */
- if (codec == HFP_CODEC_CVSD)
- return TRUE;
-
memset(&voice, 0, sizeof(voice));
voice.setting = codec2setting(codec);
+ /* CVSD is the default, no need to set BT_VOICE. */
+ if (voice.setting == BT_VOICE_CVSD_16BIT)
+ return TRUE;
+
if (setsockopt(fd, SOL_BLUETOOTH, BT_VOICE, &voice, sizeof(voice)) < 0)
return FALSE;