A2DP Codec related cleanup
* Add new A2DP API and the corresponding unit tests: - A2DP_InitSource2SinkCodec() - A2DP_SourceCodecSepIndex() - A2DP_GetTrackBitsPerSample() * Use the new API to simplify the codec selection and setup * Rename A2DP_BldSbcMplHdr() to A2DP_BuildMediaPayloadHeaderSbc() * Remove the following APIs, because they are not needed anymore: - A2DP_BuildSinkConfig() - A2DP_CodecConfigMatchesCapabilities() - A2DP_SetSourceCodec() - A2DP_CodecRequiresReconfig() - A2DP_IsSourceCodecSupported() * Remove the following generic APIs, and keep only the SBC-specific APIs. The information returned by those functions is SBC-specific, and doesn't apply to other codecs: - A2DP_GetNumberOfSubbands() - A2DP_GetNumberOfBlocks() - A2DP_GetAllocationMethodCode() - A2DP_GetChannelModeCode() - A2DP_GetSamplingFrequencyCode() - A2DP_GetMinBitpool() - A2DP_GetMaxBitpool() * Rename: A2DP_GetTrackFrequency() -> A2DP_GetTrackSampleRate() tA2DP_FEEDING_PARAMS.sampling_freq -> sample_rate tA2DP_FEEDING_PARAMS.num_channel -> channel_count tA2DP_FEEDING_PARAMS.bit_per_sample -> bits_per_sample * Remove btif_a2dp_source_encoder_update(), tA2DP_ENCODER_UPDATE_PARAMS and associated events and processing mechanism, because they are not needed anymore. * Remove tA2DP_ENCODER_INTERFACE.encoder_update, because it is not used anymore. Now it is superceded by tA2DP_ENCODER_INTERFACE.encoder_init. * Fix a bug inside bta_av_api_register() when initializing the stream control block. * Refactor bta_av_co_audio_getconfig() and bta_av_co_audio_setconfig() * Remove tBTA_AV_CO_CB.codec_config_setconfig field, because it is not needed anymore. * Remove unused arguments when opening/closing audio stream * Remove #ifdef BTA_AV_DEBUG guards: BTA_AV_DEBUG is always TRUE * Remove SBC Mono -> Stereo hack Test: Manual testing: A2DP streaming to headphones. TestTracker/68727 Change-Id: Ie0b209f7ad6c21c2c6d8d2e6277b86dfa63388c6
Loading
Please register or sign in to comment