Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba23ede4 authored by Grzegorz Kołodziejczyk's avatar Grzegorz Kołodziejczyk
Browse files

le_audio: Include broadcast profile for codec getter

This adds missing LC3 codec set for broadcast profile.

Tag: #Bug
Bug: 310552100
Test: connect BT LE device and check correct codec selection
Change-Id: I8261c04f57c019393bd7fb8404c65b1ef358d755
parent 19291b08
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -896,7 +896,8 @@ public class AudioDeviceInventory {
            if (event == BtHelper.EVENT_DEVICE_CONFIG_CHANGE) {
                boolean codecChange = false;
                if (btInfo.mProfile == BluetoothProfile.A2DP
                        || btInfo.mProfile == BluetoothProfile.LE_AUDIO) {
                        || btInfo.mProfile == BluetoothProfile.LE_AUDIO
                        || btInfo.mProfile == BluetoothProfile.LE_AUDIO_BROADCAST) {
                    if (di.mDeviceCodecFormat != codec) {
                        di.mDeviceCodecFormat = codec;
                        mConnectedDevices.replace(key, di);
+2 −1
Original line number Diff line number Diff line
@@ -324,7 +324,8 @@ public class BtHelper {
        // AUDIO_FORMAT_DEFAULT as native audio policy manager expects a specific audio format
        // only if audio HW module selection based on format is supported for the device type.
        if (!(profile == BluetoothProfile.A2DP
                || (profile == BluetoothProfile.LE_AUDIO && isLeOutput))) {
                || (isLeOutput && ((profile == BluetoothProfile.LE_AUDIO)
                        || (profile == BluetoothProfile.LE_AUDIO_BROADCAST))))) {
            return AudioSystem.AUDIO_FORMAT_DEFAULT;
        }
        @AudioSystem.AudioFormatNativeEnumForBtCodec int codec =