Copy audioConfig according to config discriminator am: d7f04f9f06
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1497981 Change-Id: I969536e3efed093eb2a7bd7ee833400464b9d306
This commit is contained in:
commit
d06c0fc642
1 changed files with 11 additions and 6 deletions
|
@ -55,12 +55,17 @@ Return<void> BluetoothAudioProvider::startSession(
|
|||
const V2_0::AudioConfiguration& audioConfig, startSession_cb _hidl_cb) {
|
||||
AudioConfiguration audioConfig_2_1;
|
||||
|
||||
audioConfig_2_1.codecConfig() = audioConfig.codecConfig();
|
||||
if (audioConfig.getDiscriminator() ==
|
||||
V2_0::AudioConfiguration::hidl_discriminator::pcmConfig) {
|
||||
audioConfig_2_1.pcmConfig() = {
|
||||
.sampleRate = static_cast<SampleRate>(audioConfig.pcmConfig().sampleRate),
|
||||
.sampleRate =
|
||||
static_cast<SampleRate>(audioConfig.pcmConfig().sampleRate),
|
||||
.channelMode = audioConfig.pcmConfig().channelMode,
|
||||
.bitsPerSample = audioConfig.pcmConfig().bitsPerSample,
|
||||
.dataIntervalUs = 0};
|
||||
} else {
|
||||
audioConfig_2_1.codecConfig() = audioConfig.codecConfig();
|
||||
}
|
||||
|
||||
return startSession_2_1(hostIf, audioConfig_2_1, _hidl_cb);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue