Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp561068lqp; Wed, 12 Jun 2024 09:23:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvw++T94xfq8vcf/Zd6MKfE+hv2a7q9+S8RFcHDwJQVnOUl3YnIqLu2fEKZtQkTdRrMV/ctf3F+7+dP+nyl+xZ/aowskoyf/6l/yolnA== X-Google-Smtp-Source: AGHT+IEh+6PT9m5XRpfjz5QI4h7KfblmnKeRb0Ry/vP3XeyQWgjA/rJPbwlqLxuN6JObAPEz6ZaD X-Received: by 2002:a17:907:940b:b0:a6f:2e43:80d7 with SMTP id a640c23a62f3a-a6f47ff78e1mr164779966b.49.1718209386709; Wed, 12 Jun 2024 09:23:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718209386; cv=pass; d=google.com; s=arc-20160816; b=1BxIIln/vJ6DZy3lXPTacm/LpdrHwZ6keSBGbjONWmSgD6C5H9byPY3y/uWkR3o0y4 HUwQGK79Vh0xtH84QQXOV//APnDFuotC7IZSG8VlJeY+rps94+owTm5TI306M7ahVHtW YNUVcd01lu7ezrt67ba8x8LWrT1CWzjrZPxdqWTx3+Vje6FX1/H3zXfgN/MGPCM54rfr JlqhpkXjr7W8Wh6GA4frGwhcAJDO1SExo46ooFYTBqvagsy3B2vfXEdkY6/PrzzSX6Wq cJJfOlS8uDNo5mLfuumF/RJFGcwq+eyg+xpRSKicFwknWtMMTK2x4x2Qt1l43j6JkM5i 37hg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=BJ4Urr2hqS4mMt0vlDSjQ9WOcUh1GOV8mx3C64mOQdo=; fh=Gg33OXRnrPRrTdx+nczYYEEAdxDOorVRrtzYqt0L5Tg=; b=we9LIOcdY1HXsK5yCegEt7f4bTFdXiGD/nv4zfzaILqz1LZt8C2FRKuMs56QVIEGNw L9m9ojKd+pe9SDukEdXttNE3JJ58gWZEem9mx+05euD/7mZ8aS82fAQlDXKzLKkCB3Rd at57PTzizHEht/16GgcnwcvdHMR1u+DRGkexfELn6vLXuteWdtAD7Qc3BBuJP2ftxi9Y T5iUbJYnry+cTGJ0rfC5k2BQZeq29Mp29hq+qrD1aXpdXi+Rf+jqtjpqNPl48/1itaLV t7UdXsHkvw5C2qHkXIeX8+EQ+fRPflX6UytDehl4LK8Scz8KBMq0g6d++rMrvA8Rj5U3 XjNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@asymptotic.io header.s=google header.b=IXOO+2ew; arc=pass (i=1 spf=pass spfdomain=asymptotic.io dkim=pass dkdomain=asymptotic.io dmarc=pass fromdomain=asymptotic.io); spf=pass (google.com: domain of linux-bluetooth+bounces-5286-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5286-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=asymptotic.io Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c674349ddsi5549979a12.118.2024.06.12.09.23.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:23:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-5286-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@asymptotic.io header.s=google header.b=IXOO+2ew; arc=pass (i=1 spf=pass spfdomain=asymptotic.io dkim=pass dkdomain=asymptotic.io dmarc=pass fromdomain=asymptotic.io); spf=pass (google.com: domain of linux-bluetooth+bounces-5286-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5286-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=asymptotic.io 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2CAFD1F2218C for ; Wed, 12 Jun 2024 16:22:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65BF7181B9B; Wed, 12 Jun 2024 16:21:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=asymptotic.io header.i=@asymptotic.io header.b="IXOO+2ew" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60CF1181322 for ; Wed, 12 Jun 2024 16:21:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718209266; cv=none; b=lSM/4xxTaN6q9Zn66JoNxg/WGr/ajeQSJUp7jgdH2IswukH9sQemCxQn6BAfSeEjxV/cRQ2zV9ViWR5W89S6QP34KTN1DicXHh8QKsUMLwPvhDkbHr0GoN92P7vkx+ubqmrak3mA7d2Fu6lyAwRMdPzipMhmS2NixEOtrQKyuew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718209266; c=relaxed/simple; bh=tWxTnaRYFMMgUA1uoZkjyI7l71MDLnDTsfG6AnAy/Zc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=CeZXd/oS8ketxbYxLjUBx7uG9OqVts6GPAT8c2L6TlnJYl2nmNxkZMtchjadYG5/mPbIbQIUd7ZLrN3QXtgneU4DgTWHKIOcCuIV5TiYYC26AuEUeIUgz1MBiZF6KVcu0fdGCweM4Cdhs2XToOzrcbGuxM5PW8ozjYKyz2mjzuw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=asymptotic.io; spf=pass smtp.mailfrom=asymptotic.io; dkim=pass (2048-bit key) header.d=asymptotic.io header.i=@asymptotic.io header.b=IXOO+2ew; arc=none smtp.client-ip=209.85.222.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=asymptotic.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=asymptotic.io Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-797dcb558ebso111903885a.2 for ; Wed, 12 Jun 2024 09:21:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asymptotic.io; s=google; t=1718209262; x=1718814062; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BJ4Urr2hqS4mMt0vlDSjQ9WOcUh1GOV8mx3C64mOQdo=; b=IXOO+2ewRzlGSgR0hfied5BG7x4IjX0MQBDSgSpzU6R+C4ApXPu+y71N/jc9/NJe4a 9ae/JN4qK50IPmEybdSBD81YYYZbiJEGLNvQs4huIyM9TG0Vg7LRZvydmPhLu2GAcTtM qamL/L4HRtpYikJlPEFQAvKjGBipDAfmH0F9U2MX2IZs3k6G/khLuWf0/mUjuiQGqrQT CY/Ib3vPZUYGnPKzOO4FpgWtLcduLxIWcBq4Px+hlsNDJ9eDumy7CYVBZte8hPAWFYts HFjVlAGhaZpllosyqzNhothWt3h7iRG7/B3EyysaaiHTgDBv0PGjH+aLNMdJHhVZSFTb k6FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718209262; x=1718814062; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BJ4Urr2hqS4mMt0vlDSjQ9WOcUh1GOV8mx3C64mOQdo=; b=Jm61B7MegKC+nm//5VF5pksUFESLradm9FOoEmpsf0qdy51t4hQ8kchBjj8x/suLd6 S2UqFZOUl143m2rgo8uHlBeboYyR7cWSV41Z6AzONMXQQ0JQGK5Ao1LRofVXSul4In1Z Lk/2jPwKCZdt+Rt5qT3ZvHQGqF2tDPKvm7Bw3Crh2f+QZ+xAXG3d9Ed0Zz5X6EEdi1yS ev8S6R9mbOEIvTNIZAo8GEkg8n9jpIkQCcpyLmtCyRbgerqki++v/ik4SUNXC9Tdcwhq zPpiiufGQzTTDwBaLbpyo/BmcUWmHcG500C/fh9k+krpz1maFhR9cCYjK3mhtQSuzP6J SSDg== X-Gm-Message-State: AOJu0YxZWMCfEIrLPQhChJ+V8T1nfElVW+VBg4g9gR4oqJkoSB5TEXSD e2TzIesKW+wSk9ZA/cVAX6zIqYlocTdoKVktqLlLymO4aODtLNCesz9bBYjoRCoTkppFo3kDgUB x404= X-Received: by 2002:a05:6214:5908:b0:6b0:63fa:c42 with SMTP id 6a1803df08f44-6b191a64578mr26769196d6.26.1718209261682; Wed, 12 Jun 2024 09:21:01 -0700 (PDT) Received: from andromeda.lan ([70.27.101.40]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b089aa106csm21899616d6.127.2024.06.12.09.21.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:21:01 -0700 (PDT) From: Arun Raghavan To: linux-bluetooth@vger.kernel.org Cc: Arun Raghavan Subject: [PATCH BlueZ,v10 0/3] ASHA plugin Date: Wed, 12 Jun 2024 12:20:38 -0400 Message-ID: <20240612162041.689679-1-arun@asymptotic.io> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi all, Here's v10 of the patch, with some lints fixed. Also recapping the rationale, plus some additional information on testing so far. This is an implementation of the Android specification for streaming to hearing aids over Bluetooth LE, ASHA[1]. ASHA predates the LE audio specification, and has been supported in hearing aids for a while now, so I think this is worth supporting as these devices should continue to be in use for several years. I've reused the MediaEndpoint1 and MediaTransport1 interfaces at Luiz' suggestion. The flow is slightly different from A2DP and LE Audio in that there isn't really a negotiation step, so the endpoint and transport are both available on connection. Also included is a script to stream arbitrary audio to an ASHA device, which is handy for making sure that the implementation does work. I have tested this against an implementation on a reference board, and various folks in the community have also been kind enough to test the WIP patches on various devices, so tested devices include: * onsemi RSL10 board, reference implementation from the onsemi forums[2] * Signia Styletto AX * Oticon More * Starkey Arc AI 1200 The current implementation is written with a single device in mind. My plan is to take this to completion along with a PipeWire implementation to expose a single device for playback, and then do a second pass to support a pair of devices. Cheers, Arun [1] https://source.android.com/docs/core/connect/bluetooth/asha [2] https://onsemineworg.my.site.com/onsemisupportcenter/s/question/0D54V00006r9FUVSA2/dsp-initialisation-hangs-in-bleandroidashaod-code Arun Raghavan (3): src/shared: Add initial implementation for an ASHA profile profiles/audio: Add an ASHA plugin test: Add a script to test ASHA Makefile.am | 3 +- Makefile.plugins | 5 + configure.ac | 4 + lib/uuid.h | 3 + profiles/audio/asha.c | 525 +++++++++++++++++++++++++++++++++++++ profiles/audio/asha.h | 38 +++ profiles/audio/media.c | 30 +++ profiles/audio/media.h | 2 + profiles/audio/transport.c | 201 +++++++++++++- src/shared/asha.c | 359 +++++++++++++++++++++++++ src/shared/asha.h | 63 +++++ test/simple-asha | 166 ++++++++++++ 12 files changed, 1396 insertions(+), 3 deletions(-) create mode 100644 profiles/audio/asha.c create mode 100644 profiles/audio/asha.h create mode 100644 src/shared/asha.c create mode 100644 src/shared/asha.h create mode 100755 test/simple-asha -- 2.45.2