sm7125-common: Set SEC specific BT SCO sample rate audio param

This lets us convert AOSP's bt_wbs to SEC's g_sco_samplerate.

Change-Id: I78d5d36044421daf99b8a13aa417060a3cf959a3
fourteen-wip
Tim Zimmermann 3 years ago committed by Simon1511
parent 5890d78048
commit 8353af6942
  1. 4
      audio/ParametersUtil.cpp
  2. 18
      overlay/packages/apps/Bluetooth/res/values/config.xml

@ -146,6 +146,10 @@ Result ParametersUtil::setParametersImpl(const hidl_vec<ParameterValue>& context
params.add(String8(pair.key.c_str()), String8(pair.value.c_str()));
}
for (size_t i = 0; i < parameters.size(); ++i) {
if (parameters[i].key == "bt_wbs") {
params.add(String8("g_sco_samplerate"),
String8(parameters[i].value == AudioParameter::valueOn ? "16000" : "8000"));
}
params.add(String8(parameters[i].key.c_str()), String8(parameters[i].value.c_str()));
}
return setParams(params);

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009-2012 Broadcom Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- If true, SCO sample rate will be reported via g_sco_samplerate audio parameter -->
<bool name="sco_report_samplerate">true</bool>
</resources>
Loading…
Cancel
Save