summaryrefslogtreecommitdiff
authorLarson Jiang <larson.jiang@amlogic.com>2017-04-21 05:25:44 (GMT)
committer Gerrit Code Review <gituser@git.myamlogic.com>2017-04-21 05:25:44 (GMT)
commit95a08b945f084752f3855ecfe8bd563c2de839e7 (patch)
tree9a06801891a808aa800c9d122fcbc6a3428b3043
parentfa5ec2e4c603ff6850081582678785df7ed52712 (diff)
parent4a5ec30e220b528b55fe78eb7289d36d007d2ce5 (diff)
downloadlibbt-95a08b945f084752f3855ecfe8bd563c2de839e7.zip
libbt-95a08b945f084752f3855ecfe8bd563c2de839e7.tar.gz
libbt-95a08b945f084752f3855ecfe8bd563c2de839e7.tar.bz2
Merge "PD#140560: bt: set module pcm args for hfp client" into m-amlogic
Diffstat
-rwxr-xr-xsrc/hardware.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hardware.c b/src/hardware.c
index ea1a41e..251952a 100755
--- a/src/hardware.c
+++ b/src/hardware.c
@@ -46,6 +46,7 @@
#include "userial.h"
#include "userial_vendor.h"
#include "upio.h"
+#define BTM_SCO_CODEC_CVSD 0x0001
/******************************************************************************
** Constants & Macros
@@ -1246,6 +1247,7 @@ void hw_lpm_set_wake_state(uint8_t wake_assert)
** Returns None
**
*******************************************************************************/
+static int hw_set_SCO_codec(uint16_t codec);
void hw_sco_config(void)
{
if (SCO_INTERFACE_I2S == sco_bus_interface)
@@ -1284,6 +1286,8 @@ void hw_sco_config(void)
* i.e. in hw_set_audio_state() call.
*/
+ hw_set_SCO_codec(BTM_SCO_CODEC_CVSD);
+
if (bt_vendor_cbacks)
{
bt_vendor_cbacks->scocfg_cb(BT_VND_OP_RESULT_SUCCESS);
@@ -1422,6 +1426,7 @@ static int hw_set_SCO_codec(uint16_t codec)
/* Disable mSBC */
*p++ = (SCO_CODEC_PARAM_SIZE); /* set the parameter size */
UINT8_TO_STREAM(p,0); /* disable */
+ UINT16_TO_STREAM(p, codec);
/* set the totall size of this packet */
p_buf->len = HCI_CMD_PREAMBLE_SIZE + SCO_CODEC_PARAM_SIZE;