diff options
author | Matthew Xie <mattx@google.com> | 2014-04-27 05:45:32 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2014-06-30 15:31:13 -0700 |
commit | 66432dcffe211e317d35978283a04a96d5620bdf (patch) | |
tree | 4dad007e70c2459abe2122bf7640c4ad0b102afe /hci/include | |
parent | 021e17a641e61e3f139717cd755bf6f9b9b9eb12 (diff) | |
download | android_system_bt-66432dcffe211e317d35978283a04a96d5620bdf.tar.gz android_system_bt-66432dcffe211e317d35978283a04a96d5620bdf.tar.bz2 android_system_bt-66432dcffe211e317d35978283a04a96d5620bdf.zip |
Add WBS support on Bluedroid (2/6)
Bug 13764086
Change-Id: I12bf302f7dd19efb497ad49d4d1d638a7a926049
Diffstat (limited to 'hci/include')
-rw-r--r-- | hci/include/bt_hci_bdroid.h | 10 | ||||
-rw-r--r-- | hci/include/bt_hci_lib.h | 8 | ||||
-rw-r--r-- | hci/include/bt_vendor_lib.h | 22 |
3 files changed, 40 insertions, 0 deletions
diff --git a/hci/include/bt_hci_bdroid.h b/hci/include/bt_hci_bdroid.h index ce98ea1be..b7e433048 100644 --- a/hci/include/bt_hci_bdroid.h +++ b/hci/include/bt_hci_bdroid.h @@ -78,6 +78,9 @@ #define HC_EVENT_LPM_IDLE_TIMEOUT 0x0100 #define HC_EVENT_EXIT 0x0200 #define HC_EVENT_EPILOG 0x0400 +#define HC_EVENT_TX_CMD 0x0800 + +#define MSG_CTRL_TO_HC_CMD 0x0100 /* evt mask used by HC_EVENT_TX_CMD */ /* Message event mask across Host/Controller lib and stack */ #define MSG_EVT_MASK 0xFF00 /* eq. BT_EVT_MASK */ @@ -98,6 +101,13 @@ /* Local Bluetooth Controller ID for BR/EDR */ #define LOCAL_BR_EDR_CONTROLLER_ID 0 +/* Definitions of audio codec type + * inherited from AG callout function "codec" parameter + */ +#define SCO_CODEC_NONE 0x0000 /* BTA_AG_CODEC_NONE/BTM_SCO_CODEC_NONE */ +#define SCO_CODEC_CVSD 0x0001 /* BTA_AG_CODEC_CVSD/BTM_SCO_CODEC_CVSD */ +#define SCO_CODEC_MSBC 0x0002 /* BTA_AG_CODEC_MSBC/BTM_SCO_CODEC_MSBC */ + /****************************************************************************** ** Type definitions and return values ******************************************************************************/ diff --git a/hci/include/bt_hci_lib.h b/hci/include/bt_hci_lib.h index 541ca6e30..261a22c79 100644 --- a/hci/include/bt_hci_lib.h +++ b/hci/include/bt_hci_lib.h @@ -57,6 +57,11 @@ typedef enum { BT_HC_LOGGING_ON, } bt_hc_logging_state_t; +/* commands to be used in LSB with MSG_CTRL_TO_HC_CMD */ +typedef enum { + BT_HC_AUDIO_STATE = 0, + BT_HC_CMD_MAX +} bt_hc_tx_cmd_t; /** Result of write request */ typedef enum { BT_HC_TX_SUCCESS, /* a buffer is fully processed and can be released */ @@ -186,6 +191,9 @@ typedef struct { /** Closes the interface */ void (*cleanup)( void ); + + /** sends commands to hc layer (e.g. SCO state) */ + int (*tx_cmd)(TRANSAC transac, char *p_buf, int len); } bt_hc_interface_t; diff --git a/hci/include/bt_vendor_lib.h b/hci/include/bt_vendor_lib.h index f774a1431..65d448bf4 100644 --- a/hci/include/bt_vendor_lib.h +++ b/hci/include/bt_vendor_lib.h @@ -143,6 +143,18 @@ typedef enum { BT_VND_OP_LPM_WAKE_SET_STATE, /* [operation] + * Perform any vendor specific commands related to audio state changes. + * [input param] + * a pointer to bt_vendor_op_audio_state_t indicating what audio state is + * set. + * [return] + * 0 - default, don't care. + * [callback] + * None. + */ + BT_VND_OP_SET_AUDIO_STATE, + +/* [operation] * The epilog call to the vendor module so that it can perform any * vendor-specific processes (e.g. send a HCI_RESET to BT Controller) * before the caller calls for cleanup(). @@ -193,6 +205,13 @@ typedef enum { BT_VND_OP_RESULT_FAIL, } bt_vendor_op_result_t; +/** audio (SCO) state changes triggering VS commands for configuration */ +typedef struct { + uint16_t handle; + uint16_t peer_codec; + uint16_t state; +} bt_vendor_op_audio_state_t; + /* * Bluetooth Host/Controller Vendor callback structure. */ @@ -286,6 +305,9 @@ typedef struct { /* notifies caller result of lpm enable/disable */ cfg_result_cb lpm_cb; + /* notifies the result of codec setting */ + cfg_result_cb audio_state_cb; + /* buffer allocation request */ malloc_cb alloc; |