From 8353af6942d1eb8838b90b3e851579dec767edf4 Mon Sep 17 00:00:00 2001 From: Tim Zimmermann Date: Sun, 17 Apr 2022 16:40:02 +0200 Subject: [PATCH] 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 --- audio/ParametersUtil.cpp | 4 ++++ .../apps/Bluetooth/res/values/config.xml | 18 ------------------ 2 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 overlay/packages/apps/Bluetooth/res/values/config.xml diff --git a/audio/ParametersUtil.cpp b/audio/ParametersUtil.cpp index 4d53645..27a610e 100644 --- a/audio/ParametersUtil.cpp +++ b/audio/ParametersUtil.cpp @@ -146,6 +146,10 @@ Result ParametersUtil::setParametersImpl(const hidl_vec& 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); diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml deleted file mode 100644 index 9b644ac..0000000 --- a/overlay/packages/apps/Bluetooth/res/values/config.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - true -