author | Weiguang Ruan <Weiguang.ruan@amlogic.com> | 2017-04-13 06:48:56 (GMT) |
---|---|---|
committer | Weiguang Ruan <Weiguang.ruan@amlogic.com> | 2017-04-13 06:53:06 (GMT) |
commit | 4a5ec30e220b528b55fe78eb7289d36d007d2ce5 (patch) | |
tree | f32b7789563d9cecfb7bae81d3634e6e1701de24 | |
parent | 732b0aa481ff6e49c47becfbe70b379a1fb75c84 (diff) | |
download | libbt-4a5ec30e220b528b55fe78eb7289d36d007d2ce5.zip libbt-4a5ec30e220b528b55fe78eb7289d36d007d2ce5.tar.gz libbt-4a5ec30e220b528b55fe78eb7289d36d007d2ce5.tar.bz2 |
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
-rwxr-xr-x | src/hardware.c | 5 |
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; |