From 4a5ec30e220b528b55fe78eb7289d36d007d2ce5 Mon Sep 17 00:00:00 2001 From: Weiguang Ruan Date: Thu, 13 Apr 2017 06:48:56 +0000 Subject: PD#140560: bt: set module pcm args for hfp client bt module pcm args: channel 1, 8k sync, 2048k clock, slave verify pass with p212 board Change-Id: I38fe5ba24efd76ab1373f9493e8963ace0050a8b --- 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; -- cgit