| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2021 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.bluetooth; |
| 18 | |
| Sagar Verma | cda6dbf | 2024-01-19 11:32:47 +0530 | [diff] [blame] | 19 | import android.annotation.FlaggedApi; |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 20 | import android.annotation.IntDef; |
| 21 | import android.annotation.NonNull; |
| Anton Hansson | fa927a5 | 2023-11-09 09:08:19 +0000 | [diff] [blame] | 22 | import android.annotation.Nullable; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 23 | import android.os.Parcel; |
| 24 | import android.os.Parcelable; |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 25 | |
| Sagar Verma | cda6dbf | 2024-01-19 11:32:47 +0530 | [diff] [blame] | 26 | import com.android.bluetooth.flags.Flags; |
| 27 | |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 28 | import java.lang.annotation.Retention; |
| 29 | import java.lang.annotation.RetentionPolicy; |
| Patty | 5aa4bd2 | 2022-01-25 19:58:37 +0800 | [diff] [blame] | 30 | import java.util.Objects; |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 31 | |
| 32 | /** |
| 33 | * Represents the codec configuration for a Bluetooth LE Audio source device. |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 34 | * |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 35 | * <p>Contains the source codec type. |
| 36 | * |
| 37 | * <p>The source codec type values are the same as those supported by the device hardware. |
| 38 | * |
| David Duarte | 5a02bb4 | 2023-12-04 23:07:42 +0000 | [diff] [blame] | 39 | * @see BluetoothLeAudioCodecConfig |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 40 | */ |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 41 | public final class BluetoothLeAudioCodecConfig implements Parcelable { |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 42 | // Add an entry for each source codec here. |
| 43 | |
| 44 | /** @hide */ |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 45 | @IntDef( |
| 46 | prefix = "SOURCE_CODEC_TYPE_", |
| 47 | value = {SOURCE_CODEC_TYPE_LC3, SOURCE_CODEC_TYPE_INVALID}) |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 48 | @Retention(RetentionPolicy.SOURCE) |
| 49 | public @interface SourceCodecType {}; |
| 50 | |
| 51 | public static final int SOURCE_CODEC_TYPE_LC3 = 0; |
| 52 | public static final int SOURCE_CODEC_TYPE_INVALID = 1000 * 1000; |
| 53 | |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 54 | /** @hide */ |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 55 | @IntDef( |
| 56 | prefix = "CODEC_PRIORITY_", |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 57 | value = {CODEC_PRIORITY_DISABLED, CODEC_PRIORITY_DEFAULT, CODEC_PRIORITY_HIGHEST}) |
| 58 | @Retention(RetentionPolicy.SOURCE) |
| 59 | public @interface CodecPriority {} |
| 60 | |
| 61 | /** |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 62 | * Codec priority disabled. Used to indicate that this codec is disabled and should not be used. |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 63 | */ |
| 64 | public static final int CODEC_PRIORITY_DISABLED = -1; |
| 65 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 66 | /** Codec priority default. Default value used for codec priority. */ |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 67 | public static final int CODEC_PRIORITY_DEFAULT = 0; |
| 68 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 69 | /** Codec priority highest. Used to indicate the highest priority a codec can have. */ |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 70 | public static final int CODEC_PRIORITY_HIGHEST = 1000 * 1000; |
| 71 | |
| 72 | /** @hide */ |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 73 | @IntDef( |
| 74 | flag = true, |
| 75 | prefix = "SAMPLE_RATE_", |
| 76 | value = { |
| 77 | SAMPLE_RATE_NONE, |
| 78 | SAMPLE_RATE_8000, |
| Sagar Verma | cda6dbf | 2024-01-19 11:32:47 +0530 | [diff] [blame] | 79 | SAMPLE_RATE_11025, |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 80 | SAMPLE_RATE_16000, |
| Sagar Verma | cda6dbf | 2024-01-19 11:32:47 +0530 | [diff] [blame] | 81 | SAMPLE_RATE_22050, |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 82 | SAMPLE_RATE_24000, |
| 83 | SAMPLE_RATE_32000, |
| 84 | SAMPLE_RATE_44100, |
| Sagar Verma | cda6dbf | 2024-01-19 11:32:47 +0530 | [diff] [blame] | 85 | SAMPLE_RATE_48000, |
| 86 | SAMPLE_RATE_88200, |
| 87 | SAMPLE_RATE_96000, |
| 88 | SAMPLE_RATE_176400, |
| 89 | SAMPLE_RATE_192000, |
| 90 | SAMPLE_RATE_384000 |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 91 | }) |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 92 | @Retention(RetentionPolicy.SOURCE) |
| 93 | public @interface SampleRate {} |
| 94 | |
| 95 | /** |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 96 | * Codec sample rate 0 Hz. Default value used for codec sample rate. Values are the bit mask as |
| 97 | * defined in the Bluetooth Assigned Numbers, Generic Audio, Supported_Sampling_Frequencies |
| Sagar Verma | cda6dbf | 2024-01-19 11:32:47 +0530 | [diff] [blame] | 98 | * table. |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 99 | */ |
| 100 | public static final int SAMPLE_RATE_NONE = 0; |
| 101 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 102 | /** Codec sample rate 8000 Hz. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 103 | public static final int SAMPLE_RATE_8000 = 0x01 << 0; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 104 | |
| Sagar Verma | cda6dbf | 2024-01-19 11:32:47 +0530 | [diff] [blame] | 105 | /** Codec sample rate 11025 Hz. */ |
| 106 | @FlaggedApi(Flags.FLAG_LEAUDIO_ADD_SAMPLING_FREQUENCIES) |
| 107 | public static final int SAMPLE_RATE_11025 = 0x01 << 1; |
| 108 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 109 | /** Codec sample rate 16000 Hz. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 110 | public static final int SAMPLE_RATE_16000 = 0x01 << 2; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 111 | |
| Sagar Verma | cda6dbf | 2024-01-19 11:32:47 +0530 | [diff] [blame] | 112 | /** Codec sample rate 22050 Hz. */ |
| 113 | @FlaggedApi(Flags.FLAG_LEAUDIO_ADD_SAMPLING_FREQUENCIES) |
| 114 | public static final int SAMPLE_RATE_22050 = 0x01 << 3; |
| 115 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 116 | /** Codec sample rate 24000 Hz. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 117 | public static final int SAMPLE_RATE_24000 = 0x01 << 4; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 118 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 119 | /** Codec sample rate 32000 Hz. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 120 | public static final int SAMPLE_RATE_32000 = 0x01 << 5; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 121 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 122 | /** Codec sample rate 44100 Hz. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 123 | public static final int SAMPLE_RATE_44100 = 0x01 << 6; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 124 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 125 | /** Codec sample rate 48000 Hz. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 126 | public static final int SAMPLE_RATE_48000 = 0x01 << 7; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 127 | |
| Sagar Verma | cda6dbf | 2024-01-19 11:32:47 +0530 | [diff] [blame] | 128 | /** Codec sample rate 88200 Hz. */ |
| 129 | @FlaggedApi(Flags.FLAG_LEAUDIO_ADD_SAMPLING_FREQUENCIES) |
| 130 | public static final int SAMPLE_RATE_88200 = 0x01 << 8; |
| 131 | |
| 132 | /** Codec sample rate 96000 Hz. */ |
| 133 | @FlaggedApi(Flags.FLAG_LEAUDIO_ADD_SAMPLING_FREQUENCIES) |
| 134 | public static final int SAMPLE_RATE_96000 = 0x01 << 9; |
| 135 | |
| 136 | /** Codec sample rate 176400 Hz. */ |
| 137 | @FlaggedApi(Flags.FLAG_LEAUDIO_ADD_SAMPLING_FREQUENCIES) |
| 138 | public static final int SAMPLE_RATE_176400 = 0x01 << 10; |
| 139 | |
| 140 | /** Codec sample rate 192000 Hz. */ |
| 141 | @FlaggedApi(Flags.FLAG_LEAUDIO_ADD_SAMPLING_FREQUENCIES) |
| 142 | public static final int SAMPLE_RATE_192000 = 0x01 << 11; |
| 143 | |
| 144 | /** Codec sample rate 384000 Hz. */ |
| 145 | @FlaggedApi(Flags.FLAG_LEAUDIO_ADD_SAMPLING_FREQUENCIES) |
| 146 | public static final int SAMPLE_RATE_384000 = 0x01 << 12; |
| 147 | |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 148 | /** @hide */ |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 149 | @IntDef( |
| 150 | flag = true, |
| 151 | prefix = "BITS_PER_SAMPLE_", |
| 152 | value = { |
| 153 | BITS_PER_SAMPLE_NONE, |
| 154 | BITS_PER_SAMPLE_16, |
| 155 | BITS_PER_SAMPLE_24, |
| 156 | BITS_PER_SAMPLE_32 |
| 157 | }) |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 158 | @Retention(RetentionPolicy.SOURCE) |
| 159 | public @interface BitsPerSample {} |
| 160 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 161 | /** Codec bits per sample 0. Default value of the codec bits per sample. */ |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 162 | public static final int BITS_PER_SAMPLE_NONE = 0; |
| 163 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 164 | /** Codec bits per sample 16. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 165 | public static final int BITS_PER_SAMPLE_16 = 0x01 << 0; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 166 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 167 | /** Codec bits per sample 24. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 168 | public static final int BITS_PER_SAMPLE_24 = 0x01 << 1; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 169 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 170 | /** Codec bits per sample 32. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 171 | public static final int BITS_PER_SAMPLE_32 = 0x01 << 3; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 172 | |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 173 | /** |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 174 | * Values are the bit mask as defined in the Bluetooth Assigned Numbers, Generic Audio, |
| 175 | * Supported_Audio_Channel_Counts table Note: We use only part of it. |
| 176 | * |
| 177 | * @hide |
| 178 | */ |
| 179 | @IntDef( |
| 180 | flag = true, |
| 181 | prefix = "CHANNEL_COUNT_", |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 182 | value = {CHANNEL_COUNT_NONE, CHANNEL_COUNT_1, CHANNEL_COUNT_2}) |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 183 | @Retention(RetentionPolicy.SOURCE) |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 184 | public @interface ChannelCount {} |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 185 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 186 | /** Codec channel mode NONE. Default value of the codec channel mode. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 187 | public static final int CHANNEL_COUNT_NONE = 0; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 188 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 189 | /** Codec channel mode MONO. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 190 | public static final int CHANNEL_COUNT_1 = 0x01 << 0; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 191 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 192 | /** Codec channel mode STEREO. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 193 | public static final int CHANNEL_COUNT_2 = 0x01 << 1; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 194 | |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 195 | /** |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 196 | * Values are the bit mask as defined in the Bluetooth Assigned Numbers, Generic Audio, |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 197 | * Supported_Frame_Durations table |
| 198 | * |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 199 | * @hide |
| 200 | */ |
| 201 | @IntDef( |
| 202 | flag = true, |
| 203 | prefix = "FRAME_DURATION_", |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 204 | value = {FRAME_DURATION_NONE, FRAME_DURATION_7500, FRAME_DURATION_10000}) |
| 205 | @Retention(RetentionPolicy.SOURCE) |
| 206 | public @interface FrameDuration {} |
| 207 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 208 | /** Frame duration 0. Default value of the frame duration. */ |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 209 | public static final int FRAME_DURATION_NONE = 0; |
| 210 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 211 | /** Frame duration 7500 us. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 212 | public static final int FRAME_DURATION_7500 = 0x01 << 0; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 213 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 214 | /** Frame duration 10000 us. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 215 | public static final int FRAME_DURATION_10000 = 0x01 << 1; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 216 | |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 217 | private final @SourceCodecType int mCodecType; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 218 | private final @CodecPriority int mCodecPriority; |
| 219 | private final @SampleRate int mSampleRate; |
| 220 | private final @BitsPerSample int mBitsPerSample; |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 221 | private final @ChannelCount int mChannelCount; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 222 | private final @FrameDuration int mFrameDuration; |
| 223 | private final int mOctetsPerFrame; |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 224 | private final int mMinOctetsPerFrame; |
| 225 | private final int mMaxOctetsPerFrame; |
| 226 | |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 227 | /** |
| 228 | * Creates a new BluetoothLeAudioCodecConfig. |
| 229 | * |
| 230 | * @param codecType the source codec type |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 231 | * @param codecPriority the priority of this codec |
| 232 | * @param sampleRate the codec sample rate |
| 233 | * @param bitsPerSample the bits per sample of this codec |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 234 | * @param channelCount the channel count of this codec |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 235 | * @param frameDuration the frame duration of this codec |
| 236 | * @param octetsPerFrame the octets per frame of this codec |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 237 | * @param minOctetsPerFrame the minimum octets per frame of this codec |
| 238 | * @param maxOctetsPerFrame the maximum octets per frame of this codec |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 239 | */ |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 240 | private BluetoothLeAudioCodecConfig( |
| 241 | @SourceCodecType int codecType, |
| 242 | @CodecPriority int codecPriority, |
| 243 | @SampleRate int sampleRate, |
| 244 | @BitsPerSample int bitsPerSample, |
| 245 | @ChannelCount int channelCount, |
| 246 | @FrameDuration int frameDuration, |
| 247 | int octetsPerFrame, |
| 248 | int minOctetsPerFrame, |
| 249 | int maxOctetsPerFrame) { |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 250 | mCodecType = codecType; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 251 | mCodecPriority = codecPriority; |
| 252 | mSampleRate = sampleRate; |
| 253 | mBitsPerSample = bitsPerSample; |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 254 | mChannelCount = channelCount; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 255 | mFrameDuration = frameDuration; |
| 256 | mOctetsPerFrame = octetsPerFrame; |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 257 | mMinOctetsPerFrame = minOctetsPerFrame; |
| 258 | mMaxOctetsPerFrame = maxOctetsPerFrame; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 259 | } |
| 260 | |
| 261 | @Override |
| 262 | public int describeContents() { |
| 263 | return 0; |
| 264 | } |
| 265 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 266 | /** {@link Parcelable.Creator} interface implementation. */ |
| 267 | public static final @android.annotation.NonNull Parcelable.Creator<BluetoothLeAudioCodecConfig> |
| 268 | CREATOR = |
| 269 | new Parcelable.Creator<BluetoothLeAudioCodecConfig>() { |
| 270 | public BluetoothLeAudioCodecConfig createFromParcel(Parcel in) { |
| 271 | int codecType = in.readInt(); |
| 272 | int codecPriority = in.readInt(); |
| 273 | int sampleRate = in.readInt(); |
| 274 | int bitsPerSample = in.readInt(); |
| 275 | int channelCount = in.readInt(); |
| 276 | int frameDuration = in.readInt(); |
| 277 | int octetsPerFrame = in.readInt(); |
| 278 | int minOctetsPerFrame = in.readInt(); |
| 279 | int maxOctetsPerFrame = in.readInt(); |
| 280 | return new BluetoothLeAudioCodecConfig( |
| 281 | codecType, |
| 282 | codecPriority, |
| 283 | sampleRate, |
| 284 | bitsPerSample, |
| 285 | channelCount, |
| 286 | frameDuration, |
| 287 | octetsPerFrame, |
| 288 | minOctetsPerFrame, |
| 289 | maxOctetsPerFrame); |
| 290 | } |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 291 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 292 | public BluetoothLeAudioCodecConfig[] newArray(int size) { |
| 293 | return new BluetoothLeAudioCodecConfig[size]; |
| 294 | } |
| 295 | }; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 296 | |
| 297 | @Override |
| 298 | public void writeToParcel(@NonNull Parcel out, int flags) { |
| 299 | out.writeInt(mCodecType); |
| 300 | out.writeInt(mCodecPriority); |
| 301 | out.writeInt(mSampleRate); |
| 302 | out.writeInt(mBitsPerSample); |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 303 | out.writeInt(mChannelCount); |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 304 | out.writeInt(mFrameDuration); |
| 305 | out.writeInt(mOctetsPerFrame); |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 306 | out.writeInt(mMinOctetsPerFrame); |
| 307 | out.writeInt(mMaxOctetsPerFrame); |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 308 | } |
| 309 | |
| Łukasz Rymanowski | 4b6c0d0 | 2024-04-22 15:02:02 +0000 | [diff] [blame^] | 310 | private String sampleRateToString(@SampleRate int sampleRateBit) { |
| 311 | switch (sampleRateBit) { |
| 312 | case SAMPLE_RATE_NONE: |
| 313 | return "None"; |
| 314 | case SAMPLE_RATE_8000: |
| 315 | return "8 kHz"; |
| 316 | case SAMPLE_RATE_11025: |
| 317 | return "11.025 kHz"; |
| 318 | case SAMPLE_RATE_16000: |
| 319 | return "16 kHz"; |
| 320 | case SAMPLE_RATE_22050: |
| 321 | return "22.05 kHz"; |
| 322 | case SAMPLE_RATE_24000: |
| 323 | return "24 kHz"; |
| 324 | case SAMPLE_RATE_32000: |
| 325 | return "32 kHz"; |
| 326 | case SAMPLE_RATE_44100: |
| 327 | return "44.1 kHz"; |
| 328 | case SAMPLE_RATE_48000: |
| 329 | return "48 kHz"; |
| 330 | case SAMPLE_RATE_88200: |
| 331 | return "88.2 kHz"; |
| 332 | case SAMPLE_RATE_96000: |
| 333 | return "96 kHz"; |
| 334 | case SAMPLE_RATE_176400: |
| 335 | return "176.4 kHz"; |
| 336 | case SAMPLE_RATE_192000: |
| 337 | return "192 kHz"; |
| 338 | case SAMPLE_RATE_384000: |
| 339 | return "384 kHz"; |
| 340 | default: |
| 341 | return "Unknown bit " + sampleRateBit; |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | private String frameDurationToString(@FrameDuration int frameDurationBit) { |
| 346 | switch (frameDurationBit) { |
| 347 | case FRAME_DURATION_NONE: |
| 348 | return "None"; |
| 349 | case FRAME_DURATION_7500: |
| 350 | return "7.5 ms"; |
| 351 | case FRAME_DURATION_10000: |
| 352 | return "10 ms"; |
| 353 | default: |
| 354 | return "Unknown bit " + frameDurationBit; |
| 355 | } |
| 356 | } |
| 357 | |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 358 | @Override |
| 359 | public String toString() { |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 360 | return "{codecName:" |
| 361 | + getCodecName() |
| 362 | + ",mCodecType:" |
| 363 | + mCodecType |
| 364 | + ",mCodecPriority:" |
| 365 | + mCodecPriority |
| 366 | + ",mSampleRate:" |
| Łukasz Rymanowski | 4b6c0d0 | 2024-04-22 15:02:02 +0000 | [diff] [blame^] | 367 | + sampleRateToString(mSampleRate) |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 368 | + ",mBitsPerSample:" |
| 369 | + mBitsPerSample |
| Łukasz Rymanowski | 4b6c0d0 | 2024-04-22 15:02:02 +0000 | [diff] [blame^] | 370 | + ",mChannelCountBitMask:" |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 371 | + mChannelCount |
| 372 | + ",mFrameDuration:" |
| Łukasz Rymanowski | 4b6c0d0 | 2024-04-22 15:02:02 +0000 | [diff] [blame^] | 373 | + frameDurationToString(mFrameDuration) |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 374 | + ",mOctetsPerFrame:" |
| 375 | + mOctetsPerFrame |
| 376 | + ",mMinOctetsPerFrame:" |
| 377 | + mMinOctetsPerFrame |
| 378 | + ",mMaxOctetsPerFrame:" |
| 379 | + mMaxOctetsPerFrame |
| 380 | + "}"; |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 381 | } |
| 382 | |
| 383 | /** |
| 384 | * Gets the codec type. |
| 385 | * |
| 386 | * @return the codec type |
| 387 | */ |
| 388 | public @SourceCodecType int getCodecType() { |
| 389 | return mCodecType; |
| 390 | } |
| 391 | |
| 392 | /** |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 393 | * Gets the codec name. |
| 394 | * |
| 395 | * @return the codec name |
| 396 | */ |
| 397 | public @NonNull String getCodecName() { |
| 398 | switch (mCodecType) { |
| 399 | case SOURCE_CODEC_TYPE_LC3: |
| 400 | return "LC3"; |
| 401 | case SOURCE_CODEC_TYPE_INVALID: |
| 402 | return "INVALID CODEC"; |
| 403 | default: |
| 404 | break; |
| 405 | } |
| 406 | return "UNKNOWN CODEC(" + mCodecType + ")"; |
| 407 | } |
| 408 | |
| 409 | /** |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 410 | * Returns the codec selection priority. |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 411 | * |
| 412 | * <p>The codec selection priority is relative to other codecs: larger value means higher |
| 413 | * priority. |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 414 | */ |
| 415 | public @CodecPriority int getCodecPriority() { |
| 416 | return mCodecPriority; |
| 417 | } |
| 418 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 419 | /** Returns the codec sample rate. */ |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 420 | public @SampleRate int getSampleRate() { |
| 421 | return mSampleRate; |
| 422 | } |
| 423 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 424 | /** Returns the codec bits per sample. */ |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 425 | public @BitsPerSample int getBitsPerSample() { |
| 426 | return mBitsPerSample; |
| 427 | } |
| 428 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 429 | /** Returns the codec channel mode. */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 430 | public @ChannelCount int getChannelCount() { |
| 431 | return mChannelCount; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 432 | } |
| 433 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 434 | /** Returns the frame duration. */ |
| Patty | 3a61c47 | 2022-02-08 12:16:46 +0800 | [diff] [blame] | 435 | public @FrameDuration int getFrameDuration() { |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 436 | return mFrameDuration; |
| 437 | } |
| 438 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 439 | /** Returns the octets per frame */ |
| Patty | 3a61c47 | 2022-02-08 12:16:46 +0800 | [diff] [blame] | 440 | public int getOctetsPerFrame() { |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 441 | return mOctetsPerFrame; |
| 442 | } |
| 443 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 444 | /** Returns the minimum octets per frame */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 445 | public int getMinOctetsPerFrame() { |
| 446 | return mMinOctetsPerFrame; |
| 447 | } |
| 448 | |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 449 | /** Returns the maximum octets per frame */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 450 | public int getMaxOctetsPerFrame() { |
| 451 | return mMaxOctetsPerFrame; |
| 452 | } |
| 453 | |
| Patty | 5aa4bd2 | 2022-01-25 19:58:37 +0800 | [diff] [blame] | 454 | @Override |
| Anton Hansson | fa927a5 | 2023-11-09 09:08:19 +0000 | [diff] [blame] | 455 | public boolean equals(@Nullable Object o) { |
| Patty | 5aa4bd2 | 2022-01-25 19:58:37 +0800 | [diff] [blame] | 456 | if (o instanceof BluetoothLeAudioCodecConfig) { |
| 457 | BluetoothLeAudioCodecConfig other = (BluetoothLeAudioCodecConfig) o; |
| 458 | return (other.getCodecType() == mCodecType |
| 459 | && other.getCodecPriority() == mCodecPriority |
| 460 | && other.getSampleRate() == mSampleRate |
| 461 | && other.getBitsPerSample() == mBitsPerSample |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 462 | && other.getChannelCount() == mChannelCount |
| Patty | 5aa4bd2 | 2022-01-25 19:58:37 +0800 | [diff] [blame] | 463 | && other.getFrameDuration() == mFrameDuration |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 464 | && other.getOctetsPerFrame() == mOctetsPerFrame |
| 465 | && other.getMinOctetsPerFrame() == mMinOctetsPerFrame |
| 466 | && other.getMaxOctetsPerFrame() == mMaxOctetsPerFrame); |
| Patty | 5aa4bd2 | 2022-01-25 19:58:37 +0800 | [diff] [blame] | 467 | } |
| 468 | return false; |
| 469 | } |
| 470 | |
| 471 | /** |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 472 | * Returns a hash representation of this BluetoothLeAudioCodecConfig based on all the config |
| 473 | * values. |
| Patty | 5aa4bd2 | 2022-01-25 19:58:37 +0800 | [diff] [blame] | 474 | */ |
| 475 | @Override |
| 476 | public int hashCode() { |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 477 | return Objects.hash( |
| 478 | mCodecType, |
| 479 | mCodecPriority, |
| 480 | mSampleRate, |
| 481 | mBitsPerSample, |
| 482 | mChannelCount, |
| 483 | mFrameDuration, |
| 484 | mOctetsPerFrame, |
| 485 | mMinOctetsPerFrame, |
| 486 | mMaxOctetsPerFrame); |
| Patty | 5aa4bd2 | 2022-01-25 19:58:37 +0800 | [diff] [blame] | 487 | } |
| 488 | |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 489 | /** |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 490 | * Builder for {@link BluetoothLeAudioCodecConfig}. |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 491 | * |
| 492 | * <p>By default, the codec type will be set to {@link |
| 493 | * BluetoothLeAudioCodecConfig#SOURCE_CODEC_TYPE_INVALID} |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 494 | */ |
| 495 | public static final class Builder { |
| 496 | private int mCodecType = BluetoothLeAudioCodecConfig.SOURCE_CODEC_TYPE_INVALID; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 497 | private int mCodecPriority = BluetoothLeAudioCodecConfig.CODEC_PRIORITY_DEFAULT; |
| 498 | private int mSampleRate = BluetoothLeAudioCodecConfig.SAMPLE_RATE_NONE; |
| 499 | private int mBitsPerSample = BluetoothLeAudioCodecConfig.BITS_PER_SAMPLE_NONE; |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 500 | private int mChannelCount = BluetoothLeAudioCodecConfig.CHANNEL_COUNT_NONE; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 501 | private int mFrameDuration = BluetoothLeAudioCodecConfig.FRAME_DURATION_NONE; |
| 502 | private int mOctetsPerFrame = 0; |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 503 | private int mMinOctetsPerFrame = 0; |
| 504 | private int mMaxOctetsPerFrame = 0; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 505 | |
| 506 | public Builder() {} |
| 507 | |
| 508 | public Builder(@NonNull BluetoothLeAudioCodecConfig config) { |
| 509 | mCodecType = config.getCodecType(); |
| 510 | mCodecPriority = config.getCodecPriority(); |
| 511 | mSampleRate = config.getSampleRate(); |
| 512 | mBitsPerSample = config.getBitsPerSample(); |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 513 | mChannelCount = config.getChannelCount(); |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 514 | mFrameDuration = config.getFrameDuration(); |
| 515 | mOctetsPerFrame = config.getOctetsPerFrame(); |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 516 | mMinOctetsPerFrame = config.getMinOctetsPerFrame(); |
| 517 | mMaxOctetsPerFrame = config.getMaxOctetsPerFrame(); |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 518 | } |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 519 | |
| 520 | /** |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 521 | * Set codec type for Bluetooth LE audio codec config. |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 522 | * |
| 523 | * @param codecType of this codec |
| 524 | * @return the same Builder instance |
| 525 | */ |
| 526 | public @NonNull Builder setCodecType(@SourceCodecType int codecType) { |
| 527 | mCodecType = codecType; |
| 528 | return this; |
| 529 | } |
| 530 | |
| 531 | /** |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 532 | * Set codec priority for Bluetooth LE audio codec config. |
| 533 | * |
| 534 | * @param codecPriority of this codec |
| 535 | * @return the same Builder instance |
| 536 | */ |
| 537 | public @NonNull Builder setCodecPriority(@CodecPriority int codecPriority) { |
| 538 | mCodecPriority = codecPriority; |
| 539 | return this; |
| 540 | } |
| 541 | |
| 542 | /** |
| 543 | * Set sample rate for Bluetooth LE audio codec config. |
| 544 | * |
| 545 | * @param sampleRate of this codec |
| 546 | * @return the same Builder instance |
| 547 | */ |
| 548 | public @NonNull Builder setSampleRate(@SampleRate int sampleRate) { |
| 549 | mSampleRate = sampleRate; |
| 550 | return this; |
| 551 | } |
| 552 | |
| 553 | /** |
| 554 | * Set the bits per sample for LE audio codec config. |
| 555 | * |
| 556 | * @param bitsPerSample of this codec |
| 557 | * @return the same Builder instance |
| 558 | */ |
| 559 | public @NonNull Builder setBitsPerSample(@BitsPerSample int bitsPerSample) { |
| 560 | mBitsPerSample = bitsPerSample; |
| 561 | return this; |
| 562 | } |
| 563 | |
| 564 | /** |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 565 | * Set the channel count for Bluetooth LE audio codec config. |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 566 | * |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 567 | * @param channelCount of this codec |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 568 | * @return the same Builder instance |
| 569 | */ |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 570 | public @NonNull Builder setChannelCount(@ChannelCount int channelCount) { |
| 571 | mChannelCount = channelCount; |
| Patty | d8c4927 | 2022-01-19 16:26:00 +0800 | [diff] [blame] | 572 | return this; |
| 573 | } |
| 574 | |
| 575 | /** |
| 576 | * Set the frame duration for Bluetooth LE audio codec config. |
| 577 | * |
| 578 | * @param frameDuration of this codec |
| 579 | * @return the same Builder instance |
| 580 | */ |
| 581 | public @NonNull Builder setFrameDuration(@FrameDuration int frameDuration) { |
| 582 | mFrameDuration = frameDuration; |
| 583 | return this; |
| 584 | } |
| 585 | |
| 586 | /** |
| 587 | * Set the octets per frame for Bluetooth LE audio codec config. |
| 588 | * |
| 589 | * @param octetsPerFrame of this codec |
| 590 | * @return the same Builder instance |
| 591 | */ |
| 592 | public @NonNull Builder setOctetsPerFrame(int octetsPerFrame) { |
| 593 | mOctetsPerFrame = octetsPerFrame; |
| 594 | return this; |
| 595 | } |
| 596 | |
| 597 | /** |
| Łukasz Rymanowski | 3c97945 | 2022-03-10 10:28:12 +0000 | [diff] [blame] | 598 | * Set the minimum octets per frame for Bluetooth LE audio codec config. |
| 599 | * |
| 600 | * @param minOctetsPerFrame of this codec |
| 601 | * @return the same Builder instance |
| 602 | */ |
| 603 | public @NonNull Builder setMinOctetsPerFrame(int minOctetsPerFrame) { |
| 604 | mMinOctetsPerFrame = minOctetsPerFrame; |
| 605 | return this; |
| 606 | } |
| 607 | |
| 608 | /** |
| 609 | * Set the maximum octets per frame for Bluetooth LE audio codec config. |
| 610 | * |
| 611 | * @param maxOctetsPerFrame of this codec |
| 612 | * @return the same Builder instance |
| 613 | */ |
| 614 | public @NonNull Builder setMaxOctetsPerFrame(int maxOctetsPerFrame) { |
| 615 | mMaxOctetsPerFrame = maxOctetsPerFrame; |
| 616 | return this; |
| 617 | } |
| 618 | |
| 619 | /** |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 620 | * Build {@link BluetoothLeAudioCodecConfig}. |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 621 | * |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 622 | * @return new BluetoothLeAudioCodecConfig built |
| 623 | */ |
| 624 | public @NonNull BluetoothLeAudioCodecConfig build() { |
| David Duarte | ee52b7e | 2023-12-02 01:32:11 +0000 | [diff] [blame] | 625 | return new BluetoothLeAudioCodecConfig( |
| 626 | mCodecType, |
| 627 | mCodecPriority, |
| 628 | mSampleRate, |
| 629 | mBitsPerSample, |
| 630 | mChannelCount, |
| 631 | mFrameDuration, |
| 632 | mOctetsPerFrame, |
| 633 | mMinOctetsPerFrame, |
| 634 | mMaxOctetsPerFrame); |
| Patty | 5c05c2f | 2021-11-04 21:03:32 +0800 | [diff] [blame] | 635 | } |
| 636 | } |
| 637 | } |