From patchwork Fri Apr 3 15:33:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alain Michaud X-Patchwork-Id: 11473005 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AEACB14DD for ; Fri, 3 Apr 2020 15:33:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 82CC62077D for ; Fri, 3 Apr 2020 15:33:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Y4pasZAX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404270AbgDCPdk (ORCPT ); Fri, 3 Apr 2020 11:33:40 -0400 Received: from mail-vs1-f65.google.com ([209.85.217.65]:41051 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404266AbgDCPdk (ORCPT ); Fri, 3 Apr 2020 11:33:40 -0400 Received: by mail-vs1-f65.google.com with SMTP id a63so5160484vsa.8 for ; Fri, 03 Apr 2020 08:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Gcz3eeQ2+0WzD1apCVGEkjRjlAZ7ZYY3BIn+Q6bn+QE=; b=Y4pasZAXXchmqenS46oUxtFb2jPuI1ekF3bBABf2Ed9cqCVN+5Q+QyRNc26BOWEGAR e0og32rpjiQvB6rIKT5xdnMJzbfm9rm2eAIO9Xf8tU3Y9Wb9FP4Ud1pGxG2ZJ3Z3lxTA fhmTKbD/GtWqYqzTT3BHrSpFT3U4O/WWQwI7M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Gcz3eeQ2+0WzD1apCVGEkjRjlAZ7ZYY3BIn+Q6bn+QE=; b=MFkmadaU18el7zGvh+dZ489Z10bwVwWSc1YW/vs7U+x085DZEXanAb5SUs+6fgS5// EjRF2eJ5FyOX9xDO1USQeibKyb6ZdQbD9J4OB37vXvRAkbTbHeymWOmUG3DnsTbVWxOP ytSVEboNhQtAW7xicHOq5ZDgfy4VD0+250zHLorNtCoX8zHplcue3oBXJFbnHtk2/i/f srQY+lHZCCzj+BuLBINjjXpAV/Oj4okMoc+aZ2tjtRx3agnvTeUxyNtPTmVOr6wwdRVQ F5ys7omAPs/dLItnmhTOHxO/GMJSAseJckURrBWLC8alRVxw0e0eSFFJw9oVEUAvhofD EKnw== X-Gm-Message-State: AGi0PuaCwaRU+HIh3+r+1c2RPvN7llpB26aG5aoOf188vAjFFpa5u+OI bj/Aso62JDi4Y2GM0FMOQ57X+MqGJqo= X-Google-Smtp-Source: APiQypKwRD1W3e5v4zorafN884R9APFKLqfQbOS+eBQ5nzkfxBTqYwfQm8s9Yug8oiQY9vT/AYi0dg== X-Received: by 2002:a67:1587:: with SMTP id 129mr7724003vsv.146.1585928018222; Fri, 03 Apr 2020 08:33:38 -0700 (PDT) Received: from alain.c.googlers.com.com (57.152.190.35.bc.googleusercontent.com. [35.190.152.57]) by smtp.gmail.com with ESMTPSA id u82sm2145510vsu.20.2020.04.03.08.33.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 08:33:37 -0700 (PDT) From: Alain Michaud To: linux-bluetooth@vger.kernel.org Cc: Alain Michaud Subject: [Bluez PATCH v1 1/2] doc:adding a WidebandSpeechEnabled Api Date: Fri, 3 Apr 2020 15:33:30 +0000 Message-Id: <20200403153331.101846-1-alainm@chromium.org> X-Mailer: git-send-email 2.26.0.292.g33ef6b2f38-goog MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This change adds an adapter Api to report the controller's widebandspeech enabled state. --- doc/adapter-api.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index acae032d9..d8865e795 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -326,3 +326,11 @@ Properties string Address [readonly] Local Device ID information in modalias format used by the kernel and udev. + + boolean WidebandSpeechEnabled [readonly] + + Returns true if the adapter's wideband speech feature is + supported and enabled. + + + From patchwork Fri Apr 3 15:33:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alain Michaud X-Patchwork-Id: 11473007 X-Patchwork-Delegate: marcel@holtmann.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4096614DD for ; Fri, 3 Apr 2020 15:34:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1DA482073B for ; Fri, 3 Apr 2020 15:34:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="lzki3dhF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404318AbgDCPd7 (ORCPT ); Fri, 3 Apr 2020 11:33:59 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:35073 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404286AbgDCPd7 (ORCPT ); Fri, 3 Apr 2020 11:33:59 -0400 Received: by mail-vs1-f66.google.com with SMTP id u11so5200054vsg.2 for ; Fri, 03 Apr 2020 08:33:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hNj1HvQcoQUIk/hf7H2ea/gOxstvKpsPPqgiR8s/sQc=; b=lzki3dhFN1Sv4r5Bt3bj8bZDRQNeZcadwqqv2fRsotNsyrCY2rAV62CN4wa7Uk/c91 5BUE8VVK3o5eaceMnhepKiCtwr+0Cj4zircND8GZxbR3GFMzF0DNbfKqDcFfONKQG0VT 8oVgkewXCBnqwmvfJb5ZB+Z/IcKUtxq0Os0AI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hNj1HvQcoQUIk/hf7H2ea/gOxstvKpsPPqgiR8s/sQc=; b=VQxQU9hJI3eeqk5GGuwM38NDhYqRpyjyBhibg/Rhc3HwvB4XB8F+EwhRxs2qfSebvh IXoA7p43bnSapipIE0FeYEnKZd9yE92aP1hsqPorSHRU26odAJNYM3oWRizAOMnIRIsf JXVVlJwddB62KWatOQDfEu98jjH4VwPJY/H58VkAzhbywPCKtQ1oT+CsusQJgWM825vx eFp3iZ2T/m5SXEY1abVY7pQKiKC7edwmKwgPIAwK8acn1I25kcwK1TaraCap74WkN5xS UVYFIJbcimhYK1gqjtiPGQOCduOlVDbbyCrTSRD3IDIFedrLarJQEKXdnV67wFC/sDoK 58KA== X-Gm-Message-State: AGi0PuZVFgdE9MkrQQo3NdKvQYf6yX8tw38kfC82YtqENxb5EgsxpuET iru4AEwpDTIQlct08YsMhUO2+YTbMl8= X-Google-Smtp-Source: APiQypLRtqMTtidwLjIu2lXdenf+xwDYXdIbX0RABmeUXRDbsfxtCwQZHTGVduE3rhiCfn9BHt/U2A== X-Received: by 2002:a67:d60d:: with SMTP id n13mr7379125vsj.230.1585928038056; Fri, 03 Apr 2020 08:33:58 -0700 (PDT) Received: from alain.c.googlers.com.com (57.152.190.35.bc.googleusercontent.com. [35.190.152.57]) by smtp.gmail.com with ESMTPSA id u82sm2145510vsu.20.2020.04.03.08.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 08:33:57 -0700 (PDT) From: Alain Michaud To: linux-bluetooth@vger.kernel.org Cc: Alain Michaud Subject: [Bluez PATCH v1 2/2] adapter:Enable wideband_speech if supported Date: Fri, 3 Apr 2020 15:33:32 +0000 Message-Id: <20200403153331.101846-2-alainm@chromium.org> X-Mailer: git-send-email 2.26.0.292.g33ef6b2f38-goog In-Reply-To: <20200403153331.101846-1-alainm@chromium.org> References: <20200403153331.101846-1-alainm@chromium.org> MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This change will enable the MGMT_SETTING_WIDEBAND_SPEECH setting and implement the adapter property to allow higher level profile implementations to know if the adapter supports and has the feature enabled. --- src/adapter.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/adapter.c b/src/adapter.c index 972d88772..02c5f7e1c 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -3424,6 +3424,15 @@ static DBusMessage *connect_device(DBusConnection *conn, return NULL; } +static gboolean property_get_wideband_speech_enabled( + const GDBusPropertyTable *property, + DBusMessageIter *iter, void *user_data) +{ + struct btd_adapter *adapter = user_data; + + return property_get_mode(adapter, MGMT_SETTING_WIDEBAND_SPEECH, iter); +} + static const GDBusMethodTable adapter_methods[] = { { GDBUS_ASYNC_METHOD("StartDiscovery", NULL, NULL, start_discovery) }, { GDBUS_METHOD("SetDiscoveryFilter", @@ -3459,6 +3468,7 @@ static const GDBusPropertyTable adapter_properties[] = { { "UUIDs", "as", property_get_uuids }, { "Modalias", "s", property_get_modalias, NULL, property_exists_modalias }, + { "WidebandSpeechEnabled", "b", property_get_wideband_speech_enabled }, { } }; @@ -8808,6 +8818,8 @@ static void read_info_complete(uint8_t status, uint16_t length, set_mode(adapter, MGMT_OP_SET_LE, 0x01); if (missing_settings & MGMT_SETTING_BREDR) set_mode(adapter, MGMT_OP_SET_BREDR, 0x01); + if (missing_settings & MGMT_SETTING_WIDEBAND_SPEECH) + set_mode(adapter, MGMT_OP_SET_WIDEBAND_SPEECH, 0x01); break; case BT_MODE_BREDR: if (!(adapter->supported_settings & MGMT_SETTING_BREDR)) { @@ -8822,6 +8834,8 @@ static void read_info_complete(uint8_t status, uint16_t length, set_mode(adapter, MGMT_OP_SET_BREDR, 0x01); if (adapter->current_settings & MGMT_SETTING_LE) set_mode(adapter, MGMT_OP_SET_LE, 0x00); + if (missing_settings & MGMT_SETTING_WIDEBAND_SPEECH) + set_mode(adapter, MGMT_OP_SET_WIDEBAND_SPEECH, 0x01); break; case BT_MODE_LE: if (!(adapter->supported_settings & MGMT_SETTING_LE)) {