Add support for Opus over A2DP
This CL provides support for IETF RFC 2012-6716 Opus as a BT A2DP codec for source or sink devices to the AOSP BT stack. During AVDTP handshake for A2DP, codec capabilities are negotiated between the source and sink devices, and the connection is established accordingly. The CL provides support for Opus codec selection through Developer Options. The Opus codec provides a highly optimized perceptual coding implementation, with the following core features: * Hybrid, Music (CELT) and Speech (SILK) modes * Scalable Bitrate from 6 - 510 kbps * Framesizes from 2.5 - 60ms * Support for Packet Loss Concealment * High efficiency coding with 3 byte frames to encode silence The core function calls for the codec are: opus_encode (OpusEncoder *st, const opus_int16 *pcm, int frame_size, unsigned char *data, opus_int32 max_data_bytes) opus_decode (OpusDecoder *st, const unsigned char *data, opus_int32 len, opus_int16 *pcm, int frame_size, int decode_fec) The majority of this CL implements the addition of the vendor codec in the A2DP stack, interfacing of the audio through the A2DP HAL, and codec capability negotiation over AVDTP. Bug: 226441860 Test: atest net_test_stack:StackA2dpTest and bds-dev sink Tag: #feature Ignore-AOSP-First: TM QPR1 Feature Change-Id: I05ecf07ab01f8045166b3d2da60fc2315c743cd2
Showing
- system/audio_hal_interface/fuzzer/Android.bp 1 addition, 0 deletionssystem/audio_hal_interface/fuzzer/Android.bp
- system/btif/Android.bp 1 addition, 0 deletionssystem/btif/Android.bp
- system/build/Android.bp 1 addition, 0 deletionssystem/build/Android.bp
- system/gd/rust/topshim/facade/Android.bp 1 addition, 0 deletionssystem/gd/rust/topshim/facade/Android.bp
- system/service/Android.bp 2 additions, 0 deletionssystem/service/Android.bp
- system/stack/Android.bp 5 additions, 0 deletionssystem/stack/Android.bp
- system/stack/a2dp/a2dp_codec_config.cc 11 additions, 1 deletionsystem/stack/a2dp/a2dp_codec_config.cc
- system/stack/a2dp/a2dp_vendor.cc 122 additions, 6 deletionssystem/stack/a2dp/a2dp_vendor.cc
- system/stack/a2dp/a2dp_vendor_opus.cc 1332 additions, 0 deletionssystem/stack/a2dp/a2dp_vendor_opus.cc
- system/stack/a2dp/a2dp_vendor_opus_decoder.cc 159 additions, 0 deletionssystem/stack/a2dp/a2dp_vendor_opus_decoder.cc
- system/stack/a2dp/a2dp_vendor_opus_encoder.cc 532 additions, 0 deletionssystem/stack/a2dp/a2dp_vendor_opus_encoder.cc
- system/stack/include/a2dp_error_codes.h 3 additions, 0 deletionssystem/stack/include/a2dp_error_codes.h
- system/stack/include/a2dp_vendor_opus.h 255 additions, 0 deletionssystem/stack/include/a2dp_vendor_opus.h
- system/stack/include/a2dp_vendor_opus_constants.h 66 additions, 0 deletionssystem/stack/include/a2dp_vendor_opus_constants.h
- system/stack/include/a2dp_vendor_opus_decoder.h 45 additions, 0 deletionssystem/stack/include/a2dp_vendor_opus_decoder.h
- system/stack/include/a2dp_vendor_opus_encoder.h 59 additions, 0 deletionssystem/stack/include/a2dp_vendor_opus_encoder.h
- system/stack/test/fuzzers/Android.bp 1 addition, 0 deletionssystem/stack/test/fuzzers/Android.bp
- system/stack/test/stack_a2dp_test.cc 122 additions, 3 deletionssystem/stack/test/stack_a2dp_test.cc
- system/test/headless/Android.bp 1 addition, 0 deletionssystem/test/headless/Android.bp
- system/test/suite/Android.bp 1 addition, 0 deletionssystem/test/suite/Android.bp
Loading
Please register or sign in to comment