Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2030160pxk; Tue, 1 Sep 2020 13:56:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyilkjlMC9BQSxe87X282zjziLtZgVTdrEUy+xZRovce5miCojpclh0Qgwx+se+kIlob9KM X-Received: by 2002:a05:6402:326:: with SMTP id q6mr3572341edw.216.1598993762531; Tue, 01 Sep 2020 13:56:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598993762; cv=none; d=google.com; s=arc-20160816; b=ZrITwDpjQQj1OMuUhvKEbZyBMyPqeqMDPvw386xcTI/sJq85mfcq6aOKU+Entwybu6 GzNscKrFAAJxUHMcvjvStB+eoGB+z3evCveVnX44LSxT+p6KBE69/cx1KGviDPC+FPrG Ud95tHbvPatL2nkVme8gJjI9xjTx284OHcwuKtsizd2ca+QjABUKPdUlCY8o7qs+Ia/C Q1NgoesDqClYSUxSlKSMelVQVFct/xsqEH9VJDXVj/HXplbXkUajJIn7IE8LV4FRwfTC Vh5PS/CUowTI4qTWm2JWcT5k4qwQYJOCa33okPdpsnjYPl8eu/PU1fVhJxyn47dut66F /9Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=V5UpJzUE90L64DBS3wKw8YpKexucWe/p4+rJOjr2UYQ=; b=Q9w+TY491cHhiFTXe/ylqKGKK6UoSmUYfrJNCLYpbSSsle9XUpZ5TukcyFXS0UTrTS HNNKvnxthjkhwXE5pRy8XBNxFd7gHMsosYcGv46HLRg0CKvG5bogW+MWTuc1nxOEWetD aQMlDkd673vC5k/FJRRoI9UoEWiebk8bhYT8K4aOPrNMF/uuRHu9kk/sRaWOkKcSq4h8 cNxs82PD5yItogTsGTROxpVumwwhWnvX0+u0jFvumMbbqUhfJYSG9Y7Eb3K4V4z9tQng 8XgEqa8QgXz5Cawx+dR4gpvsWRNwYUYKEz+VSb5AeDXuF8hKs96pR3ZYnSuSfZpythsN 9S2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VYh3gR4o; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay26si1248727edb.269.2020.09.01.13.55.37; Tue, 01 Sep 2020 13:56:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VYh3gR4o; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727788AbgIAUza (ORCPT + 99 others); Tue, 1 Sep 2020 16:55:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726091AbgIAUz3 (ORCPT ); Tue, 1 Sep 2020 16:55:29 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92FF7C061244 for ; Tue, 1 Sep 2020 13:55:28 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id r13so3259150ljm.0 for ; Tue, 01 Sep 2020 13:55:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V5UpJzUE90L64DBS3wKw8YpKexucWe/p4+rJOjr2UYQ=; b=VYh3gR4o4ynPNUoNggh2w4NV+onma3T5eo6+Lqg+JDD2dthFe0Qh56GueiWyqHTVre FvXgAj7eLWj1FHjDD2qG6Gv0jaqFN0+rDy00KaP+z8ciTWguJw9qy2keS8s3FU9Q4U38 F6ivkUdEAc9CHD2pZu8CKkpU779Bo+W/pJL8AyRcVT/CgfPrt2qIrUZxx9qO9azg5zBp lzpWtX0uyd1RAzXKSlHwPVeCiK/yQ+rxTcOcfl2K5ZB4+X4zJo1G8MgtYtY8NWAW49aA esQ0w+l/KMwr2FyqHvp0tH12kyA4k5B/l1xykfU3EyHW+c/Jw/7cvcTq14VallvSL70i 97xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=V5UpJzUE90L64DBS3wKw8YpKexucWe/p4+rJOjr2UYQ=; b=sj3x68LWcJrv4uOpHhUqNlyIFwl0SDflnzDsK8zgIVeIzTiHXI3lVVj+80ylLq5tcS vXdh2eqt752zqSWbsf0EJSHCXr2u/NQqYX+jMzXtM8oQ6H6ADOUBzcw+VZVHf8l9T3d2 BQARBfGwIEjdVCh1fXKqpd+DOHYxZWglmW9MbD3LcnHbcKQgvGiHztBDTEBbLyS2PMMD RsClRrmRFwq6cdfST/ffFDokFv1/Tb5us2XLXAY358Mj/0DTYsixQ2ql/X04x1tXOFtI VgJLssKfB6RCnWJ0Y7Fth5x20bUuef8RyNLETFdzfy5Hb8i/6RagQTz2uQYDYoTWhMAN Kqzw== X-Gm-Message-State: AOAM5307GQPHiT3d3ugPQCEKulDNQ1Q7VhJtzwpApV0MrF7jFta0zmbo ArFkM2Q+EonHzLfk+drsVVhkzXZv0otSXN3r6x03qg== X-Received: by 2002:a2e:b4c6:: with SMTP id r6mr1481576ljm.274.1598993726032; Tue, 01 Sep 2020 13:55:26 -0700 (PDT) MIME-Version: 1.0 References: <20200817212554.3844965-1-yudiliu@google.com> <20200817142545.RFC.v2.1.Ibaa1dfd49179a141c19a651f3c2132a28b71b344@changeid> In-Reply-To: From: Alain Michaud Date: Tue, 1 Sep 2020 16:55:14 -0400 Message-ID: Subject: Re: [RFC PATCH v2 1/1] adapter - D-Bus API for querying the adapter's capabilities To: Luiz Augusto von Dentz Cc: Yu Liu , "linux-bluetooth@vger.kernel.org" , ChromeOS Bluetooth Upstreaming , Archie Pusaka , Sonny Sasaka , Marcel Holtmann Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Luiz, On Tue, Sep 1, 2020 at 4:48 PM Luiz Augusto von Dentz wrote: > > Hi Alain, > > On Tue, Sep 1, 2020 at 12:00 PM Alain Michaud wrote: > > > > Hi Luiz, > > > > > > On Tue, Sep 1, 2020 at 1:47 PM Luiz Augusto von Dentz > > wrote: > > > > > > Hi Alain, > > > > > > On Tue, Sep 1, 2020 at 8:43 AM Alain Michaud wrote: > > > > > > > > Hi Marcel/Luiz, > > > > > > > > I'd be particularly interested in seeing your opinion on whether this could be better described as some form of SCO socket property... even if this is indeed an adapter property. > > > > > > Yep, but wasn't that supposed to be what BT_PKT_STATUS is for? I mean > > > one can just attempt to read it with getsockopt and in case of returns > > > an error it means the controller does not support it, that said it > > > doesn't look like we do check the adapter features when using > > > BT_PKT_STATUS, should that be checking if HCI_WIDEBAND_SPEECH_ENABLED > > > is set? > > The problem here is that this will be after the connection is created > > and a packet is exchanged. In this context, we'd like to know if the > > controller supports it ahead of creating a sco connection so we can > > choose to use the headset at all. For example, there are devices and > > circumstances where using the device's built-in mic and A2DP will > > yield a better experience for the user so the platform may choose that > > as a default for the user rather than degrading down to narrow-band. > > You can use get/setsockopt after bind, so I wonder if that is really a > problem here, in fact BT_VOICE wouldn't work if we couldn't use socket > options before the connection is made see how it is used in ofono for > instance: > > https://git.kernel.org/pub/scm/network/ofono/ofono.git/tree/src/handsfree-audio.c#n105 > > Also in order to use WBS one will need to use BT_VOICE anyway, > actually that all you need for WBS with mSBC while BT_PKT_STATUS will > indicate the possibility to do PLC, not sure why we are mixing these > things together or does HFP mandates mSBC to implement PLC nowadays? This is a design choice, one that must be done before a device connected on our platform. Note ChromeOS doesn't use ofono. It's not just about choosing to do mSBC, but rather about which mic the overall platform will use (onboard or from the headset/speaker). > > > > > > > Also it doesn't seem we have updated userspace to support > > > BT_PKT_STATUS, we should probably have something to test it via > > > isotest and perhaps create a iso-tester.c to validate all the options. > > > > > > > Thanks, > > > > Alain > > > > > > > > On Mon, Aug 31, 2020 at 5:44 PM Yu Liu wrote: > > > >> > > > >> +Alain Michaud > > > >> > > > >> Hi Marcel, > > > >> > > > >> Can you please comment on the cl as well as Luiz's suggestion? Thanks. > > > >> > > > >> On Thu, Aug 20, 2020 at 10:20 AM Yu Liu wrote: > > > >> > > > > >> > Friendly ping for comments from Marcel. Thanks. > > > >> > > > > >> > > > > >> > On Mon, Aug 17, 2020 at 4:17 PM Luiz Augusto von Dentz > > > >> > wrote: > > > >> > > > > > >> > > Hi Marcel, > > > >> > > > > > >> > > On Mon, Aug 17, 2020 at 4:07 PM Yu Liu wrote: > > > >> > > > > > > >> > > > From: Archie Pusaka > > > >> > > > > > > >> > > > Initially this is introduced to query whether WBS is supported by the adapter, > > > >> > > > the API is generic enough to be extended to support querying others in > > > >> > > > the future. > > > >> > > > > > > >> > > > Reviewed-by: sonnysasaka@chromium.org > > > >> > > > > > > >> > > > Signed-off-by: Yu Liu > > > >> > > > --- > > > >> > > > > > > >> > > > Changes in v2: > > > >> > > > - Return an array of strings instead of a dict > > > >> > > > > > > >> > > > Changes in v1: > > > >> > > > - Initial change > > > >> > > > > > > >> > > > doc/adapter-api.txt | 12 ++++++++++++ > > > >> > > > 1 file changed, 12 insertions(+) > > > >> > > > > > > >> > > > diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt > > > >> > > > index 1a7255750..8fbcadb54 100644 > > > >> > > > --- a/doc/adapter-api.txt > > > >> > > > +++ b/doc/adapter-api.txt > > > >> > > > @@ -204,6 +204,18 @@ Methods void StartDiscovery() > > > >> > > > org.bluez.Error.NotReady > > > >> > > > org.bluez.Error.Failed > > > >> > > > > > > >> > > > + array{string} GetCapabilities() > > > >> > > > + > > > >> > > > + This method returns a list of supported > > > >> > > > + capabilities that is populated when the adapter > > > >> > > > + initiated. > > > >> > > > + > > > >> > > > + Possible values: > > > >> > > > + "wbs" - Wide band speech > > > >> > > > > > >> > > Btw, should we stick to use wbs terminology here, or we should > > > >> > > actually use the HCI feature/command, because wbs has actually to be > > > >> > > implemented by the HFP afaik this is only indicating that the > > > >> > > controller is able to notify packets drops, etc, with use of erroneous > > > >> > > command. Perhaps we should actually use the term PLC (Packet Loss > > > >> > > Concealment) instead since that seems to be the real capability here, > > > >> > > afaik WBS does not actually require PLC. > > > >> > > > > > >> > > > + > > > >> > > > + Possible errors: org.bluez.Error.NotReady > > > >> > > > + org.bluez.Error.Failed > > > >> > > > + > > > >> > > > Properties string Address [readonly] > > > >> > > > > > > >> > > > The Bluetooth device address. > > > >> > > > -- > > > >> > > > 2.28.0.220.ged08abb693-goog > > > >> > > > > > > >> > > > > > >> > > > > > >> > > -- > > > >> > > Luiz Augusto von Dentz > > > > > > > > > > > > -- > > > Luiz Augusto von Dentz > > > > -- > Luiz Augusto von Dentz