summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-08-02 00:54:23 -0700
committerEthan Chen <intervigil@gmail.com>2013-08-02 01:34:51 -0700
commit10b999d68cf2535cd5f7a4df3b20d801c8f09fe0 (patch)
tree3b7dc9fa6141cfb496f250ed10d99d7d3c227f62
parent382f7fb0f87989dfa109913c34e3ef1ae32b452d (diff)
downloadexternal_bluetooth_bluedroid-10b999d68cf2535cd5f7a4df3b20d801c8f09fe0.zip
external_bluetooth_bluedroid-10b999d68cf2535cd5f7a4df3b20d801c8f09fe0.tar.gz
external_bluetooth_bluedroid-10b999d68cf2535cd5f7a4df3b20d801c8f09fe0.tar.bz2
Add I2S-PCM slave mode for SCO
* M7 needs us to configure I2SPCM for SCO and set the voice mode. Change-Id: I98a9528af62f9c4fef075927f00a8aafdbeb4ee3
-rw-r--r--bta/ag/bta_ag_sco.c7
-rwxr-xr-xinclude/bt_target.h4
2 files changed, 11 insertions, 0 deletions
diff --git a/bta/ag/bta_ag_sco.c b/bta/ag/bta_ag_sco.c
index 0c811b4..b9daa77 100644
--- a/bta/ag/bta_ag_sco.c
+++ b/bta/ag/bta_ag_sco.c
@@ -552,6 +552,13 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig)
p_scb->inuse_codec = esco_codec;
#endif
+#if (I2SPCM_SLAVE_BRCM == TRUE )
+ /* Configure I2SPCM slave path */
+ UINT8 cmd_buf[4] = { 0, 0, 0, 1 };
+ BTM_VendorSpecificCommand(109, 4, (UINT8 *)&cmd_buf, 0);
+ BTM_WriteVoiceSettings (BTM_VOICE_SETTING_CVSD);
+#endif
+
#if (BTM_SCO_HCI_INCLUDED == TRUE )
/* initialize SCO setup, no voice setting for AG, data rate <==> sample rate */
BTM_ConfigScoPath(sco_route, bta_ag_sco_read_cback, NULL, TRUE);
diff --git a/include/bt_target.h b/include/bt_target.h
index 836868e..654d34b 100755
--- a/include/bt_target.h
+++ b/include/bt_target.h
@@ -54,6 +54,10 @@
//------------------Added from Bluedroid buildcfg.h---------------------
+#ifndef I2SPCM_SLAVE_BRCM
+#define I2SPCM_SLAVE_BRCM FALSE
+#endif
+
#ifndef UNV_INCLUDED
#define UNV_INCLUDED FALSE
#endif