--- title: Projects --- ### AAC observations The following are the observations from the Wireshark capture traces regarding the issue observed while using AAC with SRS-XB33. 1. Android and SRS-XB33 - Remote sends `GetAllCapabilities` command and gets `SBC`, `MPEG-2/4 AAC` and `LDAC` as supported in the response. - In case of `AAC`, the following flags are set on Android side - MPEG-2 AAC LC - Sampling rate of 44.1 KHz - VBR supported - 2 channels - The `SetConfiguration` gets send with the following parameters set - MPEG-2 AAC LC - Sampling rate of 44.1 KHz - VBR supported - 2 channels 2. PulseAudio and SRS-XB33 1. Initial Connection - The device sends a `Discover` request, followed by `GetAllCapabilities` and then `SetConfiguration`. - For the `GetAllCapabilities`, `MPEG-2,4 AAC` and `SBC` are returned by bluez. - The `GetAllCapabilities` command, seems to be send twice from the device and in both cases return the exact same capabilities. This happens for both `AAC` and `SBC`. - The `SetConfiguration` command send is send by SRS-XB33 and has the following parameters set - MPEG-4 AAC LC - Sampling rate of 48 KHz - 2 channels - VBR not supported 2. Reconnection In the reconnection case, the `SetConfiguration` command has the following parameters set. - Sampling rate of 44.1 KHz - MPEG-4 AAC LC - 2 channels - VBR not supported ### Codec switching - Currently the following profiles exist 1. headsetaudiogateway 2. headsetheadunit 3. a2dpsource 4. a2dpsink - For backchannel, two additional profiles are needed 1. a2dpsourcewithbackchannel 2. a2dpsinkwithbackchannel - Each profile has it's own codec. However, one problem to solve is, one codec for one direction and a different codec for the other direction. For eg. aptX-LL uses aptX for playback and SBC for recording. How to solve this? Is introducing the backchannel profiles, be sufficient to take care of this? ### Under the hood - https://gavv.github.io/articles/pulseaudio-under-the-hood ### Bluetooth testing ``` bash ./simple-endpoint 2C:DB:07:58:F2:F9 ldacsource ./test-device connect 4C:BC:98:80:01:9B "0000110b-0000-1000-8000-00805f9b34fb" env GST_DEBUG=3 gst-launch-1.0 audiotestsrc ! ldacenc ! a2dpsink transport=/org/bluez/hci0/dev_4C_BC_98_80_01_9B/sep10/fd0 ``` ## Module loop back - https://endless.ersoft.org/pulseaudio-loopback/