Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp444348lqb; Tue, 28 May 2024 23:30:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVUoWOLefb7PjxP6+w30QU2rymyfUSy2FAvKZGML00hYExydojTD8NiowgnXT8JKdTcROOcq9FFzl5PvYcW3BMzdnQu1BttXJovuxqVog== X-Google-Smtp-Source: AGHT+IHUZx9QIKn/T8l07mJ0yaLKi99ugJxa6MRcrT3Da+9UhPxrzYFQjch5fuZRQDccHNseUCK3 X-Received: by 2002:a05:6214:4907:b0:6ab:8f81:e964 with SMTP id 6a1803df08f44-6abcd0e08c8mr245795486d6.33.1716964219179; Tue, 28 May 2024 23:30:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716964219; cv=pass; d=google.com; s=arc-20160816; b=bGx6ajB03Ygu9kjs9wCc49E45432/4Mggo5zY/3/JtEC8jZwasBzqj7RwnK6lVrnZW LOno0eixYUn0ZjpSLX70LQbeIW4XVHpM8pGtSl5BDq94pE9ggY+Om1sqODat9YlTzrQi AdH9I9qtKVUvOepJl5K90OUGGqPYywgqopTNKGREZd+zASXRLtfE3Ax0LTIQn2++FI0l TUeuG625W3nagmTL0zVx7rLqw96vfRHVH6rxpg/cLXnJIul8mSROEFU99QCsD1nRcQlX wXRrSvc1ciaxjn8NOYZZ7d23u604L7XvDHaHx60TFss9fpYA0skC6qerW9umiH9CKax5 YXbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=hcavv1HUZOV2kpbFyPSmjWELv5BZ8Lp1wgJMCPBS5Og=; fh=hCUCV0br0LS2gL0tIN+7VEl76HGBTws3+qgN3MgZyy8=; b=wQggV2D9BOLfhaMxjkboWaGw/29AR+7DcTOlLJN4+uuU7G/ml4G5g7E0hVMS82F0Bq gjM0E0l144Rvvoa6ZOc37rgsrTkfInI1uIKgz+i9NPfqzzbplZ4iSsxd4M58bxfzdRdR AxpOpgPKqXv5u1bv6uSQHooKgtWgVIpjcVZETgGVTAUw2wCtXYcwCpar5kCUjnkKnrk/ uVHO4/Etg4AvDvYgyT/lCVql5CVQ30baMHVIlb8iKhvYJ1X41wQh1YGNKxVeJHvqNed8 icy3VyhObeI9uWy8Tn7xa/qlRfQCutdkdBJ23SM1yUHWSkVmfxZ5XFXpUAXwBBnPq+Jq 05vg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="lIyriiu/"; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-bluetooth+bounces-5012-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5012-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac06f884ccsi121925976d6.131.2024.05.28.23.30.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 23:30:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-5012-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="lIyriiu/"; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-bluetooth+bounces-5012-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5012-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8974B1C20F87 for ; Wed, 29 May 2024 06:30:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2659316192F; Wed, 29 May 2024 06:30:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="lIyriiu/" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26A8038DE8; Wed, 29 May 2024 06:29:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716964200; cv=none; b=GC/kozDYpAhOdSnhzxTlPvoaNW2ZomclNJLzZO5xtWOPNOihL6ZZiUO6ZgsajHG9DLQ0t6grshxvHRXnTvOYn1A6vt4uK/uVsld6t6eEjUU2W4mbYSyDq7sATb67YUkr3umkoM2h1d0FRHDJhoFJ2XbtgpukqhywynmyMeM54xo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716964200; c=relaxed/simple; bh=yNc6c575wO24db/jZO4zY7I3tzRguESPoDF5QbE9vik=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=stREXJngOZtaqu+yVwpda9mRfWWhKAh3ML/wlNVNEQZnTbDsKv1N6rBbovSyIsZzuW+ZCPY9LcV4F/w+ntA39Zk+aowMTlW/CYzGefyN6GLxg5/trng+7a+HEz0f5MTX286rWoF96kBpd/sslRGww4NFKpSVLtCqlzEHu1GLnwQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=lIyriiu/; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: daa1c1ca1d8411efbfff99f2466cf0b4-20240529 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=hcavv1HUZOV2kpbFyPSmjWELv5BZ8Lp1wgJMCPBS5Og=; b=lIyriiu/9avvEGCB6E6Dg6Va18+yOVhK2mwdcFbipSrmLlcDs+34aSROWc/DsUBP+mC2CPiXtQvn/FCxuzKoGD4rp5TcyZCSs9dutw2/Qnlu0biOz9zGEr6y50MGsJbkaSiiX4aC/IosqBDHlewclfePlJgne3fOge2IMKH4Fbw=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.39,REQID:e58c5c33-99a4-41c5-8a17-65ec32467035,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:393d96e,CLOUDID:832c5a93-e2c0-40b0-a8fe-7c7e47299109,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:1,EDM:-3,IP:nil,U RL:11|1,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES :1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULN X-UUID: daa1c1ca1d8411efbfff99f2466cf0b4-20240529 Received: from mtkmbs13n1.mediatek.inc [(172.21.101.193)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1469422158; Wed, 29 May 2024 14:29:51 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by MTKMBS14N1.mediatek.inc (172.21.101.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 29 May 2024 14:29:48 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 29 May 2024 14:29:48 +0800 From: Chris Lu To: Marcel Holtmann , Johan Hedberg , Luiz Von Dentz CC: Sean Wang , Deren Wu , Aaron Hou , Steve Lee , linux-bluetooth , linux-kernel , linux-mediatek , Chris Lu Subject: [PATCH v2 0/3] Bluetooth: btusb: MediaTek ISO data transmission support Date: Wed, 29 May 2024 14:29:43 +0800 Message-ID: <20240529062946.5655-1-chris.lu@mediatek.com> X-Mailer: git-send-email 2.18.0 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--2.018000-8.000000 X-TMASE-MatchedRID: nzUT9qf9ruiopRmPeyAwLqMVgdN9w+TCjzwigoyOACRV1D0dmUzw/HBy D++CQ+qklGAD91lyLGe/W5EIysmFeG8f0ErdfVpsMJoQm3jo+mmENvZav9mwIXv3ioAd9KrS9Gb SSaq0f4NlEs7ay6jM0o8X8tv4W+1B5JVxYapKMGCWLCkl1lq7BytovaaHxlUrukphpDG2sc6jxY yRBa/qJcFwgTvxipFa9xS3mVzWUuCMx6OO8+QGviNDRblz//Syvq6Lo4Zo2hOKkyNgFcVMNKEq1 CRF2XMzaQKqTUL7aor3Tv2Rn9W+/Xl2LFQeBovDI9tLypyWnhcSx1TcvNihU3mVKZusLp922v9O jYWA2uMMswg45VMfPadst5iAforfVlxr1FJij9s= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--2.018000-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 2CE555D1B8F43AB53DD8199D70524341E05A4676D3B9DB65AC2F429F4B069C272000:8 Since SIG hasn't clearly defined the specification about ISO data over USB transmission yet, MediaTek adopts a method by adding an additional interrupt endpoint for ISO data transmission which is different from current way on Bluetooth upstream driver using existed bulk. Interrupt endpoint has guaranteed bandwidth, sufficient max data length for LE audio packet and support error checking. These characteristics are similar to the use of ISO data. --- Change in v2: -Fix warning report from bluez.test.bot in btusb.c, align with other packet type to parsing dlen when getting iso data. --- Chris Lu (3): Bluetooth: net: add hci_iso_hdr function for iso data Bluetooth: btmtk: add macro to get/set/clear MediaTek defined flags Bluetooth: btusb: mediatek: add MediaTek ISO data transmission function drivers/bluetooth/btmtk.c | 35 +++++ drivers/bluetooth/btmtk.h | 46 ++++++ drivers/bluetooth/btusb.c | 295 +++++++++++++++++++++++++++++++++++- include/net/bluetooth/hci.h | 5 + 4 files changed, 380 insertions(+), 1 deletion(-) -- 2.18.0