diff options
author | Mattias Agren <magren@broadcom.com> | 2012-03-26 08:25:00 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-14 11:19:13 -0700 |
commit | 254588bfe6c3e70625b0f725b908598f30f476c8 (patch) | |
tree | 259c87422e70b74abeab96b3e3155c88791e5b6d /btif/co | |
parent | 3e6f399bdbaca7f8ab0a8b1c6eab7cc1088ab74a (diff) | |
download | external_bluetooth_bluedroid-254588bfe6c3e70625b0f725b908598f30f476c8.zip external_bluetooth_bluedroid-254588bfe6c3e70625b0f725b908598f30f476c8.tar.gz external_bluetooth_bluedroid-254588bfe6c3e70625b0f725b908598f30f476c8.tar.bz2 |
Added new control and data path interface between audioflinger a2dp HAL
and stack. Added support for suspend and a dedicated HAL callback
notifying framework on audiopath events. Cleanup.
Change-Id: I3b738611bc8e1d84794f7207413fd9e7dd1fc668
Diffstat (limited to 'btif/co')
-rw-r--r-- | btif/co/bta_ag_co.c | 68 | ||||
-rw-r--r-- | btif/co/bta_av_co.c | 30 | ||||
-rw-r--r-- | btif/co/bta_dm_co.c | 108 | ||||
-rw-r--r-- | btif/co/bta_fs_co.c | 190 | ||||
-rw-r--r-- | btif/co/bta_sys_co.c | 68 |
5 files changed, 235 insertions, 229 deletions
diff --git a/btif/co/bta_ag_co.c b/btif/co/bta_ag_co.c index ec1d5bb..92c96c3 100644 --- a/btif/co/bta_ag_co.c +++ b/btif/co/bta_ag_co.c @@ -3,44 +3,44 @@ * Copyright (C) 2009-2011 Broadcom Corporation * * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * licensors, and may only be used, duplicated, modified or distributed + * pursuant to the terms and conditions of a separate, written license + * agreement executed between you and Broadcom (an "Authorized License"). + * Except as set forth in an Authorized License, Broadcom grants no license + * (express or implied), right to use, or waiver of any kind with respect to + * the Software, and Broadcom expressly reserves all rights in and to the + * Software and all intellectual property rights therein. + * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS + * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE + * ALL USE OF THE SOFTWARE. * * Except as expressly set forth in the Authorized License, * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of + * 1. This program, including its structure, sequence and organization, + * constitutes the valuable trade secrets of Broadcom, and you shall + * use all reasonable efforts to protect the confidentiality thereof, + * and to use this information only in connection with your use of * Broadcom integrated circuit products. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR + * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED + * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, + * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, + * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY + * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, + * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, + * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT * OF USE OR PERFORMANCE OF THE SOFTWARE. * * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF + * ITS LICENSORS BE LIABLE FOR + * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY + * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO + * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM + * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR + * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE + * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE + * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. * ************************************************************************************/ @@ -72,8 +72,8 @@ ** Description This callout function is executed by AG when it is ** started by calling BTA_AgEnable(). This function can be ** used by the phone to initialize audio paths or for other -** initialization purposes. -** +** initialization purposes. +** ** ** Returns Void. ** @@ -90,7 +90,7 @@ void bta_ag_co_init(void) ** ** Description This function is called by the AG before the audio connection ** is brought up, after it comes up, and after it goes down. -** +** ** Parameters handle - handle of the AG instance ** state - Audio state ** BTA_AG_CO_AUD_STATE_OFF - Audio has been turned off @@ -115,7 +115,7 @@ void bta_ag_co_audio_state(UINT16 handle, UINT8 app_id, UINT8 state) ** is opened. The phone can use this function to set ** up data paths or perform any required initialization or ** set up particular to the connected service. -** +** ** ** Returns void ** @@ -131,7 +131,7 @@ void bta_ag_co_data_open(UINT16 handle, tBTA_SERVICE_ID service) ** ** Description This function is called by AG when a service level ** connection is closed -** +** ** ** Returns void ** diff --git a/btif/co/bta_av_co.c b/btif/co/bta_av_co.c index 1dbd940..bddde54 100644 --- a/btif/co/bta_av_co.c +++ b/btif/co/bta_av_co.c @@ -21,7 +21,7 @@ #include "btif_media.h" #include "sbc_encoder.h" -#include "btif_av.h" +#include "btif_av_co.h" /***************************************************************************** @@ -216,7 +216,7 @@ static tBTA_AV_CO_PEER *bta_av_co_get_peer(tBTA_AV_HNDL hndl) FUNC_TRACE(); index = BTA_AV_CO_AUDIO_HNDL_TO_INDX(hndl); - APPL_TRACE_ERROR2("%s index:%d", __FUNCTION__, index); + /* Sanity check */ if (index >= BTA_AV_CO_NUM_ELEMENTS(bta_av_co_cb.peers)) { @@ -504,7 +504,7 @@ BTA_API void bta_av_co_audio_setconfig(tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec_ty APPL_TRACE_DEBUG6("bta_av_co_audio_setconfig p_codec_info[%x:%x:%x:%x:%x:%x]", p_codec_info[1], p_codec_info[2], p_codec_info[3], p_codec_info[4], p_codec_info[5], p_codec_info[6]); - APPL_TRACE_DEBUG4("num_protect:0x%02x protect_info:0x%02x%02x%02x", + APPL_TRACE_DEBUG4("num_protect:0x%02x protect_info:0x%02x%02x%02x", num_protect, p_protect_info[0], p_protect_info[1], p_protect_info[2]); /* Retrieve the peer info */ @@ -813,11 +813,15 @@ static BOOLEAN bta_av_co_audio_codec_build_config(const UINT8 *p_codec_caps, UIN { FUNC_TRACE(); - /* By default, just copy the current codec configuration */ - memcpy(p_codec_cfg, bta_av_co_cb.codec_cfg.info, AVDT_CODEC_SIZE); + memset(p_codec_cfg, 0, AVDT_CODEC_SIZE); + switch (bta_av_co_cb.codec_cfg.id) { case BTIF_AV_CODEC_SBC: + /* only copy the relevant portions for this codec to avoid issues when + comparing codec configs covering larger codec sets than SBC (7 bytes) */ + memcpy(p_codec_cfg, bta_av_co_cb.codec_cfg.info, BTA_AV_CO_SBC_MAX_BITPOOL_OFF+1); + /* Update the bit pool boundaries with the codec capabilities */ p_codec_cfg[BTA_AV_CO_SBC_MIN_BITPOOL_OFF] = p_codec_caps[BTA_AV_CO_SBC_MIN_BITPOOL_OFF]; p_codec_cfg[BTA_AV_CO_SBC_MAX_BITPOOL_OFF] = p_codec_caps[BTA_AV_CO_SBC_MAX_BITPOOL_OFF]; @@ -850,10 +854,10 @@ static BOOLEAN bta_av_co_audio_codec_cfg_matches_caps(UINT8 codec_id, const UINT if (!((p_codec_caps[BTA_AV_CO_SBC_FREQ_CHAN_OFF] & p_codec_cfg[BTA_AV_CO_SBC_FREQ_CHAN_OFF]) && (p_codec_caps[BTA_AV_CO_SBC_BLOCK_BAND_OFF] & p_codec_cfg[BTA_AV_CO_SBC_BLOCK_BAND_OFF]))) { - APPL_TRACE_EVENT4("FALSE %x %x %x %x", - p_codec_caps[BTA_AV_CO_SBC_FREQ_CHAN_OFF], - p_codec_cfg[BTA_AV_CO_SBC_FREQ_CHAN_OFF], - p_codec_caps[BTA_AV_CO_SBC_BLOCK_BAND_OFF], + APPL_TRACE_EVENT4("FALSE %x %x %x %x", + p_codec_caps[BTA_AV_CO_SBC_FREQ_CHAN_OFF], + p_codec_cfg[BTA_AV_CO_SBC_FREQ_CHAN_OFF], + p_codec_caps[BTA_AV_CO_SBC_BLOCK_BAND_OFF], p_codec_cfg[BTA_AV_CO_SBC_BLOCK_BAND_OFF]); return FALSE; } @@ -927,7 +931,7 @@ static BOOLEAN bta_av_co_cp_is_scmst(const UINT8 *p_protectinfo) return TRUE; } } - + return FALSE; } @@ -1008,6 +1012,7 @@ static BOOLEAN bta_av_co_audio_peer_supports_codec(tBTA_AV_CO_PEER *p_peer, UINT /* Configure the codec type to look for */ codec_type = bta_av_co_cb.codec_cfg.id; + for (index = 0; index < p_peer->num_sup_snks; index++) { if (p_peer->snks[index].codec_type == codec_type) @@ -1173,6 +1178,7 @@ void bta_av_co_audio_codec_reset(void) /* Reset the current configuration to SBC */ bta_av_co_cb.codec_cfg.id = BTIF_AV_CODEC_SBC; + if (A2D_BldSbcInfo(A2D_MEDIA_TYPE_AUDIO, (tA2D_SBC_CIE *)&btif_av_sbc_default_config, bta_av_co_cb.codec_cfg.info) != A2D_SUCCESS) { APPL_TRACE_ERROR0("bta_av_co_audio_codec_reset A2D_BldSbcInfo failed"); @@ -1311,10 +1317,10 @@ BOOLEAN bta_av_co_audio_get_sbc_config(tA2D_SBC_CIE *p_sbc_config, UINT16 *p_min { /* Update the bitpool boundaries of the current config */ p_sbc_config->min_bitpool = - BTA_AV_CO_MAX(p_sink->codec_caps[BTA_AV_CO_SBC_MIN_BITPOOL_OFF], + BTA_AV_CO_MAX(p_sink->codec_caps[BTA_AV_CO_SBC_MIN_BITPOOL_OFF], p_sbc_config->min_bitpool); p_sbc_config->max_bitpool = - BTA_AV_CO_MIN(p_sink->codec_caps[BTA_AV_CO_SBC_MAX_BITPOOL_OFF], + BTA_AV_CO_MIN(p_sink->codec_caps[BTA_AV_CO_SBC_MAX_BITPOOL_OFF], p_sbc_config->max_bitpool); break; } diff --git a/btif/co/bta_dm_co.c b/btif/co/bta_dm_co.c index b4c893c..da9a5ce 100644 --- a/btif/co/bta_dm_co.c +++ b/btif/co/bta_dm_co.c @@ -3,44 +3,44 @@ * Copyright (C) 2009-2011 Broadcom Corporation * * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * licensors, and may only be used, duplicated, modified or distributed + * pursuant to the terms and conditions of a separate, written license + * agreement executed between you and Broadcom (an "Authorized License"). + * Except as set forth in an Authorized License, Broadcom grants no license + * (express or implied), right to use, or waiver of any kind with respect to + * the Software, and Broadcom expressly reserves all rights in and to the + * Software and all intellectual property rights therein. + * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS + * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE + * ALL USE OF THE SOFTWARE. * * Except as expressly set forth in the Authorized License, * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of + * 1. This program, including its structure, sequence and organization, + * constitutes the valuable trade secrets of Broadcom, and you shall + * use all reasonable efforts to protect the confidentiality thereof, + * and to use this information only in connection with your use of * Broadcom integrated circuit products. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR + * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED + * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, + * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, + * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY + * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, + * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, + * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT * OF USE OR PERFORMANCE OF THE SOFTWARE. * * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF + * ITS LICENSORS BE LIABLE FOR + * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY + * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO + * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM + * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR + * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE + * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE + * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. * ************************************************************************************/ @@ -81,7 +81,7 @@ BOOLEAN bta_dm_co_get_compress_memory(tBTA_SYS_ID id, UINT8 **memory_p, UINT32 * ** Parameters bd_addr - The peer device ** *p_io_cap - The local Input/Output capabilities ** *p_oob_data - TRUE, if OOB data is available for the peer device. -** *p_auth_req - TRUE, if MITM protection is required. +** *p_auth_req - TRUE, if MITM protection is required. ** ** Returns void. ** @@ -101,7 +101,7 @@ void bta_dm_co_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap, tBTA_OOB_DATA *p_o ** Parameters bd_addr - The peer device ** io_cap - The remote Input/Output capabilities ** oob_data - TRUE, if OOB data is available for the peer device. -** auth_req - TRUE, if MITM protection is required. +** auth_req - TRUE, if MITM protection is required. ** ** Returns void. ** @@ -119,7 +119,7 @@ void bta_dm_co_io_rsp(BD_ADDR bd_addr, tBTA_IO_CAP io_cap, ** platform wants allow link key upgrade ** ** Parameters bd_addr - The peer device -** *p_upgrade - TRUE, if link key upgrade is desired. +** *p_upgrade - TRUE, if link key upgrade is desired. ** ** Returns void. ** @@ -175,8 +175,8 @@ void bta_dm_co_rmt_oob(BD_ADDR bd_addr) ** ** Function btui_sco_codec_callback ** -** Description Callback for btui codec. -** +** Description Callback for btui codec. +** ** ** Returns void ** @@ -189,15 +189,15 @@ static void btui_sco_codec_callback(UINT16 event, UINT16 sco_handle) ** ** Function bta_dm_sco_co_init ** -** Description This function can be used by the phone to initialize audio +** Description This function can be used by the phone to initialize audio ** codec or for other initialization purposes before SCO connection -** is opened. -** +** is opened. +** ** ** Returns tBTA_DM_SCO_ROUTE_TYPE: SCO routing configuration type. ** *******************************************************************************/ -tBTA_DM_SCO_ROUTE_TYPE bta_dm_sco_co_init(UINT32 rx_bw, UINT32 tx_bw, +tBTA_DM_SCO_ROUTE_TYPE bta_dm_sco_co_init(UINT32 rx_bw, UINT32 tx_bw, tBTA_CODEC_INFO * p_codec_type, UINT8 app_id) { tBTM_SCO_ROUTE_TYPE route = BTA_DM_SCO_ROUTE_PCM; @@ -236,7 +236,7 @@ tBTA_DM_SCO_ROUTE_TYPE bta_dm_sco_co_init(UINT32 rx_bw, UINT32 tx_bw, ** Function bta_dm_sco_co_open ** ** Description This function is executed when a SCO connection is open. -** +** ** ** Returns void ** @@ -264,7 +264,7 @@ void bta_dm_sco_co_open(UINT16 handle, UINT8 pkt_size, UINT16 event) ** Function bta_dm_sco_co_close ** ** Description This function is called when a SCO connection is closed -** +** ** ** Returns void ** @@ -285,7 +285,7 @@ void bta_dm_sco_co_close(void) ** ** Function bta_dm_sco_co_in_data ** -** Description This function is called to send incoming SCO data to application. +** Description This function is called to send incoming SCO data to application. ** ** Returns void ** @@ -302,13 +302,13 @@ void bta_dm_sco_co_in_data(BT_HDR *p_buf) ** ** Function bta_dm_sco_co_out_data ** -** Description This function is called to send SCO data over HCI. +** Description This function is called to send SCO data over HCI. ** ** Returns void ** *******************************************************************************/ void bta_dm_sco_co_out_data(BT_HDR **p_buf) -{ +{ btui_sco_codec_readbuf(p_buf); } @@ -326,20 +326,20 @@ void bta_dm_sco_co_out_data(BT_HDR **p_buf) ** Parameters bd_addr - The peer device ** *p_max_key_size - max key size local device supported. ** *p_init_key - initiator keys. -** *p_resp_key - responder keys. +** *p_resp_key - responder keys. ** ** Returns void. ** *******************************************************************************/ -void bta_dm_co_le_io_key_req(BD_ADDR bd_addr, UINT8 *p_max_key_size, - tBTA_LE_KEY_TYPE *p_init_key, +void bta_dm_co_le_io_key_req(BD_ADDR bd_addr, UINT8 *p_max_key_size, + tBTA_LE_KEY_TYPE *p_init_key, tBTA_LE_KEY_TYPE *p_resp_key ) { BTIF_TRACE_ERROR0("##################################"); BTIF_TRACE_ERROR0("bta_dm_co_le_io_key_req: only setting max size to 16"); BTIF_TRACE_ERROR0("##################################"); *p_max_key_size = 16; - *p_init_key = *p_resp_key = + *p_init_key = *p_resp_key = (BTA_LE_KEY_PENC|BTA_LE_KEY_PID|BTA_LE_KEY_PCSRK|BTA_LE_KEY_LENC|BTA_LE_KEY_LID|BTA_LE_KEY_LCSRK); } @@ -351,7 +351,7 @@ void bta_dm_co_le_io_key_req(BD_ADDR bd_addr, UINT8 *p_max_key_size, ** Description This callout function is to load the local BLE keys if available ** on the device. ** -** Parameters none +** Parameters none ** ** Returns void. ** @@ -374,22 +374,22 @@ void bta_dm_co_ble_load_local_keys(tBTA_DM_BLE_LOCAL_KEY_MASK *p_key_mask, BT_OC ** Parameters bd_addr - The peer device ** *p_io_cap - The local Input/Output capabilities ** *p_oob_data - TRUE, if OOB data is available for the peer device. -** *p_auth_req - Auth request setting (Bonding and MITM required or not) +** *p_auth_req - Auth request setting (Bonding and MITM required or not) ** *p_max_key_size - max key size local device supported. ** *p_init_key - initiator keys. -** *p_resp_key - responder keys. +** *p_resp_key - responder keys. ** ** Returns void. ** *******************************************************************************/ -void bta_dm_co_ble_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap, +void bta_dm_co_ble_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap, tBTA_OOB_DATA *p_oob_data, tBTA_LE_AUTH_REQ *p_auth_req, - UINT8 *p_max_key_size, - tBTA_LE_KEY_TYPE *p_init_key, + UINT8 *p_max_key_size, + tBTA_LE_KEY_TYPE *p_init_key, tBTA_LE_KEY_TYPE *p_resp_key ) { - /* if OOB is not supported, this call-out function does not need to do anything + /* if OOB is not supported, this call-out function does not need to do anything * otherwise, look for the OOB data associated with the address and set *p_oob_data accordingly * If the answer can not be obtained right away, * set *p_oob_data to BTA_OOB_UNKNOWN and call bta_dm_ci_io_req() when the answer is available */ diff --git a/btif/co/bta_fs_co.c b/btif/co/bta_fs_co.c index 9b0ab0a..0ba35bd 100644 --- a/btif/co/bta_fs_co.c +++ b/btif/co/bta_fs_co.c @@ -3,44 +3,44 @@ * Copyright (C) 2009-2011 Broadcom Corporation * * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * licensors, and may only be used, duplicated, modified or distributed + * pursuant to the terms and conditions of a separate, written license + * agreement executed between you and Broadcom (an "Authorized License"). + * Except as set forth in an Authorized License, Broadcom grants no license + * (express or implied), right to use, or waiver of any kind with respect to + * the Software, and Broadcom expressly reserves all rights in and to the + * Software and all intellectual property rights therein. + * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS + * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE + * ALL USE OF THE SOFTWARE. * * Except as expressly set forth in the Authorized License, * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of + * 1. This program, including its structure, sequence and organization, + * constitutes the valuable trade secrets of Broadcom, and you shall + * use all reasonable efforts to protect the confidentiality thereof, + * and to use this information only in connection with your use of * Broadcom integrated circuit products. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR + * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED + * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, + * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, + * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY + * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, + * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, + * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT * OF USE OR PERFORMANCE OF THE SOFTWARE. * * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF + * ITS LICENSORS BE LIABLE FOR + * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY + * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO + * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM + * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR + * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE + * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE + * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. * ************************************************************************************/ @@ -86,7 +86,7 @@ extern const tBTA_PBS_CFG bta_pbs_cfg; -static int del_path (const char *path) +static int del_path (const char *path) { DIR *dir; struct dirent *de; @@ -107,7 +107,7 @@ static int del_path (const char *path) strcat(nameBuffer, "/"); int nameLen = strlen(nameBuffer); filenameOffset = nameBuffer + nameLen; - + for (;;) { de = readdir(dir); @@ -117,15 +117,15 @@ static int del_path (const char *path) break; } - if (0 == strcmp(de->d_name, ".") || 0 == strcmp(de->d_name, "..")) + if (0 == strcmp(de->d_name, ".") || 0 == strcmp(de->d_name, "..")) continue; - + if((int)strlen(de->d_name) > PATH_MAX - nameLen) { BTIF_TRACE_DEBUG1("d_name len:%d is too big", strlen(de->d_name)); ret = -1; break; } - + strcpy(filenameOffset, de->d_name); ret = lstat (nameBuffer, &statBuffer); @@ -154,18 +154,18 @@ static int del_path (const char *path) ret = rmdir(path); BTIF_TRACE_DEBUG2("rmdir return:%d for path:%s", ret, path); } - + return ret; } -inline int getAccess(int accType, struct stat *buffer, char *p_path) +inline int getAccess(int accType, struct stat *buffer, char *p_path) { struct statfs fsbuffer; int idType; - if(! buffer) + if(! buffer) return BTA_FS_CO_FAIL; //idType= (buffer->st_uid== BT_UID) ? 1 : (buffer->st_uid== BT_GID) ? 2 : 3; @@ -178,7 +178,7 @@ inline int getAccess(int accType, struct stat *buffer, char *p_path) idType = 2; else idType = 3; - if(statfs(p_path, &fsbuffer)==0) + if(statfs(p_path, &fsbuffer)==0) { if(fsbuffer.f_type == FAT_FS) return BTA_FS_CO_OK; @@ -186,43 +186,43 @@ inline int getAccess(int accType, struct stat *buffer, char *p_path) else { return BTA_FS_CO_FAIL; } - + switch(accType) { case 4: if(idType== 1) { //Id is User Id - if(buffer-> st_mode & S_IRUSR) + if(buffer-> st_mode & S_IRUSR) return BTA_FS_CO_OK; } else if(idType==2) { //Id is Group Id - if(buffer-> st_mode & S_IRGRP) + if(buffer-> st_mode & S_IRGRP) return BTA_FS_CO_OK; } else { //Id is Others - if(buffer-> st_mode & S_IROTH) + if(buffer-> st_mode & S_IROTH) return BTA_FS_CO_OK; } break; case 6: if(idType== 1) { //Id is User Id - if((buffer-> st_mode & S_IRUSR) && (buffer-> st_mode & S_IWUSR)) + if((buffer-> st_mode & S_IRUSR) && (buffer-> st_mode & S_IWUSR)) return BTA_FS_CO_OK; } else if(idType==2) { //Id is Group Id - if((buffer-> st_mode & S_IRGRP) && (buffer-> st_mode & S_IWGRP)) + if((buffer-> st_mode & S_IRGRP) && (buffer-> st_mode & S_IWGRP)) return BTA_FS_CO_OK; } else { //Id is Others - if((buffer-> st_mode & S_IROTH) && (buffer-> st_mode & S_IWOTH)) + if((buffer-> st_mode & S_IROTH) && (buffer-> st_mode & S_IWOTH)) return BTA_FS_CO_OK; } break; - + default: return BTA_FS_CO_OK; - } + } BTIF_TRACE_DEBUG0("*************FTP- Access Failed **********"); - return BTA_FS_CO_EACCES; + return BTA_FS_CO_EACCES; } @@ -347,7 +347,7 @@ static int btapp_fs_check_space( const char *p_path, const UINT32 size, const UI ** of the call-out function. ** ** Returns void -** +** ** Note: Upon completion of the request, a file descriptor (int), ** if successful, and an error code (tBTA_FS_CO_STATUS) ** are returned in the call-in function, bta_fs_ci_open(). @@ -366,7 +366,7 @@ void bta_fs_co_open(const char *p_path, int oflags, UINT32 size, UINT16 evt, /* Convert BTA oflags into os specific flags */ oflags = bta_fs_convert_bta_oflags(oflags); - + /* check available space in case of write access. oflags are in OS format! */ if (oflags & (O_RDWR|O_WRONLY)) { @@ -472,7 +472,7 @@ tBTA_FS_CO_STATUS bta_fs_co_close(int fd, UINT8 app_id) ** of the call-out function. ** ** Returns void -** +** ** Note: Upon completion of the request, bta_fs_ci_read() is ** called with the buffer of data, along with the number ** of bytes read into the buffer, and a status. The @@ -518,7 +518,7 @@ void bta_fs_co_read(int fd, UINT8 *p_buf, UINT16 nbytes, UINT16 evt, UINT8 ssn, ** of the call-out function. ** ** Returns void -** +** ** Note: Upon completion of the request, bta_fs_ci_write() is ** called with the file descriptor and the status. The ** call-in function should only be called when ALL requested @@ -547,7 +547,7 @@ void bta_fs_co_write(int fd, const UINT8 *p_buf, UINT16 nbytes, UINT16 evt, ** Function bta_fs_co_seek ** ** Description This function is called by io to move the file pointer -** of a previously opened file to the specified location for +** of a previously opened file to the specified location for ** the next read or write operation. ** ** Parameters fd - file descriptor of file. @@ -555,7 +555,7 @@ void bta_fs_co_write(int fd, const UINT8 *p_buf, UINT16 nbytes, UINT16 evt, ** origin - Initial position. ** ** Returns void -** +** *******************************************************************************/ void bta_fs_co_seek (int fd, INT32 offset, INT16 origin, UINT8 app_id) { @@ -592,28 +592,28 @@ tBTA_FS_CO_STATUS bta_fs_co_access(const char *p_path, int mode, BOOLEAN *p_is_d struct stat buffer; #if (TRUE==BTA_FS_DEBUG) - LOGI("***********CHECKING ACCESS TO = %s", p_path); + LOGI("***********CHECKING ACCESS TO = %s", p_path); #endif - #if (defined BTA_PBS_INCLUDED) && (BTA_PBS_INCLUDED == TRUE) + #if (defined BTA_PBS_INCLUDED) && (BTA_PBS_INCLUDED == TRUE) if (app_id == UI_PBS_ID) { - + *p_is_dir = TRUE; #if (TRUE==BTA_FS_DEBUG) - LOGI("***********SUPPORTED REPO = %d", bta_pbs_cfg.supported_repositories); + LOGI("***********SUPPORTED REPO = %d", bta_pbs_cfg.supported_repositories); #endif - //Check if SIM contact requested, and if so if it's supported. + //Check if SIM contact requested, and if so if it's supported. //If not, return error! if (strstr(p_path,"SIM1") && !(bta_pbs_cfg.supported_repositories & 0x2)) { - LOGI("***********RETURNING FAIL!"); + LOGI("***********RETURNING FAIL!"); return BTA_FS_CO_FAIL; } #if (TRUE==BTA_FS_DEBUG) - LOGI("***********RETURNING success!"); + LOGI("***********RETURNING success!"); #endif return (status); } @@ -621,24 +621,24 @@ tBTA_FS_CO_STATUS bta_fs_co_access(const char *p_path, int mode, BOOLEAN *p_is_d *p_is_dir = FALSE; - + if (mode == BTA_FS_ACC_RDWR) os_mode = 6; else if (mode == BTA_FS_ACC_READ) os_mode = 4; - - if (stat(p_path, &buffer) == 0) + + if (stat(p_path, &buffer) == 0) { /* Determine if the object is a file or directory */ if (S_ISDIR(buffer.st_mode)) *p_is_dir = TRUE; } - else + else { BTIF_TRACE_DEBUG0("stat() failed! "); return BTA_FS_CO_FAIL; } - + status=getAccess (os_mode, &buffer, (char*)p_path); return (status); } @@ -701,14 +701,14 @@ tBTA_FS_CO_STATUS bta_fs_co_rmdir(const char *p_path, UINT8 app_id) tBTA_FS_CO_STATUS status = BTA_FS_CO_OK; struct stat buffer; char *dirName, *tmp = NULL; - + path_len = strlen( p_path )+1; BTIF_TRACE_DEBUG2( "bta_fs_co_rmdir( app_id: %d ): path_len: %d", app_id, path_len ); #if (TRUE==BTA_FS_DEBUG) BTIF_TRACE_DEBUG1( "bta_fs_co_rmdir():path_len: %d, p_path", app_id ); BTIF_TRACE_DEBUG0( p_path ); #endif - + /* allocate a temp buffer for path with 0 char. make sure not to crash if path is too big! */ dirName = (char*) calloc(1, path_len+1); if ( NULL != dirName ) @@ -721,7 +721,7 @@ tBTA_FS_CO_STATUS bta_fs_co_rmdir(const char *p_path, UINT8 app_id) app_id, path_len ); return BTA_FS_CO_FAIL; } - + if (NULL!= (tmp = strrchr(dirName, '/'))) { *tmp = '\0'; @@ -738,7 +738,7 @@ tBTA_FS_CO_STATUS bta_fs_co_rmdir(const char *p_path, UINT8 app_id) #endif return BTA_FS_CO_FAIL; } - + free(dirName); if (status != BTA_FS_CO_OK) { @@ -747,7 +747,7 @@ tBTA_FS_CO_STATUS bta_fs_co_rmdir(const char *p_path, UINT8 app_id) #endif return status; } - + if (stat(p_path, &buffer) == 0) { status = getAccess(6, &buffer, (char*)p_path); @@ -759,7 +759,7 @@ tBTA_FS_CO_STATUS bta_fs_co_rmdir(const char *p_path, UINT8 app_id) #endif return BTA_FS_CO_FAIL; } - + if (status != BTA_FS_CO_OK) { #if (TRUE==BTA_FS_DEBUG) @@ -807,37 +807,37 @@ tBTA_FS_CO_STATUS bta_fs_co_unlink(const char *p_path, UINT8 app_id) tBTA_FS_CO_STATUS status = BTA_FS_CO_OK; char *dirName, *tmp=NULL; struct stat buffer; - + if(! p_path) return BTA_FS_CO_FAIL; /* buffer needs to be NULL terminated - so add one more byte to be zero'd out */ -#if 0 +#if 0 dirName= (char*) calloc(1, strlen(p_path)); /* <--- this can cause problems */ -#else +#else dirName= (char*) calloc(1, strlen(p_path) + 1); -#endif - +#endif + strncpy(dirName, p_path, strlen(p_path)); - if((tmp=strrchr(dirName, '/'))) + if((tmp=strrchr(dirName, '/'))) { *tmp='\0'; - } - if (stat(dirName, &buffer) == 0) + } + if (stat(dirName, &buffer) == 0) { status=getAccess (6, &buffer, dirName); free(dirName); } - else + else { BTIF_TRACE_DEBUG0("stat() failed! "); free(dirName); return BTA_FS_CO_FAIL; } - + if(status!= BTA_FS_CO_OK) return status; - + if ((unlink (p_path)) != 0) { err = errno; @@ -869,7 +869,7 @@ tBTA_FS_CO_STATUS bta_fs_co_unlink(const char *p_path, UINT8 app_id) ** of the call-out function. ** ** Returns void -** +** ** Note: Upon completion of the request, the status is passed ** in the bta_fs_ci_direntry() call-in function. ** BTA_FS_CO_OK is returned when p_entry is valid, @@ -996,7 +996,7 @@ void bta_fs_co_getdirentry(const char *p_path, BOOLEAN first_item, ** ** Function bta_fs_co_setdir ** -** Description This function is executed by BTA when the server changes the +** Description This function is executed by BTA when the server changes the ** local path ** ** Parameters p_path - the new path. @@ -1005,7 +1005,7 @@ void bta_fs_co_getdirentry(const char *p_path, BOOLEAN first_item, ** of the call-out function. ** ** Returns void -** +** *******************************************************************************/ void bta_fs_co_setdir(const char *p_path, UINT8 app_id) { @@ -1013,7 +1013,7 @@ void bta_fs_co_setdir(const char *p_path, UINT8 app_id) } /******************************************************************************* -** OBEX14 Reliable Session not supported. Stub associated callouts. +** OBEX14 Reliable Session not supported. Stub associated callouts. ******************************************************************************/ /******************************************************************************* @@ -1029,7 +1029,7 @@ void bta_fs_co_setdir(const char *p_path, UINT8 app_id) ** of the call-out function. ** ** Returns void -** +** ** Note: Upon completion of the request, the related session information, ** if successful, and an error code (tBTA_FS_CO_STATUS) ** are returned in the call-in function, bta_fs_ci_resume(). @@ -1055,7 +1055,7 @@ void bta_fs_co_resume(UINT16 evt, UINT8 app_id) ** ** Returns (tBTA_FS_CO_STATUS) status of the call. ** [BTA_FS_CO_OK if successful] -** [BTA_FS_CO_EACCES if p_dest_path already exists or could not be created (invalid path); +** [BTA_FS_CO_EACCES if p_dest_path already exists or could not be created (invalid path); ** or p_src_path is a directory and p_dest_path specifies a different path. ] ** [BTA_FS_CO_FAIL otherwise] ** @@ -1081,7 +1081,7 @@ void bta_fs_co_set_perms(const char *p_src_path, UINT8 *p_perms, UINT16 evt, UI ** ** Returns (tBTA_FS_CO_STATUS) status of the call. ** [BTA_FS_CO_OK if successful] -** [BTA_FS_CO_EACCES if p_dest_path already exists or could not be created (invalid path); +** [BTA_FS_CO_EACCES if p_dest_path already exists or could not be created (invalid path); ** or p_src_path is a directory and p_dest_path specifies a different path. ] ** [BTA_FS_CO_FAIL otherwise] ** @@ -1109,7 +1109,7 @@ void bta_fs_co_rename(const char *p_src_path, const char *p_dest_path, UINT8 *p_ ** Returns (tBTA_FS_CO_STATUS) status of the call. ** [BTA_FS_CO_OK if successful] ** [BTA_FS_CO_EIS_DIR if p_src_path is a folder] -** [BTA_FS_CO_EACCES if p_dest_path already exists or could not be created (invalid path); +** [BTA_FS_CO_EACCES if p_dest_path already exists or could not be created (invalid path); ** or p_src_path is a directory and p_dest_path specifies a different path. ] ** [BTA_FS_CO_FAIL otherwise] ** @@ -1133,7 +1133,7 @@ void bta_fs_co_copy(const char *p_src_path, const char *p_dest_path, UINT8 *p_pe ** of the call-out function. ** ** Returns void -** +** *******************************************************************************/ void bta_fs_co_resume_op(UINT32 offset, UINT16 evt, UINT8 app_id) { @@ -1155,7 +1155,7 @@ void bta_fs_co_resume_op(UINT32 offset, UINT16 evt, UINT8 app_id) ** of the call-out function. ** ** Returns void -** +** *******************************************************************************/ void bta_fs_co_session_info(BD_ADDR bd_addr, UINT8 *p_sess_info, UINT8 ssn, tBTA_FS_CO_SESS_ST new_st, char *p_path, UINT8 *p_info, UINT8 app_id) @@ -1180,7 +1180,7 @@ void bta_fs_co_session_info(BD_ADDR bd_addr, UINT8 *p_sess_info, UINT8 ssn, ** of the call-out function. ** ** Returns void -** +** *******************************************************************************/ void bta_fs_co_suspend(BD_ADDR bd_addr, UINT8 *p_sess_info, UINT8 ssn, UINT32 *p_timeout, UINT32 *p_offset, UINT8 info, UINT8 app_id) @@ -1203,7 +1203,7 @@ void bta_fs_co_suspend(BD_ADDR bd_addr, UINT8 *p_sess_info, UINT8 ssn, ** of the call-out function. ** ** Returns void -** +** *******************************************************************************/ void bta_fs_co_sess_ssn(int fd, UINT8 ssn, UINT8 app_id) { diff --git a/btif/co/bta_sys_co.c b/btif/co/bta_sys_co.c index 66643bf..a2d0d44 100644 --- a/btif/co/bta_sys_co.c +++ b/btif/co/bta_sys_co.c @@ -3,44 +3,44 @@ * Copyright (C) 2009-2011 Broadcom Corporation * * This program is the proprietary software of Broadcom Corporation and/or its - * licensors, and may only be used, duplicated, modified or distributed - * pursuant to the terms and conditions of a separate, written license - * agreement executed between you and Broadcom (an "Authorized License"). - * Except as set forth in an Authorized License, Broadcom grants no license - * (express or implied), right to use, or waiver of any kind with respect to - * the Software, and Broadcom expressly reserves all rights in and to the - * Software and all intellectual property rights therein. - * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS - * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE - * ALL USE OF THE SOFTWARE. + * licensors, and may only be used, duplicated, modified or distributed + * pursuant to the terms and conditions of a separate, written license + * agreement executed between you and Broadcom (an "Authorized License"). + * Except as set forth in an Authorized License, Broadcom grants no license + * (express or implied), right to use, or waiver of any kind with respect to + * the Software, and Broadcom expressly reserves all rights in and to the + * Software and all intellectual property rights therein. + * IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS + * SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE + * ALL USE OF THE SOFTWARE. * * Except as expressly set forth in the Authorized License, * - * 1. This program, including its structure, sequence and organization, - * constitutes the valuable trade secrets of Broadcom, and you shall - * use all reasonable efforts to protect the confidentiality thereof, - * and to use this information only in connection with your use of + * 1. This program, including its structure, sequence and organization, + * constitutes the valuable trade secrets of Broadcom, and you shall + * use all reasonable efforts to protect the confidentiality thereof, + * and to use this information only in connection with your use of * Broadcom integrated circuit products. * - * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED - * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, - * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, - * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY - * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, - * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, - * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR + * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED + * "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, + * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, + * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY + * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, + * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, + * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT * OF USE OR PERFORMANCE OF THE SOFTWARE. * * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR - * ITS LICENSORS BE LIABLE FOR - * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY - * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO - * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM - * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR - * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE - * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE - * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF + * ITS LICENSORS BE LIABLE FOR + * (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY + * DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO + * YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM + * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR + * (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE + * SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE + * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF * ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. * ************************************************************************************/ @@ -51,7 +51,7 @@ ** ** Function bta_sys_hw_co_enable ** -** Description This function is called by the stack to power up the HW +** Description This function is called by the stack to power up the HW ** ** Returns void ** @@ -59,7 +59,7 @@ void bta_sys_hw_co_enable( tBTA_SYS_HW_MODULE module ) { /* platform specific implementation to power-up the HW */ - + /* if no client/server asynchronous system like linux-based OS, directly call the ci here */ bta_sys_hw_ci_enabled( module ); @@ -70,7 +70,7 @@ void bta_sys_hw_co_enable( tBTA_SYS_HW_MODULE module ) ** ** Function bta_sys_hw_co_disable ** -** Description This function is called by the stack to power down the HW +** Description This function is called by the stack to power down the HW ** ** Returns void ** @@ -78,9 +78,9 @@ void bta_sys_hw_co_enable( tBTA_SYS_HW_MODULE module ) void bta_sys_hw_co_disable( tBTA_SYS_HW_MODULE module ) { /* platform specific implementation to power-down the HW */ - + /* if no client/server asynchronous system like linux-based OS, directly call the ci here */ bta_sys_hw_ci_disabled( module ); - + } |