diff options
| author | Zhao Xuewen <zhaoxuewen@huawei.com> | 2015-09-18 19:07:35 +0800 |
|---|---|---|
| committer | Chenjie Luo <cjluo@google.com> | 2015-09-28 16:24:27 -0700 |
| commit | 13e0e2facd831d71fb6a2d0021c11203c1a873ff (patch) | |
| tree | 4459ac2a7cab3986b9bac8721847f57297fab079 /src | |
| parent | d9043a8f3fb0c5193572affa7106fe65b12973e3 (diff) | |
| download | android_hardware_broadcom_libbt-13e0e2facd831d71fb6a2d0021c11203c1a873ff.tar.gz android_hardware_broadcom_libbt-13e0e2facd831d71fb6a2d0021c11203c1a873ff.tar.bz2 android_hardware_broadcom_libbt-13e0e2facd831d71fb6a2d0021c11203c1a873ff.zip | |
Bluetooth:config SCO seting for HFP call
1, enable SCO_USE_I2S_INTERFACE for sturgeon
2, configure audio configuration in hw_sco_config for I2S as SCO_CODEC_CVSD by default
BUG=24044548
Change-Id: Id39102ee812eb2b173dfab45f4fb97fd99c5e7b8
Signed-off-by: z00184990 <z00184990@notesmail.huawei.com>
Diffstat (limited to 'src')
| -rwxr-xr-x | src/hardware.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/hardware.c b/src/hardware.c index b97d5f1..bf59896 100755 --- a/src/hardware.c +++ b/src/hardware.c @@ -1292,8 +1292,28 @@ void hw_sco_config(void) * and FM on the same PCM pins, we defer Bluetooth audio (SCO/eSCO) * configuration till SCO/eSCO is being established; * i.e. in hw_set_audio_state() call. + * When configured as I2S only, Bluetooth audio configuration is executed + * immediately with SCO_CODEC_CVSD by default. */ + if (SCO_INTERFACE_I2S == sco_bus_interface) { + HC_BT_HDR *p_buf = NULL; + uint16_t cmd_u16 = HCI_CMD_PREAMBLE_SIZE + SCO_I2SPCM_PARAM_SIZE; + + if (bt_vendor_cbacks) + p_buf = (HC_BT_HDR *)bt_vendor_cbacks->alloc(BT_HC_HDR_SIZE + cmd_u16); + + if (p_buf) { + p_buf->event = MSG_STACK_TO_HC_HCI_CMD; + p_buf->offset = 0; + p_buf->layer_specific = 0; + p_buf->len = cmd_u16; + hw_sco_i2spcm_config(p_buf, SCO_CODEC_CVSD); + } else { + ALOGE("Cannot allocate memory for p_buf in hw_sco_config sco config"); + } + } + if (bt_vendor_cbacks) { bt_vendor_cbacks->scocfg_cb(BT_VND_OP_RESULT_SUCCESS); |
