Received: by 2002:ab2:6991:0:b0:1f2:fff1:ace7 with SMTP id v17csp232476lqo; Wed, 27 Mar 2024 11:22:06 -0700 (PDT) X-Forwarded-Encrypted: i=4; AJvYcCVf3veueGRmEKP2jYPSsfgYz9N37lTEwGGTqSNKUzD02TVa7Z4ZX7/5FM5tgGoMu5afIQWeto7Vi0iiJ848K91OTSsHn6dnxi9VBLnbPQ== X-Google-Smtp-Source: AGHT+IEHXP3ZNKS5vqPuxRyAKDq8zHp7iiPLGGegwNO0VzxZi8p7uUrecmmxIyZIE6coXY6JnO7y X-Received: by 2002:a17:902:6848:b0:1e0:cd89:752d with SMTP id f8-20020a170902684800b001e0cd89752dmr505437pln.39.1711563725788; Wed, 27 Mar 2024 11:22:05 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1711563725; cv=pass; d=google.com; s=arc-20160816; b=ksD224CD4e04mixNT29f1ALB2hvZMkLr6t6+WOhn5fUq5GDyCGcAIiZXGuCK+/EN2D rZ0WTUnwa91hr1ZMrqiKvvGd13yvnBIpNop5EiYtuYu4AVm8/gm3rTyZvevKZk2fqOAA 5O8Ty4yEvOw4weP9D+dkKbDV/bTBkV9qVXTDw6C+/Vhn48+IPpY2W3UnWIHQ3hvoYcod qdOjGjFjq3lsylCUW9DU3EagSjKpWZpQ3UnwZRAho17m5YtWWXJbMsmmhfHv+vY7RxKX 7femC1sksrIGE1zPLNSVc/7rXQarh9NfN5VIiplum3kSk4Bh24+vPLRgInnT2s5obcvW P8RA== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=j9EA0UExgbX1WInt5ZoJG2EjPTuGDFnMzq9wnkLXeNE=; fh=t5C6upqD4tpAZ6HCu0MUBCUIkZ+CITLxP2355sexUgo=; b=WZGfZaK7o5Otxv0AJKk6+fTS67MkeMWmnF+v8c6zOuV2acdLL38RLbFOa1+2w6NlmI MmATXff6168i+9Vm6dzOmcF9jQwHesz6alwMGMEje5FnQdpbw6KqpzPuFcToue8/DIIP 23NK6U9SOzZu6fGIZn7S1zpFVdUYK5TXMJAa9hUOC1ynsvLqcwjFtAuRxNvi7BfLlHbP p/fvyNKTYFKDvYJBjB9fqzmB7p39/80MxnSwSjK/LrpWZfXN6FPOr3diNmPBX4gGVlld fSwxgkc4DWgpScryEN2K1evBZlpm5dO2QDn8ZHdmy5G7S82ofRufO1tPbasoUlxdny2+ nQxw==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@iki.fi header.s=lahtoruutu header.b=qy1X3yXS; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-bluetooth+bounces-2865-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2865-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id jj5-20020a170903048500b001e0cdc908b1si5233798plb.312.2024.03.27.11.22.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 11:22:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2865-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=lahtoruutu header.b=qy1X3yXS; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-bluetooth+bounces-2865-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2865-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 536B7B28B1E for ; Wed, 27 Mar 2024 17:54:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5290152166; Wed, 27 Mar 2024 17:48:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=iki.fi header.i=@iki.fi header.b="qy1X3yXS" X-Original-To: linux-bluetooth@vger.kernel.org Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) (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 E19274E1C8 for ; Wed, 27 Mar 2024 17:48:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=185.185.170.37 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711561697; cv=pass; b=DoYrouOTy2244TIWN4X6hBMqn1xcKQ7JKaztDFbAp5yWmd5AMD8o/cjOJln+LeoDwQMB9V1UA0K6zZfV9JQ1L0vhMBxtXFJuUogdKBCEg9x4Z1gtQAqpo2NBDuf2bLe69Cu7NiZ0nMHpqnNO1dIvhBW/Yj9ZCeDcz+UO+aGIO/g= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711561697; c=relaxed/simple; bh=65f87D93HOxCkJxeE52Lp1dnj2szf9UN74cOh+MAr0I=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=Wzx6743GTORHDwDw1vlPtA9ennJobvvNI7YFOVlHByar0ok7iU7+AWeHKp5dnBY/pdB+DQ5RziCyzHMcmojt2/jclrSJAErWwuSWUI8JaBoXCX+5I8eZSn3ncS5/CVL913X2dbkJMlbPJhr27i51+Z+BSTnQzhlCTZYBoGyXeKI= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi; spf=pass smtp.mailfrom=iki.fi; dkim=pass (2048-bit key) header.d=iki.fi header.i=@iki.fi header.b=qy1X3yXS; arc=pass smtp.client-ip=185.185.170.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iki.fi Received: from [192.168.1.195] (unknown [IPv6:2a0c:f040:0:2790::a03d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pav@iki.fi) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4V4Yzl58qVz49Q5L; Wed, 27 Mar 2024 19:48:03 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1711561685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=j9EA0UExgbX1WInt5ZoJG2EjPTuGDFnMzq9wnkLXeNE=; b=qy1X3yXSMGELupoGNslmEot97BjN4BgFcHpNsgxmapv/5l6p4lOGzFGHatqn86hRdxSU2s Ok35R05R0pEgixzzOwZW4uoico+uZWOtNRVZUn5W8G611SxRNld8IVPdFGfXsuma+O9WdA XmAqIEGKcZO4x3VyjNQO0isFAV2U7xPOyTdk3885lu/uS0wwZwFVnP49iNzdu3M2gyQC6Y 9n+vOL77AeqzVfYCcSsaWru12G8UIjyoDWZD6ZQfQCqjZwC2/u4YTi9O0t1mZpl9fU/R6y 91SqcSrOtEnn5BGoBskepfO28jjYCtIDU6kf3f7tAQ9TO5ejGzre7obK4/HPvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1711561685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=j9EA0UExgbX1WInt5ZoJG2EjPTuGDFnMzq9wnkLXeNE=; b=aEjcQo3Ib5+v14knz0eW0WW3i4X3hhrziuxGptclaL9RtsAU3G9sQ+WRSh/8TaYNQJPxG2 r6zITj3IHJLboUDvpAolKk/OUw4TCQFQo3h3iNeh24stCvAH7Jry1oOZ9VGxeZFa1lX1n8 QzdmY9HhCV5XqyCJX+qWKN0sfEC7Fh0gvaE8CPvUGYLtB9LUZnyW5Lg6M1ZET3RBxLTft1 JG5a2QbHPkMtuxPfnZaIHwRnIs+Rvpeakm/CCFLCcl5IBmxfR9wMQfn5rhP9K5W2exdKlK lgYZNZQLeXXHzvITdXZCuc/ewcfO5Dj/iduvIJjF2iEHaegaLcbO0DSpdL1f5g== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=pav@iki.fi smtp.mailfrom=pav@iki.fi ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1711561685; a=rsa-sha256; cv=none; b=nQDy7yDYJB06GoVIpZmzcV5ft39fEHfurFFdu/l0CuDFxe0RfmfbxDSiS70co0YuqZYdKu vJW+udmqHUPo32x5kE9N8iu4sJ+lYAGuABXNtsPbDu1PeZf+S0ZRgDjSJPhrUCGcmAC/uR zaXj+vkA8qRITWoA/OU+Gx4QWGQyWzODHnmN4Buqt7WNi/yN1FZEDsP0+d1l9sj9MjVugu zThAwJXtMeWzfMkoNLelU9lr50muDepJyZW4HahdMEaQAOeVAIjbVD+xEy/qz20pz2n4xi r8S8zTMrqJThLy5jFqZwIojU6mdJYXW5WvmNWm+BMHSfXM7LEtsix7CAsxj/ww== Message-ID: <0b191e2c9773ab6d559bd8d72ae36c509c02999b.camel@iki.fi> Subject: Re: [PATCH BlueZ 2/2] iso-tester: Separate iso_defer_accept into dedicated functions From: Pauli Virtanen To: Luiz Augusto von Dentz , Iulia Tanasescu Cc: linux-bluetooth@vger.kernel.org, claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com, silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com, andrei.istodorescu@nxp.com Date: Wed, 27 Mar 2024 19:48:01 +0200 In-Reply-To: References: <20240327161019.3078-1-iulia.tanasescu@nxp.com> <20240327161019.3078-3-iulia.tanasescu@nxp.com> Autocrypt: addr=pav@iki.fi; prefer-encrypt=mutual; keydata=mQINBGX+qmEBEACt7O4iYRbX80B2OV+LbX06Mj1Wd67SVWwq2sAlI+6fK1YWbFu5jOWFyShFCRGmwyzNvkVpK7cu/XOOhwt2URcy6DY3zhmd5gChz/t/NDHGBTezCh8rSO9DsIl1w9nNEbghUlcYmEvIhQjHH3vv2HCOKxSZES/6NXkskByXtkPVP8prHPNl1FHIO0JVVL7/psmWFP/eeB66eAcwIgdaUeWsA9+/AwcjqJV2pa1kblWjfZZw4TxrBgCB72dC7FAYs94ebUmNg3dyv8PQq63EnC8TAUTyph+McnQiCPz6chp7XHVQdeaxSfcCEsOJaHlS+CtdUHiGYxN4mewPm5JwM1C7PW6QBPIpx6XFvtvMfG+Ny+AZ/jZtXxHmrGEJ5sz5YfqucDV8bMcNgnbFzFWxvVklafpP80O/4VkEZ8Og09kvDBdB6MAhr71b3On+dE0S83rEiJs4v64/CG8FQ8B9K2p9HE55Iu3AyovR6jKajAi/iMKR/x4KoSq9Jgj9ZI3g86voWxM4735WC8h7vnhFSA8qKRhsbvlNlMplPjq0f9kVLg9cyNzRQBVrNcH6zGMhkMqbSvCTR5I1kY4SfU4fQqRF1Ai5f9Q9D8ExKb6fy7ct8aDUZ69Ms9N+XmqEL8C3+A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text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi Luiz & al., ke, 2024-03-27 kello 12:50 -0400, Luiz Augusto von Dentz kirjoitti: > On Wed, Mar 27, 2024 at 12:10=E2=80=AFPM Iulia Tanasescu > wrote: > >=20 > > This separates the iso_defer_accept function into dedicated ones for > > unicast/broadcast, since the flow is different for each scenario: > > For unicast, POLLOUT is checked on socket before calling read and > > adding a G_IO_OUT watch. Checking for POLLOUT is not necessary for > > broadcast, since currently this event is never generated on the > > child socket. Instead, G_IO_IN is generated after BIG sync is > > established and a BIS socket is ready to be accepted. >=20 > @Pauli Virtanen Is this inline with TX Timestamping though? Or that > only cares for POLLERR? AFAICS this won't interact with TX timestamping. The timestamping only cares about MSG_ERRQUEUE which is not touched here, and also the setup here seems to concern what happens before user sends payloads, so before there is going to be any timestamps. > Also it would be great to know what are the plans of PW with respect > to broadcast, I was thinking something like this: >=20 > 1. Broadcast Source: Have some dedicated card that can be configured > via configuration file or a dedicated app that performs the > configuration which can then select what streams shall be broadcasted, > since broadcasting things like system audio notifications probably > doesn't make much sense. > 2. Broadcast Sink: This shall be a little bit easier since we now > enumerate the BASE found over the air, so it should work very closely > to unicast, but perhaps you may also want to start a scan session > while the card selection dialog is open so the user don't need to use > yet another app to trigger it, or perhaps this should really be done > at Bluetooth system settings that way PW don't show any Broadcast Sink > until the user selects it at Bluetooth APP, this way we don't clutter > PW interface with unsynchronized Broadcast Sinks. Note that in the > future we are going to remove the step of creating a MediaEndpoint for > Sinks since they are already configured over the air they shall appear > as MediaTransports ready to be Acquired. I've been waiting for the BlueZ side of it to settle down a bit. (I note the BlueZ broadcast API is not documented, would be great if the .rst docs would be updated too in the patches.) It would also be great if there is some way to test all this locally, we've merged patches from Silviu for broadcast sink, but I have myself only looked that it should be OK in theory. For Broadcast Source: The plan here would be to add first some support that we can create and destroy broadcast source MediaEndpoints on the fly, and then wire it up to the runtime setting system we have, so user can create and remove endpoints without having to restart daemons to reload configs. Generally they would appear to user applications in similar way as network audio sinks, there's established way how all this goes. The fact that it has to be via the same DBus connection as the rest is a bit inconvenient, but can be dealt with. Ideally the BlueZ DBus API would be such that there could also be a dedicated "broadcast" application that can send streams, without needing to interact with the sound server, and also allowing a sound server to be running its own broadcast sources if any simultaneously. For Broadcast Sink: We are going to expose whatever we see over the DBus API to the user as audio sources, which can be connected where they want to, and will be acquired when connected. For controlling the scanning of the broadcast streams, and which streams are going to be synced to: It feels a bit orthogonal to the job of a sound server. We could in principle do it. The BT Controller would appear a sound card object, and it would have additional properties that would list the available streams, and one poke e.g. with Pipewire's command line tools to sync to specific streams. This would be inventing an API to do something that might in principle also be DBus API in BlueZ. I guess a question for both source and sink is whether the sound server should do the whole thing, or only be responsible for the routing of audio, with things like configuring BASE or selecting which streams to sync being an orthogonal DBus API (which could then be controlled by the sound server, or by a dedicated app which could then either implement its own audio transports or leave it the audio transport part to the sound server). >=20 > > --- > > tools/iso-tester.c | 45 +++++++++++++++++++++++++++++++++++---------- > > 1 file changed, 35 insertions(+), 10 deletions(-) > >=20 > > diff --git a/tools/iso-tester.c b/tools/iso-tester.c > > index 1864b9e9d..60afef301 100644 > > --- a/tools/iso-tester.c > > +++ b/tools/iso-tester.c > > @@ -4,7 +4,7 @@ > > * BlueZ - Bluetooth protocol stack for Linux > > * > > * Copyright (C) 2022 Intel Corporation. > > - * Copyright 2023 NXP > > + * Copyright 2023-2024 NXP > > * > > */ > >=20 > > @@ -489,6 +489,8 @@ struct iso_client_data { > > bool pa_bind; > > }; > >=20 > > +typedef bool (*iso_defer_accept_t)(struct test_data *data, GIOChannel = *io); > > + > > static void mgmt_debug(const char *str, void *user_data) > > { > > const char *prefix =3D user_data; > > @@ -2582,11 +2584,10 @@ static void setup_listen(struct test_data *data= , uint8_t num, GIOFunc func) > > } > > } > >=20 > > -static bool iso_defer_accept(struct test_data *data, GIOChannel *io) > > +static bool iso_defer_accept_bcast(struct test_data *data, GIOChannel = *io) > > { > > int sk; > > char c; > > - struct pollfd pfd; > > const struct iso_client_data *isodata =3D data->test_data; > > struct sockaddr_iso *addr =3D NULL; > >=20 > > @@ -2610,6 +2611,31 @@ static bool iso_defer_accept(struct test_data *d= ata, GIOChannel *io) > > free(addr); > > } > >=20 > > + if (read(sk, &c, 1) < 0) { > > + tester_warn("read: %s (%d)", strerror(errno), errno); > > + return false; > > + } > > + > > + tester_print("Accept deferred setup"); > > + > > + data->io_queue =3D queue_new(); > > + if (data->io_queue) > > + queue_push_tail(data->io_queue, io); > > + > > + data->io_id[0] =3D g_io_add_watch(io, G_IO_IN, > > + iso_accept_cb, NULL); > > + > > + return true; > > +} > > + > > +static bool iso_defer_accept_ucast(struct test_data *data, GIOChannel = *io) > > +{ > > + int sk; > > + char c; > > + struct pollfd pfd; > > + > > + sk =3D g_io_channel_unix_get_fd(io); > > + > > memset(&pfd, 0, sizeof(pfd)); > > pfd.fd =3D sk; > > pfd.events =3D POLLOUT; > > @@ -2632,12 +2658,8 @@ static bool iso_defer_accept(struct test_data *d= ata, GIOChannel *io) > > if (data->io_queue) > > queue_push_tail(data->io_queue, io); > >=20 > > - if (isodata->bcast) > > - data->io_id[0] =3D g_io_add_watch(io, G_IO_IN, > > - iso_accept_cb, NULL); > > - else > > - data->io_id[0] =3D g_io_add_watch(io, G_IO_OUT, > > - iso_connect_cb, NULL); > > + data->io_id[0] =3D g_io_add_watch(io, G_IO_OUT, > > + iso_connect_cb, NULL); > >=20 > > return true; > > } > > @@ -2648,6 +2670,9 @@ static gboolean iso_accept_cb(GIOChannel *io, GIO= Condition cond, > > struct test_data *data =3D tester_get_data(); > > const struct iso_client_data *isodata =3D data->test_data; > > int sk, new_sk; > > + iso_defer_accept_t iso_accept =3D isodata->bcast ? > > + iso_defer_accept_bcast = : > > + iso_defer_accept_ucast; > >=20 > > data->io_id[0] =3D 0; > >=20 > > @@ -2676,7 +2701,7 @@ static gboolean iso_accept_cb(GIOChannel *io, GIO= Condition cond, > > return false; > > } > >=20 > > - if (!iso_defer_accept(data, io)) { > > + if (!iso_accept(data, io)) { > > tester_warn("Unable to accept deferred setup"); > > tester_test_failed(); > > } > > -- > > 2.39.2 > >=20 >=20 >=20 --=20 Pauli Virtanen