This commit logs on debug level when a Handsfree Audio Agent registers
or unregisters itself and the CODECs that are enabled.
---
 src/handsfree-audio.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c
index c24e787..dc37853 100644
--- a/src/handsfree-audio.c
+++ b/src/handsfree-audio.c
@@ -674,10 +674,16 @@ static DBusMessage *am_agent_register(DBusConnection 
*conn,
                        return __ofono_error_invalid_args(msg);
        }
 
+       DBG("Agent %s registered with the CODECs:%s%s", sender,
+               has_cvsd ? " CVSD" : "", has_msbc ? " mSBC" : "");
+
        if (has_msbc && defer_setup == 1)
                has_wideband = TRUE;
-       else
+       else {
                has_wideband = FALSE;
+               DBG("Wideband speech disabled: %s", has_msbc ?
+                       "no SCO defer setup support" : "no mSBC support");
+       }
 
        if (has_cvsd == FALSE) {
                ofono_error("CVSD codec is mandatory");
@@ -718,6 +724,8 @@ static DBusMessage *am_agent_unregister(DBusConnection 
*conn,
        agent_free(agent);
        agent = NULL;
 
+       DBG("Agent %s unregistered", sender);
+
        return dbus_message_new_method_return(msg);
 }
 
-- 
1.7.11.7

_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to