Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp787119pxp; Sat, 5 Mar 2022 19:31:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxFOwgBg6PA37J/mxhj1yfroOHeYeAZltaxa47mHrAXRYfKAf+xIQ2plhw8Ih2BEH+ndvO X-Received: by 2002:a05:6a00:139a:b0:4cd:8c6c:1e97 with SMTP id t26-20020a056a00139a00b004cd8c6c1e97mr6554229pfg.66.1646537511213; Sat, 05 Mar 2022 19:31:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646537511; cv=none; d=google.com; s=arc-20160816; b=KzaXlt3bQmJrUOZPwY1llhMsojI5cXk9YC2ZDACmFjRVE6+SK7Q1P2jk1mejhjqQLl AFU4MNRtDpGbl7VRV2kay0fsM1K9tJImd2l52PrQLJp329L23aHADWlPqnB2/nQTxLIR mfaFAiJpPBLkY7R+fH4GQADXNXAnWPGbCXMrmICpo+PGVGscAlH8Klr9sGmqHZ0YBIAw JLB6pAG9xQR3UI2Hxmoc90BlRSj7hvNc4hFUIfyJXLDcggjDZ6dgMaLk1dZRW0kA/dW9 bhpGnbKkhqm4vnxA7otoZqTlHeG6YnxNjXwMq6cKxNBNzgTYaG2XUI43GqyCev8eB0JS vgiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=Ee4sJRu7araaMRoQ+K3C3XnquA7EX/Py9y/G23Qn//M=; b=uklz29rE3avG4oixk/P+5EvbGmndPDccIpBA88Jn2S0hO1twGXIwrASwGGxkCWIwQs v8yGmGcc7ZQjv0UKS13bAq6TXs1ff4UYT9/M53TN7R6W6aOIEbcxjghFUUWNcEQPbm4I YRP0VdPeKuse3xUy2RrEMj/rFya59d/OiGcqNxzfqhmSkkdGIKdqQz5AejQfHLVRpUKl aKbb2MeCQBydBXedryNjHe8Wwbs7tTlKF2ABFi3Iw1NycGO82nU49AkYKlWhwuZm+b0R 8yWI3GJaYAj2VFvLmHxUOPnI1QdO1ZkYNNNb1RAXwVKjr5HZZTjor/YkXp4hy0sgrW1D N+/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i35-20020a631323000000b0037893654602si8646519pgl.470.2022.03.05.19.31.19; Sat, 05 Mar 2022 19:31:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229805AbiCEVyT convert rfc822-to-8bit (ORCPT + 99 others); Sat, 5 Mar 2022 16:54:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbiCEVyS (ORCPT ); Sat, 5 Mar 2022 16:54:18 -0500 Received: from mail.holtmann.org (coyote.holtmann.net [212.227.132.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 17003631E for ; Sat, 5 Mar 2022 13:53:24 -0800 (PST) Received: from smtpclient.apple (p5b3d2910.dip0.t-ipconnect.de [91.61.41.16]) by mail.holtmann.org (Postfix) with ESMTPSA id 0BAABCECEC; Sat, 5 Mar 2022 22:53:24 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.60.0.1.1\)) Subject: Re: [BlueZ PATCH v4 1/8] doc: Introduce the quality report command and event From: Marcel Holtmann In-Reply-To: Date: Sat, 5 Mar 2022 22:53:23 +0100 Cc: BlueZ , Luiz Augusto von Dentz , pali@kernel.org, chromeos-bluetooth-upstreaming@chromium.org Content-Transfer-Encoding: 8BIT Message-Id: <8AD1FDEA-CB22-4DEE-9ACE-CAAD3459DEF0@holtmann.org> References: <20220215133636.2827039-1-josephsih@chromium.org> <666C5B97-A51C-48B9-AC91-0655C0D158B5@holtmann.org> To: Joseph Hwang X-Mailer: Apple Mail (2.3693.60.0.1.1) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Joseph, >>> Add the MGMT quality report command and event in doc/mgmt-api.txt. >>> >>> Signed-off-by: Joseph Hwang >>> --- >>> >>> Changes in v4: >>> - Use "Quality Report Event" without the prefix "Bluetooth" word. >>> - Combine both MGMT quality report command and event changes in a >>> single patch. >>> >>> Changes in v3: >>> - Swap AOSP Bluetooth Quality Report Event and Intel Telemetry Event. >>> - Add 5 new patches (5/9 - 9/9) to enable the quality report >>> feature via MGMT_OP_SET_QUALITY_REPORT instead of through the >>> experimental features. >>> >>> Changes in v2: >>> - This is a new patch for adding the event in doc/mgmt-api.txt >>> >>> doc/mgmt-api.txt | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ >>> 1 file changed, 61 insertions(+) >>> >>> diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt >>> index ebe56afa4..a494f5d7e 100644 >>> --- a/doc/mgmt-api.txt >>> +++ b/doc/mgmt-api.txt >>> @@ -332,6 +332,7 @@ Read Controller Information Command >>> 15 Static Address >>> 16 PHY Configuration >>> 17 Wideband Speech >>> + 18 Quality Report >>> >>> This command generates a Command Complete event on success or >>> a Command Status event on failure. >>> @@ -2924,6 +2925,7 @@ Read Extended Controller Information Command >>> 15 Static Address >>> 16 PHY Configuration >>> 17 Wideband Speech >>> + 18 Quality Report >>> >>> The EIR_Data field contains information about class of device, >>> local name and other values. Not all of them might be present. For >>> @@ -3858,6 +3860,46 @@ Add Advertisement Patterns Monitor With RSSI Threshold Command >>> Invalid Parameters >>> >>> >>> +Set Quality Report Command >>> +========================== >>> + >>> + Command Code: 0x0057 >>> + Controller Index: >>> + Command Parameters: Action (1 Octet) >> >> I remember mentioning that we should use Quality_Report instead of Action. >> >>> + Return Parameters: Current_Settings (4 Octets) >>> + >>> + This command is used to enable and disable the controller's quality >>> + report feature. The allowed values for the Action command parameter >>> + are 0x00 and 0x01. All other values will return Invalid Parameters. >>> + >>> + The value 0x00 disables the Quality Report, and the value 0x01 >>> + enables the Quality Report feature. >>> + >>> + This command is only available for the controllers that support >>> + either AOSP Bluetooth quality report or Intel telemetry event. >> >> The details below are interesting, but don’t have to be in this document. It is supported if the Supported_Settings indicate support for it. >> >>> + For a controller supporting the AOSP specification, it should call >>> + hci_set_aosp_capable() in its driver. The controller should also >>> + return version_supported v0.98 or higher in its Vendor-specific >>> + capabilities responding to the LE_Get_Vendor_Capabilities_Command. >>> + On the other hand, for a controller supporting Intel specification, >>> + it should set up the set_quality_report callback properly. The driver >>> + is responsible of setting up the quality report capability as >>> + described above; otherwise, a Not Supported status will be returned. >>> + >>> + This command requires to use a valid controller index. Otherwise, >>> + an Invalid Index status will be returned. >>> + >>> + The command is sent to the controller to enable/disable the quality >>> + report feature, and generates a Command Complete event on success. >>> + If the controller failed to execute the action, a Failed status will >>> + be returned. >> >> Can this be used when powered off, is it remembered over power off/on cycles etc. > > It is not remembered by the Intel controller over power cycles. I will > test the other AOSP vendors, and plan to address this issue in > separate patches in which I will describe the behavior explicitly. > Thanks. I think this means that on every power on we have to reprogram it if it was enabled before. That is how we handle other settings. They survive power cycles. And since we have a Current_Settings flags for this, I would expect it to behave exactly the same. Regards Marcel