Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp165067pxa; Tue, 18 Aug 2020 19:56:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxygEuGmW4eMFPIz1oIbQojf3hNN+e/zDqLdURgaNzZl1qt4rmU84+uN4cpU9iGjB0Wnk5e X-Received: by 2002:a50:de04:: with SMTP id z4mr23046605edk.10.1597805796078; Tue, 18 Aug 2020 19:56:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597805796; cv=none; d=google.com; s=arc-20160816; b=REbYXj1CaS7TulSOwTb4w8/HtlldBO4zU7uyfM5ljaXS46feZRQ0ZBy8wymS0v4H6S ONLBhTHldS+y+uzJOBOO034zxY7izQhN1gMzz68xugQSYaf6IIPfde+pBAWYp4mzVp9i 8o7l8I9JTPYoeymsGcbcZ8fmXkBMmyGOEuKvbiFWBFPGPcgZ+3lyHdSBqx6m0cCwOScr K9YYfOpyWqQhMpsnuYHhQr9Xq/u6muIzjDQHaieJGNSq0OEOhPkXvWtZmZ+wURmbSmuE 55vNWo0RYG9NM2tpIe/wH5zp4kGK7YbybhP0BXhCSe80PPGRSdHxRQ/9Eul3dfIg5afs FPKA== 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=lXeL2NqENRyGepDGalfKTgrjgpPAYVjCiCWgtC+osv8=; b=sv6p6xRZDKLGyZnPeLzu8WLUgzHYZ+g4nmdYCeP1HAmOX4CUtDax9Ic0Bl8v+p2u0I XPqSyiMq6Pj8dSl/ofRARluByTxmvg5NQwHthnEeRZ2+Z6ClqgbyaQPPcYQoyAdboLcM oYPVySNKylWY3dpGZx/Av4OH1Kxfe49AFEVKsT1a1Qhum8Joia7gdrawPut2hJMO5t3B LCdiAZpS3SVo5iBMjxJKGT0anXcVOx6uV9fw0TY24iw4Nds/3pPE9c4zi1XSuaJY6UgT FXJYbWSfu/owDN/xlV23r/cWimIVk4aE6pbsjO55opf09Q8GtLzWT04ILb+f33IKsC/5 aoSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=a4omXrGF; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h13si16008587ejl.221.2020.08.18.19.55.52; Tue, 18 Aug 2020 19:56:36 -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=@chromium.org header.s=google header.b=a4omXrGF; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726600AbgHSCsZ (ORCPT + 99 others); Tue, 18 Aug 2020 22:48:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727794AbgHSCsP (ORCPT ); Tue, 18 Aug 2020 22:48:15 -0400 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98814C061343 for ; Tue, 18 Aug 2020 19:48:15 -0700 (PDT) Received: by mail-ot1-x342.google.com with SMTP id c4so17905552otf.12 for ; Tue, 18 Aug 2020 19:48:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lXeL2NqENRyGepDGalfKTgrjgpPAYVjCiCWgtC+osv8=; b=a4omXrGFt2mE73+iut1A5IhTEFfx6pamQME9IhWd57cwGlHU0WCx/xyCsDMW9oCRx/ r5Je+Jnqvv1oGb7qtzaDv7HdK8PFQzuo5T1zxSjyPR57HwOTgkaLE65klwpLM+bA3M/d 6UjCbZvUpey/j0kaj3lyZFqRoIQMTdTLmSwIY= 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=lXeL2NqENRyGepDGalfKTgrjgpPAYVjCiCWgtC+osv8=; b=Px4TgheeMlejljseH29ryd+AWv23nD4F5IM9s4461KJtP8Im79IUL4Few+LWDKg9T0 UNGUO/AMDJqTqzDiLCnrnhgEz5Q71gmIaT6G+rcfOskVHvs/0KHcJLnpVga6jYbZuoLt 3WYGiB9xQanazfLHEQqFMH3RT8IrGa1TTPt1CMrvPIjXch9p+0tdPiAlv5X5YTgsJz7v 7maMxN2h73inf6KYpjKDE8xBXk8UHIyzVFLzAk6ATEXqVubGTUFbXhJ5NLXnBuPEzctK gjdjUIQPdnX4v/UrbA96jEFzBlfFYuGW5yYXcWF1iSykGFBX+Z5E6TA+EHQ0cDegjcnQ fshA== X-Gm-Message-State: AOAM530C9KWq0zENXgGzMGD6RsCiEjbFZy5z47/+/jYyYPIo17Dz0iZp wseBfFboQXoh2EXa/eOqAe7fOnIow8+5BcqVF+KAA4ufzHA410jl X-Received: by 2002:a9d:6f85:: with SMTP id h5mr17108737otq.81.1597805294630; Tue, 18 Aug 2020 19:48:14 -0700 (PDT) MIME-Version: 1.0 References: <20200813084129.332730-1-josephsih@chromium.org> In-Reply-To: <20200813084129.332730-1-josephsih@chromium.org> From: Shyh-In Hwang Date: Wed, 19 Aug 2020 10:48:03 +0800 Message-ID: Subject: Re: [PATCH v1 0/2] To support the HFP WBS, a chip vendor may choose a particular To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, luiz.dentz@gmail.com Cc: Joseph Hwang , chromeos-bluetooth-upstreaming@chromium.org, "David S. Miller" , Jakub Kicinski , Johan Hedberg , linux-kernel@vger.kernel.org, netdev@vger.kernel.org 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 Dear maintainers: These two patches are to expose the WBS sco packet length to the user space. Since different vendors may choose different USB alternate settings which result in different packet lengths, we need the kernel to expose the lengths to the user space to handle the packets properly. Thanks! Joseph On Thu, Aug 13, 2020 at 4:42 PM Joseph Hwang wrote: > > USB alternate seeting of which the packet size is distinct. > The patches are to expose the packet size to user space so that > the user space does not need to hard code those values. > > We have verified this patch on Chromebooks which use > - Realtek 8822CE controller with USB alt setting 1 > - Intel controller with USB alt setting 6 > Our user space audio server, cras, can get the correct > packet length from the socket option. > > > Joseph Hwang (2): > Bluetooth: btusb: define HCI packet sizes of USB Alts > Bluetooth: sco: expose WBS packet length in socket option > > drivers/bluetooth/btusb.c | 43 +++++++++++++++++++++++-------- > include/net/bluetooth/bluetooth.h | 2 ++ > include/net/bluetooth/hci_core.h | 1 + > net/bluetooth/sco.c | 8 ++++++ > 4 files changed, 43 insertions(+), 11 deletions(-) > > -- > 2.28.0.236.gb10cc79966-goog >