1 /****************************************************************************** 2 * 3 * Copyright (C) 2005-2012 Broadcom Corporation 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19 /****************************************************************************** 20 * 21 * This file contains compile-time configurable constants for advanced 22 * audio/video 23 * 24 ******************************************************************************/ 25 26 #include <stddef.h> 27 28 #include "common/bt_target.h" 29 #include "bta/bta_api.h" 30 #include "bta_av_int.h" 31 32 #if defined(BTA_AV_INCLUDED) && (BTA_AV_INCLUDED == TRUE) 33 34 #ifndef BTA_AV_RC_PASS_RSP_CODE 35 #define BTA_AV_RC_PASS_RSP_CODE BTA_AV_RSP_NOT_IMPL 36 #endif 37 38 const UINT32 bta_av_meta_caps_co_ids[] = { 39 AVRC_CO_METADATA, 40 AVRC_CO_BROADCOM 41 }; 42 43 /* AVRCP supported categories */ 44 #define BTA_AV_RC_SNK_SUPF_CT (AVRC_SUPF_CT_CAT1) 45 #define BTA_AV_RC_SRC_SUPF_CT (AVRC_SUPF_CT_CAT2) 46 47 48 /* Added to modify 49 ** 1. flush timeout 50 ** 2. Remove Group navigation support in SupportedFeatures 51 ** 3. GetCapabilities supported event_ids list 52 ** 4. GetCapabilities supported event_ids count 53 */ 54 /* Flushing partial avdtp packets can cause some headsets to disconnect the link 55 if receiving partial a2dp frames */ 56 const UINT16 bta_av_audio_flush_to[] = { 57 0, /* 1 stream */ 58 0, /* 2 streams */ 59 0, /* 3 streams */ 60 0, /* 4 streams */ 61 0 /* 5 streams */ 62 }; /* AVDTP audio transport channel flush timeout */ 63 64 /* Note: Android doesnt support AVRC_SUPF_TG_GROUP_NAVI */ 65 /* Note: if AVRC_SUPF_TG_GROUP_NAVI is set, bta_av_cfg.avrc_group should be TRUE */ 66 #if AVRC_METADATA_INCLUDED == TRUE 67 #define BTA_AV_RC_SNK_SUPF_TG (AVRC_SUPF_TG_CAT2) /* TODO: | AVRC_SUPF_TG_APP_SETTINGS) */ 68 #define BTA_AV_RC_SRC_SUPF_TG (AVRC_SUPF_TG_CAT1) /* TODO: | AVRC_SUPF_TG_APP_SETTINGS) */ 69 #else 70 #define BTA_AV_RC_SNK_SUPF_TG (AVRC_SUPF_TG_CAT2) 71 #define BTA_AV_RC_SRC_SUPF_TG (AVRC_SUPF_TG_CAT1) 72 #endif 73 74 /* the MTU for the AVRCP browsing channel */ 75 #ifndef BTA_AV_MAX_RC_BR_MTU 76 #define BTA_AV_MAX_RC_BR_MTU 1008 77 #endif 78 79 const tBTA_AV_CFG bta_av_cfg = { 80 AVRC_CO_BROADCOM, /* AVRCP Company ID */ 81 #if AVRC_METADATA_INCLUDED == TRUE 82 512, /* AVRCP MTU at L2CAP for control channel */ 83 #else 84 48, /* AVRCP MTU at L2CAP for control channel */ 85 #endif 86 BTA_AV_MAX_RC_BR_MTU, /* AVRCP MTU at L2CAP for browsing channel */ 87 BTA_AV_RC_SNK_SUPF_CT, /* AVRCP controller categories as SNK */ 88 BTA_AV_RC_SNK_SUPF_TG, /* AVRCP target categories as SNK */ 89 BTA_AV_RC_SRC_SUPF_CT, /* AVRCP controller categories as SRC */ 90 BTA_AV_RC_SRC_SUPF_TG, /* AVRCP target categories as SRC */ 91 672, /* AVDTP signaling channel MTU at L2CAP */ 92 BTA_AV_MAX_A2DP_MTU, /* AVDTP audio transport channel MTU at L2CAP */ 93 bta_av_audio_flush_to, /* AVDTP audio transport channel flush timeout */ 94 6, /* AVDTP audio channel max data queue size */ 95 BTA_AV_MAX_VDP_MTU, /* AVDTP video transport channel MTU at L2CAP */ 96 600, /* AVDTP video transport channel flush timeout */ 97 FALSE, /* TRUE, to accept AVRC 1.3 group nevigation command */ 98 2, /* company id count in p_meta_co_ids */ 99 BTA_AV_RC_PASS_RSP_CODE,/* the default response code for pass through commands */ 100 bta_av_meta_caps_co_ids,/* the metadata Get Capabilities response for company id */ 101 NULL, /* the action function table for VDP stream */ 102 NULL, /* action function to register VDP */ 103 {0}, /* Default AVRCP controller name */ 104 {0}, /* Default AVRCP target name */ 105 }; 106 107 tBTA_AV_CFG *p_bta_av_cfg = (tBTA_AV_CFG *) &bta_av_cfg; 108 109 #endif /* if defined(BTA_AV_INCLUDED) && (BTA_AV_INCLUDED == TRUE) */ 110