Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1151401pxa; Thu, 13 Aug 2020 01:43:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyR6iJZ1m3+BLYbhUEvve14LaE4JmKXQUQk9w28G2qU60npab3xxXpECDPRQ5zRRo5a/3j0 X-Received: by 2002:a05:6402:17bb:: with SMTP id j27mr3543760edy.291.1597308189512; Thu, 13 Aug 2020 01:43:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597308189; cv=none; d=google.com; s=arc-20160816; b=DMM1d0/3p5hoXuLVsMAOo8kO9Ttd7dAAddqd0D0jJZnD4oBt5iGu1L77wE2Oe9HVau R6zIMA6RS7VH/ie0iX16MdN8davZxVY45dw6Za1firvdCLniYBoUNxw4dLK7JKYlhhF7 QJh2iJpTLah6/k6C4mOvCJ0q8/u9KIsRG6JA92tB8V9szJZBVrbrzofUG/PcLazeGmv8 w25eZlQc/IW7uk2JSZSNLhOx4TSfKHYEZSSRyRAnoUtvsMzLfWXg4r5mbBSqfyJ74xLU i0vlMuoncQnyaUucMZiTgYWB57z8ELusUcZcyzy6/CKPAxWKcEBiGS70IVeEP85Zddie rc2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=UbdKBrdotq83jU1QMt2IgDl1E5bjqx/qouMsGAbK12g=; b=mVjQ+ASGmtD2eCcaeJ+TA1P4ltAaMEvmwfE35+Nt2Ueu5Sx3DQ8ZQhi9N9ApzV0pqh SH6Dvhur1+4QtfHSH0H/TjotbMDhFaqYnLE/pAMCuootHdzo6AIM4zAHrCwtA1d2Tls4 yzDnk2pshbIoAvkJVhumkEpoNJqyI3JqolaX2dSgjXAaZZ7ZXyPQJpHfeHqQAVmJwfZW clCc3tf2BhjZnCt7LTQUF9i4BFkT0FLEZUdw7o2mCFdQBryj+Ere25/E8THJqnCSs7Do YypPH3iaCr9o3rpEYW/cK0keplXz/gGObey89fcga5TSbZ4S/Qa59HZPriBdme2Hk+We sTwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OYR7Bzfl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 k24si2868281eds.441.2020.08.13.01.42.46; Thu, 13 Aug 2020 01:43:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=OYR7Bzfl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1726750AbgHMImE (ORCPT + 99 others); Thu, 13 Aug 2020 04:42:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbgHMImD (ORCPT ); Thu, 13 Aug 2020 04:42:03 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2A7EC061757 for ; Thu, 13 Aug 2020 01:42:02 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id d4so2435193pjx.5 for ; Thu, 13 Aug 2020 01:42:02 -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=UbdKBrdotq83jU1QMt2IgDl1E5bjqx/qouMsGAbK12g=; b=OYR7BzflZ0O26S/A/8KyvAlO9i5MxabYg3uJa4lwLP/KO8VpoWe1AGRaLgoCvgILZ5 p9+GoT6fxqwL+icHSjdQqdh2Fskcy629eO6zofQY/xX+VYwCo5TgfzB8Fop7L3jCxNb5 +OM9N8p9615NU0FnPwJPjVhkN7i2zeP39mdaY= 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=UbdKBrdotq83jU1QMt2IgDl1E5bjqx/qouMsGAbK12g=; b=kJk2QoFFxVRYzSXFRcFszgNC3VIWeXu1SQso5sM5LgOMrw3zND55TPVU/Z6DkTdT5G VTFz4ZCc0HtLCpi8ujsDFV9cXmfF/YfA6CvHyD4zE5bgexfZ1gYCNwnHFUDvo7/Y1gPm cteFmJO1sq1Kuy7Elv+qvCoCPpDLJztGWdU3cliIMdsHCeAVDs82yj1hOtV9ihBTJ3pV Tn6FBwv6Hpk5lgFi0yCndPHsnedqt4drIhQxiyozzd+J0hil/I6I6UwWhw2lLO1sbRX/ ssVOMrS24sJB+H1G6YIJjUUUofVdlXSXebGcm+82xa4RaibMEB5VYEBlWavXm9SgYE1w Tu8w== X-Gm-Message-State: AOAM530/uK/dmnOdmk7eVzd7GLSTiw+dCuz3CoMykAI4NXXdrcCPIoZO qR/zNu5ImhfFuL4F0kb/+U8VEQ== X-Received: by 2002:a17:902:8a85:: with SMTP id p5mr2996916plo.193.1597308122498; Thu, 13 Aug 2020 01:42:02 -0700 (PDT) Received: from josephsih-z840.tpe.corp.google.com ([2401:fa00:1:10:de4a:3eff:fe7d:ff5f]) by smtp.gmail.com with ESMTPSA id y29sm5032035pfr.11.2020.08.13.01.41.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Aug 2020 01:42:01 -0700 (PDT) From: Joseph Hwang To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, luiz.dentz@gmail.com Cc: josephsih@google.com, chromeos-bluetooth-upstreaming@chromium.org, Joseph Hwang , "David S. Miller" , Jakub Kicinski , Johan Hedberg , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v1 0/2] To support the HFP WBS, a chip vendor may choose a particular Date: Thu, 13 Aug 2020 16:41:27 +0800 Message-Id: <20200813084129.332730-1-josephsih@chromium.org> X-Mailer: git-send-email 2.28.0.236.gb10cc79966-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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