bta_jv_cfg.cc 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /******************************************************************************
  2. *
  3. * Copyright 2014 The Android Open Source Project
  4. * Copyright 2004-2012 Broadcom Corporation
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at:
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. *
  18. ******************************************************************************/
  19. /******************************************************************************
  20. *
  21. * This file contains compile-time configurable constants for advanced
  22. * audio
  23. *
  24. ******************************************************************************/
  25. #include "bt_common.h"
  26. #include "bta_api.h"
  27. #include "bta_jv_api.h"
  28. #ifndef BTA_JV_SDP_DB_SIZE
  29. #define BTA_JV_SDP_DB_SIZE 4500
  30. #endif
  31. #ifndef BTA_JV_SDP_RAW_DATA_SIZE
  32. #define BTA_JV_SDP_RAW_DATA_SIZE 1800
  33. #endif
  34. /* The platform may choose to use dynamic memory for these data buffers.
  35. * p_bta_jv_cfg->p_sdp_db must be allocated/stay allocated
  36. * between BTA_JvEnable and BTA_JvDisable
  37. * p_bta_jv_cfg->p_sdp_raw_data can be allocated before calling
  38. * BTA_JvStartDiscovery
  39. * it can be de-allocated after the last call to access the database */
  40. static uint8_t bta_jv_sdp_raw_data[BTA_JV_SDP_RAW_DATA_SIZE];
  41. static tSDP_DISCOVERY_DB
  42. bta_jv_sdp_db_data[BTA_JV_SDP_DB_SIZE / sizeof(tSDP_DISCOVERY_DB)];
  43. /* JV configuration structure */
  44. const tBTA_JV_CFG bta_jv_cfg = {
  45. BTA_JV_SDP_RAW_DATA_SIZE, /* The size of p_sdp_raw_data */
  46. (BTA_JV_SDP_DB_SIZE / sizeof(tSDP_DISCOVERY_DB)) *
  47. sizeof(tSDP_DISCOVERY_DB), /* The size of p_sdp_db_data */
  48. bta_jv_sdp_raw_data, /* The data buffer to keep raw data */
  49. bta_jv_sdp_db_data /* The data buffer to keep SDP database */
  50. };
  51. const tBTA_JV_CFG* p_bta_jv_cfg = &bta_jv_cfg;