diff options
author | Ayan Ghosh <abghosh@codeaurora.org> | 2016-06-20 16:04:37 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2016-08-24 08:10:08 -0600 |
commit | 95f66a1475ffc54a1a9d9ee3b9e90293017f54a4 (patch) | |
tree | 0fe21f0dbc7bef7d4f2b494f1bb39b88d3cd61ef | |
parent | 9877859734c41a532f6a12883948f3c74282afb3 (diff) | |
download | android_system_bt-95f66a1475ffc54a1a9d9ee3b9e90293017f54a4.tar.gz android_system_bt-95f66a1475ffc54a1a9d9ee3b9e90293017f54a4.tar.bz2 android_system_bt-95f66a1475ffc54a1a9d9ee3b9e90293017f54a4.zip |
Initiate Reconfig if DUT preferred config not chosen
- Add all mandatory capabilities to DUT supported config list.
- On peer device initiated AV Setconfig if peer chooses
any config other than DUT preferred one then trigger AV
Reconfig to override remote chosen config.
CRs-Fixed: 1043899
Change-Id: I6c89c4fb6f87be967c280c8c1c422e250bf91ae3
-rw-r--r-- | btif/co/bta_av_co.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/btif/co/bta_av_co.c b/btif/co/bta_av_co.c index f5711f789..8e5b295ea 100644 --- a/btif/co/bta_av_co.c +++ b/btif/co/bta_av_co.c @@ -87,10 +87,10 @@ const tA2D_SBC_CIE bta_av_co_sbc_caps = #else (A2D_SBC_IE_SAMP_FREQ_44), /* samp_freq */ #endif - (A2D_SBC_IE_CH_MD_JOINT), /* ch_mode */ - (A2D_SBC_IE_BLOCKS_16), /* block_len */ - (A2D_SBC_IE_SUBBAND_8), /* num_subbands */ - (A2D_SBC_IE_ALLOC_MD_L), /* alloc_mthd */ + (A2D_SBC_IE_CH_MD_MONO | A2D_SBC_IE_CH_MD_STEREO | A2D_SBC_IE_CH_MD_JOINT | A2D_SBC_IE_CH_MD_DUAL), /* ch_mode */ + (A2D_SBC_IE_BLOCKS_16 | A2D_SBC_IE_BLOCKS_12 | A2D_SBC_IE_BLOCKS_8 | A2D_SBC_IE_BLOCKS_4), /* block_len */ + (A2D_SBC_IE_SUBBAND_4 | A2D_SBC_IE_SUBBAND_8), /* num_subbands */ + (A2D_SBC_IE_ALLOC_MD_L | A2D_SBC_IE_ALLOC_MD_S), /* alloc_mthd */ BTA_AV_CO_SBC_MAX_BITPOOL, /* max_bitpool */ A2D_SBC_IE_MIN_BITPOOL /* min_bitpool */ }; @@ -929,11 +929,12 @@ void bta_av_co_audio_setconfig(tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec_type, bta_av_co_cb.codec_cfg_sbc_setconfig.id = BTIF_AV_CODEC_SBC; memcpy(bta_av_co_cb.codec_cfg_sbc_setconfig.info, p_codec_info, AVDT_CODEC_SIZE); bta_av_co_cb.codec_cfg_setconfig = &bta_av_co_cb.codec_cfg_sbc_setconfig; + memcpy(bta_av_co_cb.codec_cfg_sbc.info, p_codec_info, AVDT_CODEC_SIZE); + memcpy(bta_av_co_cb.codec_cfg->info, p_codec_info, AVDT_CODEC_SIZE); if(AVDT_TSEP_SNK == t_local_sep) { /* If Peer is SRC, and our cfg subset matches with what is requested by peer, then just accept what peer wants */ - memcpy(bta_av_co_cb.codec_cfg->info, p_codec_info, AVDT_CODEC_SIZE); recfg_needed = FALSE; } break; |