[pulseaudio-discuss] BT WBS implementation requirement

Sathish Narasimman nsathish41 at gmail.com
Wed Dec 13 04:03:11 UTC 2017


Hi,

I have a BT controller which supports WBS(Wide Band Speech) encoding.

I would like to know is the below patch is good enough to initiate a
WBS connection.

diff --git a/src/modules/bluetooth/backend-ofono.c
b/src/modules/bluetooth/backend-ofono.c
index 5c99eee..dd065f7 100644
--- a/src/modules/bluetooth/backend-ofono.c
+++ b/src/modules/bluetooth/backend-ofono.c
@@ -406,6 +406,7 @@ static void
hf_audio_agent_register(pa_bluetooth_backend *hf) {
     pa_assert_se(m = dbus_message_new_method_call(OFONO_SERVICE, "/",
HF_AUDIO_MANAGER_INTERFACE, "Register"));

     codecs[ncodecs++] = HFP_AUDIO_CODEC_CVSD;
+    codecs[ncodecs++] = HFP_AUDIO_CODEC_MSBC;

     pa_assert_se(dbus_message_append_args(m, DBUS_TYPE_OBJECT_PATH,
&path, DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &pcodecs, ncodecs,
                                           DBUS_TYPE_INVALID));
@@ -741,7 +742,8 @@ static DBusMessage
*hf_audio_agent_new_connection(DBusConnection *c, DBusMessage

     card->connecting = false;

-    if (!card || codec != HFP_AUDIO_CODEC_CVSD || card->fd >= 0) {
+    //if (!card || codec != HFP_AUDIO_CODEC_CVSD || card->fd >= 0) {
+    if (!card || card->fd >= 0) {
         pa_log_warn("New audio connection invalid arguments (path=%s
fd=%d, codec=%d)", path, fd, codec);
         pa_assert_se(r = dbus_message_new_error(m,
"org.ofono.Error.InvalidArguments", "Invalid arguments in method
call"));
         shutdown(fd, SHUT_RDWR);



Thanks,
Sathish N


More information about the pulseaudio-discuss mailing list