support rtl8703 bt
authorhwg <hwg@rock-chips.com>
Fri, 17 Mar 2017 08:11:41 +0000 (16:11 +0800)
committerhwg <hwg@rock-chips.com>
Fri, 17 Mar 2017 08:11:41 +0000 (16:11 +0800)
Change-Id: I5de737fb72eeec84249120907fff0c98b5f56009

rtkbt/code/bt/device/src/controller.c
rtkbt/rtkbt.mk
rtkbt/system/etc/firmware/rtl8703bs_config [new file with mode: 0755]
rtkbt/system/etc/firmware/rtl8703bs_fw [new file with mode: 0755]
rtkbt/system/etc/firmware/rtl8723cs_xx_config [new file with mode: 0755]
rtkbt/system/etc/firmware/rtl8723cs_xx_fw [new file with mode: 0755]

index 4440ea55aba74ac9d040da98e14aaf7f9c0c606a..79581366f37796b8051858d770dc7357e4a430bd 100755 (executable)
@@ -163,6 +163,9 @@ static future_t *start_up(void) {
 
   // Done telling the controller about what page 0 features we support
   // Request the remaining feature pages
+#ifdef BLUETOOTH_RTK
+  if(HCI_LMP_EXTENDED_SUPPORTED(features_classic[0].as_array)) {
+#endif         
   while (page_number <= last_features_classic_page_index &&
          page_number < MAX_FEATURES_CLASSIC_PAGE_COUNT) {
     response = AWAIT_COMMAND(packet_factory->make_read_local_extended_features(page_number));
@@ -176,7 +179,9 @@ static future_t *start_up(void) {
 
     page_number++;
   }
-
+#ifdef BLUETOOTH_RTK  
+  }
+#endif  
 #if (SC_MODE_INCLUDED == TRUE)
   secure_connections_supported = HCI_SC_CTRLR_SUPPORTED(features_classic[2].as_array);
   if (secure_connections_supported) {
@@ -312,12 +317,16 @@ static uint8_t *get_local_supported_codecs(uint8_t *number_of_codecs) {
 
 static const bt_device_features_t *get_features_ble(void) {
   assert(readable);
+  if (!ble_supported)
+    return NULL;
   assert(ble_supported);
   return &features_ble;
 }
 
 static const uint8_t *get_ble_supported_states(void) {
   assert(readable);
+  if (!ble_supported)
+    return NULL;  
   assert(ble_supported);
   return ble_supported_states;
 }
@@ -369,18 +378,24 @@ static bool supports_ble(void) {
 
 static bool supports_ble_privacy(void) {
   assert(readable);
+  if (!ble_supported)
+    return false;   
   assert(ble_supported);
   return HCI_LE_ENHANCED_PRIVACY_SUPPORTED(features_ble.as_array);
 }
 
 static bool supports_ble_packet_extension(void) {
   assert(readable);
+  if (!ble_supported)
+    return false;   
   assert(ble_supported);
   return HCI_LE_DATA_LEN_EXT_SUPPORTED(features_ble.as_array);
 }
 
 static bool supports_ble_connection_parameters_request(void) {
   assert(readable);
+  if (!ble_supported)
+    return false;   
   assert(ble_supported);
   return HCI_LE_CONN_PARAM_REQ_SUPPORTED(features_ble.as_array);
 }
@@ -392,6 +407,8 @@ static uint16_t get_acl_data_size_classic(void) {
 
 static uint16_t get_acl_data_size_ble(void) {
   assert(readable);
+  if (!ble_supported)
+    return 0;   
   assert(ble_supported);
   return acl_data_size_ble;
 }
@@ -408,6 +425,8 @@ static uint16_t get_acl_packet_size_ble(void) {
 
 static uint16_t get_ble_suggested_default_data_length(void) {
   assert(readable);
+  if (!ble_supported)
+    return 0;   
   assert(ble_supported);
   return ble_suggested_default_data_length;
 }
@@ -419,18 +438,24 @@ static uint16_t get_acl_buffer_count_classic(void) {
 
 static uint8_t get_acl_buffer_count_ble(void) {
   assert(readable);
+  if (!ble_supported)
+    return 0;   
   assert(ble_supported);
   return acl_buffer_count_ble;
 }
 
 static uint8_t get_ble_white_list_size(void) {
   assert(readable);
+  if (!ble_supported)
+    return 0;   
   assert(ble_supported);
   return ble_white_list_size;
 }
 
 static uint8_t get_ble_resolving_list_max_size(void) {
   assert(readable);
+  if (!ble_supported)
+    return 0;   
   assert(ble_supported);
   return ble_resolving_list_max_size;
 }
@@ -441,6 +466,8 @@ static void set_ble_resolving_list_max_size(int resolving_list_max_size) {
   if (resolving_list_max_size != 0) {
     assert(readable);
   }
+  if (!ble_supported)
+    return;   
   assert(ble_supported);
   ble_resolving_list_max_size = resolving_list_max_size;
 }
index e128dfa67eaf85a268a7a42a2321ce660831e435..609f4db6114ced37e2501cae5c7193134ed73aa0 100755 (executable)
@@ -19,6 +19,10 @@ PRODUCT_COPY_FILES += \
        $(LOCAL_PATH)/system/etc/bluetooth/rtkbt.conf:system/etc/bluetooth/rtkbt.conf \
        $(LOCAL_PATH)/system/etc/firmware/rtl8723b_config:system/etc/firmware/rtl8723b_config \
        $(LOCAL_PATH)/system/etc/firmware/rtl8723b_fw:system/etc/firmware/rtl8723b_fw \
+       $(LOCAL_PATH)/system/etc/firmware/rtl8703bs_config:system/etc/firmware/rtl8703bs_config \
+       $(LOCAL_PATH)/system/etc/firmware/rtl8703bs_fw:system/etc/firmware/rtl8703bs_fw \
+       $(LOCAL_PATH)/system/etc/firmware/rtl8723cs_xx_config:system/etc/firmware/rtl8723cs_xx_config \
+       $(LOCAL_PATH)/system/etc/firmware/rtl8723cs_xx_fw:system/etc/firmware/rtl8723cs_xx_fw \
        $(LOCAL_PATH)/system/etc/firmware/rtl8723bs_config:system/etc/firmware/rtl8723bs_config \
        $(LOCAL_PATH)/system/etc/firmware/rtl8723bs_fw:system/etc/firmware/rtl8723bs_fw \
        $(LOCAL_PATH)/system/etc/firmware/rtl8723bs_VQ0_config:system/etc/firmware/rtl8723bs_VQ0_config \
diff --git a/rtkbt/system/etc/firmware/rtl8703bs_config b/rtkbt/system/etc/firmware/rtl8703bs_config
new file mode 100755 (executable)
index 0000000..0f507ed
Binary files /dev/null and b/rtkbt/system/etc/firmware/rtl8703bs_config differ
diff --git a/rtkbt/system/etc/firmware/rtl8703bs_fw b/rtkbt/system/etc/firmware/rtl8703bs_fw
new file mode 100755 (executable)
index 0000000..be79d53
Binary files /dev/null and b/rtkbt/system/etc/firmware/rtl8703bs_fw differ
diff --git a/rtkbt/system/etc/firmware/rtl8723cs_xx_config b/rtkbt/system/etc/firmware/rtl8723cs_xx_config
new file mode 100755 (executable)
index 0000000..0f507ed
Binary files /dev/null and b/rtkbt/system/etc/firmware/rtl8723cs_xx_config differ
diff --git a/rtkbt/system/etc/firmware/rtl8723cs_xx_fw b/rtkbt/system/etc/firmware/rtl8723cs_xx_fw
new file mode 100755 (executable)
index 0000000..d4b149b
Binary files /dev/null and b/rtkbt/system/etc/firmware/rtl8723cs_xx_fw differ