From patchwork Thu Feb 1 15:38:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 13541287 Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com [209.85.222.46]) (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 8839762169 for ; Thu, 1 Feb 2024 15:38:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706801906; cv=none; b=Ay1l8bnh37pvR42RhSzoAmpXUkVBP62+dwmP6NSucvzZnsQGCm/gp4HbQ5uIgdzBl00lD9m4lD6veHuZWbuc+81a5JqoefZt+qaUn9tK5OgXd/d0DxHdMsHqKYZyGZAHrEmqVbce4UfSNxQsaQ0KJTeUFUqt78Eph8IVIpaVvG8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706801906; c=relaxed/simple; bh=dOOpHAPXm8BsA8Z11Lydd2TjPtVhfXvcQFXbe/GdLVY=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=H4AgCL6O8KvQnKXzysxV029OloHqbEWVR85Zg8mC/B1FsU2RhrABMcAsXSto6cOKVOtYRSmnrJkGl6x8GQMXbs7iyM7JVTUFFDr7fq2APd3K3omSHQhVW1U3Oef04nfWLvWK3yYif7FpwQUGH3PNP+9YWQQhzz9z7IQfb7jWKF4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=llppyz5i; arc=none smtp.client-ip=209.85.222.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="llppyz5i" Received: by mail-ua1-f46.google.com with SMTP id a1e0cc1a2514c-7cedcea89a0so541649241.1 for ; Thu, 01 Feb 2024 07:38:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706801902; x=1707406702; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=85jg8ARE52zUhjrDENCBAFvfpYN6H2nEwrS36GRf8bc=; b=llppyz5iPR4kZ/MK82wzZmZB5z12sl9H03kT1n17uaYFatSuccHFeRuMjmrmkSL+zZ 4ycGQOD0fV8BpOLhbhsWZcPFSQYM36K7ohNhhXgZAIqxRPDh7Z4PIXyrIHdyMX2yJ0ME K6e84eC2Qk386beoWqxHjBs91n/iwqnq9TyngvqBL3kFw9QXeo5sjsTOt0yrcGr7SdEU bQYg7uhMhl5c5vRYPI8u63GyrkOvUePleW7pQBr8aNQS0qQMql/XXvp8q+pge7d+A92D GLRUkE3boalOYHyyiOZaKESTtH5FShzMu/9wViTESYR8GrD6/bKERESIw+mUc7qts7o8 o/HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706801902; x=1707406702; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=85jg8ARE52zUhjrDENCBAFvfpYN6H2nEwrS36GRf8bc=; b=m7RIl/6b3K+aSPUWAZImfryqkok+hme8yxtb2wZ9iTXoyd2dJKDtEg9iDHsNTNdI1s s63rZ6CrNFz/2e6G/9PKk5vLwFoVcGb8HAIQyBXnl8Nx06dzLUwQ6+U1O8dHix32Oe8y jplx/w07x9L715llIvvGws1NemDpluvd4WAqFND6zM4/BP1LTp6eKilsZe0a38AWom64 m/1HtDqc2gt0YgdFJxeCVifd9geo8vY73gO3s1ZX/zqNSoEKx05+HBzPJutIWDfZEHrW 3oB2xiONtOOztheRHF9S/IMvexuZ2XBt2zoXxZuodb1HV21rHdj0KV5D3+tMmrQDQuQz 38Ew== X-Gm-Message-State: AOJu0Yx2RbSRqAsodCamAruFQJETuWiG7qR8wZABr7PGWZU/0Zpbxn+2 jqB8vEz8GI1CwZlmz4Z4EhLgxngUBZ6+g8gnYFdHLBDZ9pIeYNPezeZn8evC X-Google-Smtp-Source: AGHT+IH2qXTXn/9TrXIOLqIA6KtZr55XCScXfFdsNpey7M4eWom+2BcuOQuviSTTcApLYBvQiEC2aA== X-Received: by 2002:a05:6122:99f:b0:4b7:9dc:9ab with SMTP id g31-20020a056122099f00b004b709dc09abmr2797208vkd.16.1706801902118; Thu, 01 Feb 2024 07:38:22 -0800 (PST) Received: from lvondent-mobl4.. (071-047-239-151.res.spectrum.com. [71.47.239.151]) by smtp.gmail.com with ESMTPSA id ca5-20020a056122400500b004bd503f054asm1624586vkb.42.2024.02.01.07.38.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 07:38:21 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 1/5] client/mgmt: Add missing settings strings Date: Thu, 1 Feb 2024 10:38:16 -0500 Message-ID: <20240201153820.1016507-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Luiz Augusto von Dentz This adds "iso-broadcaster" and "sync-receiver" which were missing. --- client/mgmt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/mgmt.c b/client/mgmt.c index 62167727c1c0..44bf4d2019ea 100644 --- a/client/mgmt.c +++ b/client/mgmt.c @@ -359,6 +359,8 @@ static const char *settings_str[] = { "wide-band-speech", "cis-central", "cis-peripheral", + "iso-broadcaster", + "sync-receiver" }; static const char *settings2str(uint32_t settings) From patchwork Thu Feb 1 15:38:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 13541288 Received: from mail-ua1-f45.google.com (mail-ua1-f45.google.com [209.85.222.45]) (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 9DA136216D for ; Thu, 1 Feb 2024 15:38:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706801907; cv=none; b=kaokKKPD6wHBfOqIOefUKr20rY8gf3J7fpenCyA4BxY+Grb5Nemil4GUSvjfeTmSA5J97IiOE6KkqBmEdjxWsYLMvYLi461fBxvCWJKMoJbPnh0OSEfHlnZtABB1hyiXdMwWXZgHrLoIqa+YQB9X/d7Ha8eIi2RZkDxRYd/416Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706801907; c=relaxed/simple; bh=K2Utrlr0vp3zrSHviTPgil48gK7pFEhzpZMuTmocHs0=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HqLNmZEve2U8MwsqOEDttB/hV/4r1jBK5EFS15rcOr8UHSmzuYpdCVYj1ehop4a9pq0MOuib5/sgpD5Thkz1xeYjFqgELCgsyfE8LFgzZSH7iAMf6+z9dvHkaY54gzAgq6jbzsV9nN5ApVYlyrR1lF9ffaDDs8OUEwzwLPrUYhM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jGYzJcM9; arc=none smtp.client-ip=209.85.222.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jGYzJcM9" Received: by mail-ua1-f45.google.com with SMTP id a1e0cc1a2514c-7d5cbc4a585so372651241.3 for ; Thu, 01 Feb 2024 07:38:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706801903; x=1707406703; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=WYVVWhi5KB9maEQKsM0GSDViu6LAYuo+A4YUpEmhnjc=; b=jGYzJcM97rBdqQbUMby1u2S+6cvoV3U5Ko0uvu+g1yg9WwH1DMpRnW2F+Mlrmb5kIt Ftypd98+5mCalzph6YyIOt5ZHNbsGWumJR45MwBNoRlFiHCSrfdnhtYWhoYHmdR92FwJ bGaJiFoAqxIzrweQFE+J1FogsDk7T3N+/fSy6yhKVqpF7CYbnByugsjBe6WOQxXW5Yc8 e9ogaislxaimixNetG/ckSAeyT1tSR+kI0Bkyf0uCxMJ/YI6Wgm+pKqO95QgYjqXAPdi GizqRJAAaIUAKN5z5NwF72r1qbGVaHWNV5M7FgcVg/mZ629yRaXva9Kjj/8+9UysSDUM GkYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706801903; x=1707406703; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WYVVWhi5KB9maEQKsM0GSDViu6LAYuo+A4YUpEmhnjc=; b=mIGr/v7QM4AwNkX00NMF+EKX03U9J9Bruh8aPC44YHyy2riXkjVCMZQSVx9WSn3M8k ZuHZOqpeDDS30O0dubGmYqVpsyN5k3MV2TATJB/XbGx4B1OD3qjQOSEo6uMWkQUPQA9c NDgIGH6BHSdNTGdCN1sEJXYXIujDT4WWjmBDIKMXPXOHR4ykkumk41N86FgFAk18uTgl TuPxjxVYm5hMuEChshI6/oqAm5tOpvQmX9jJWNbbfj8/gFLAsVA+QwD/TsmS4TmmAkT9 ygi3D8gKH1mFQqLj+fEPCWlVW344ukKGZ+NWK3lP1gFVHExVicn3i1ZBc+HmCu+6Vgej WSFA== X-Gm-Message-State: AOJu0YyHtTjJYL7jfk1v29FK5GUnYhGXc1wAj4ED7yOFHp+gvyEakv+X LDQxgffzUXcS/aWQYBNUop8zG5owreQsGSXLhWFlrctgWUDkvPQOloOhOESf X-Google-Smtp-Source: AGHT+IGvn0lRUUgG5vmDbRViKcL+LMx64f9k06396Ir3pNMnQg4/Cbh9kpcNuZ2eTXKPm8RfiCBThw== X-Received: by 2002:a05:6122:4e84:b0:4b6:d63c:ca8f with SMTP id gf4-20020a0561224e8400b004b6d63cca8fmr2271765vkb.16.1706801903128; Thu, 01 Feb 2024 07:38:23 -0800 (PST) Received: from lvondent-mobl4.. (071-047-239-151.res.spectrum.com. [71.47.239.151]) by smtp.gmail.com with ESMTPSA id ca5-20020a056122400500b004bd503f054asm1624586vkb.42.2024.02.01.07.38.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 07:38:22 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 2/5] bap: Fix passing ep instead of setup to config_cb Date: Thu, 1 Feb 2024 10:38:17 -0500 Message-ID: <20240201153820.1016507-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201153820.1016507-1-luiz.dentz@gmail.com> References: <20240201153820.1016507-1-luiz.dentz@gmail.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Luiz Augusto von Dentz config_cb expects setup pointer not ep. --- profiles/audio/bap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index 7faa6be7f90b..7e87d12d02f1 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -948,7 +948,7 @@ static DBusMessage *set_configuration(DBusConnection *conn, DBusMessage *msg, &setup->qos, setup->caps); setup->id = bt_bap_stream_config(setup->stream, &setup->qos, - setup->caps, config_cb, ep); + setup->caps, config_cb, setup); if (!setup->id) { DBG("Unable to config stream"); setup_free(setup); From patchwork Thu Feb 1 15:38:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 13541289 Received: from mail-vk1-f180.google.com (mail-vk1-f180.google.com [209.85.221.180]) (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 A30C56217A for ; Thu, 1 Feb 2024 15:38:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706801909; cv=none; b=qqS5vKdmjamnGZGeEyksp4/VMsODKBjlExMe7lIlVpp41gdQ+mEMjo8cG6DWz+2ZiraQAx+3LQzsfYcWgpo2ClnYlyhKlCzFzkij8RLrv2B3+coIxfh+BCYo1JofwcJ+pFQ4Z1xJL68F1/tUfH9VOhCJITIFUub6LoRowNDPUu8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706801909; c=relaxed/simple; bh=J/kS8l2g9RZhxNAzKJ52nEU68D48vn31wNKus36nRsc=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=T7kkMp9dezHNfj3wlvvXZzB6RabPcrepp3EU4N+k03+pE88GJ289Y4EK6tNKhNqZbtC+G+KJiUs6USDuNBJUQ4RrSVec663aQ/BPvOB0/B3ITLGE2lLXQLUqJnq+0oklsQzsQUyrJaAg7KL4q2KIdmYI4sOzqmPCJsfcWvASB90= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AC0bXsCy; arc=none smtp.client-ip=209.85.221.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AC0bXsCy" Received: by mail-vk1-f180.google.com with SMTP id 71dfb90a1353d-4bd8977f1c5so417753e0c.3 for ; Thu, 01 Feb 2024 07:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706801906; x=1707406706; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=+HC5SdNvCWeKEwtYq4o6Mizban1zGXB05RzkUe4htxw=; b=AC0bXsCyOF0Ogn+91VcTv94xvFcSoNKcwrQMcrkW/IyRCR6Rr8veTqVl4Gx0rXBkCC LtNRxe99hKc9qLeXv3l7V3VqX43hdbNozI5C7TrLmev297jI0OG7FIKMhYy+95+4LUm6 f4HFYaZMm3WBKUmQ/RQ+od7gCSnshBPWd1or1UMQxCXkvGgHp3CBRghh3h7h9ilR1BHV Dj5ZCWLFfF7ZG8PF7ZA7R7a+D2V4bTvdALZ/RAeOV2KsBwN6yObV7Ql7zwN+gLFePMZP 6u1s5bqDOLjb8BseDwroDyPGZSUnvElgzBnEtlzacapUZKid7sDxSXjAUgeS+qr49hBy nRqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706801906; x=1707406706; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+HC5SdNvCWeKEwtYq4o6Mizban1zGXB05RzkUe4htxw=; b=p5rl8pSHI0vFYVmAuTYitclajeuWCUI82URt/W6Gf+q1oiBzQXgyEBWPpS06mYP65h SIvJqULTaRORuwCB0gG4jKrclquD7rB0mvoZaUJmXKLKu+voKJyWQ+5ZbTNm3XisrQSt dljfv+FqOyZTmVdLDn0j+LXzXZrrGSg/qWwYTY7/4CcjOq2uGajiIuvNMxm9gllCxE8F ngP60yucp1tufR0iJDo60GXDaJup+0s35yqCrCAYpJLS1n8Y7Hzv2sFtuRR5EU1X0xUL FFZQJZotNAgkIbTpN0Ml84NLG+ZFnmOx5h8UyKITH7t/jbKYi9U33TgzNYgBbkUUXTWE 7Ueg== X-Gm-Message-State: AOJu0Ywmv17+H2gZlcNrk9wxPwNuLP7dhG5qtEK3OwrNUcVBUuCVpOOd XQ951NOgCGIP5tYLJSech0ljWznFWKoHc4sm+gs248ga8aBUSBTFiZ/JUe9j X-Google-Smtp-Source: AGHT+IH8e5UiSlZMl10l9BdjyjWqM7K0Vwzdu0FFdXqMWmCZ7iobK2iQR0Tf5ypkDJsovNJykzn71A== X-Received: by 2002:a05:6122:4a06:b0:4c0:79e:6653 with SMTP id ez6-20020a0561224a0600b004c0079e6653mr764510vkb.0.1706801905915; Thu, 01 Feb 2024 07:38:25 -0800 (PST) Received: from lvondent-mobl4.. (071-047-239-151.res.spectrum.com. [71.47.239.151]) by smtp.gmail.com with ESMTPSA id ca5-20020a056122400500b004bd503f054asm1624586vkb.42.2024.02.01.07.38.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 07:38:23 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 3/5] device: Don't remove object if a service is connecting Date: Thu, 1 Feb 2024 10:38:18 -0500 Message-ID: <20240201153820.1016507-3-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201153820.1016507-1-luiz.dentz@gmail.com> References: <20240201153820.1016507-1-luiz.dentz@gmail.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Luiz Augusto von Dentz If a service is connecting just restart the timer to give it more time to complete the connection or disconnect. --- src/device.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/device.c b/src/device.c index afd073c6c2a5..1db96d9a672c 100644 --- a/src/device.c +++ b/src/device.c @@ -3276,6 +3276,13 @@ static bool device_disappeared(gpointer user_data) { struct btd_device *dev = user_data; + /* If there are services connecting restart the timer to give more time + * for the service to either complete the connection or disconnect. + */ + if (find_service_with_state(dev->services, + BTD_SERVICE_STATE_CONNECTING)) + return TRUE; + dev->temporary_timer = 0; btd_adapter_remove_device(dev->adapter, dev); From patchwork Thu Feb 1 15:38:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 13541291 Received: from mail-ua1-f41.google.com (mail-ua1-f41.google.com [209.85.222.41]) (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 995D6626AD for ; Thu, 1 Feb 2024 15:38:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706801916; cv=none; b=HtbnFcmB+s628FSg+jlRC15Ern2uB/nbv6qbys9LwB6HofhuD3falf7wFEsTwFgLZ8pYlPbf+Rz9E8pruiXClAKmcjrJVlqfB0e1+IIDJYDaBKN6If80IyimA+7/+cBdfuSRbmsuGyvTGV4IH1cs7cP1K0Eq3+Hmkrj05RJc+AU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706801916; c=relaxed/simple; bh=gyuyQ/aK4rZwWgwe0gruyYcDUQyzIfPAlXAzVb6Vozg=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZKv4dtkZQlslVNejYKh7DIvfvTuw5+JL6SQ5iYHr7LVhy7cNisKBr0b7GwYlZ/G8pqI5WEL2r+IlPx3NLIZJ+OTWdAkisTyjsrIk16s+Gu5i6LAmJSwZBX6j9r624Fq07jit0KOmdAqzyOQmh2c2bY7y2q7sh71MoIheNwCzTAU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fgyx98zJ; arc=none smtp.client-ip=209.85.222.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fgyx98zJ" Received: by mail-ua1-f41.google.com with SMTP id a1e0cc1a2514c-7d6024b181bso469830241.2 for ; Thu, 01 Feb 2024 07:38:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706801913; x=1707406713; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NfocMJ4OgAO3HX5ciQuRwEHA66Qb0abBxdrZu7QgJK8=; b=fgyx98zJOxDvNAMgT8TKfsyPF06wwf3Hxakq49nL5P4+Zx5zYND85uJ3TS1+gvrEbc Orm+GSB4KLXz7di0eJP+R3m1Dcmj8gU9BXQPV3r7h5WEVqr912Tz0zjVS4vNRV8jBBAx 9C3pdSdDOe/lPFrFklG0btyP4WAIxJsE/azwoGNACTbz8LiYcO40xmaC1E7gHPwT1aVO dkoaUgfVaCz3sZAVTxbPO8YrfRKo9guQNDH1aWWaIlyyFYsYf5RBUpgJnqMgd7jP75EG PQ4xIJR83G+cGp/6c5r9fCD/TuVj7hde4aidcvD3T4HgAL3s534Aa5ABq59/KmlOzE+W iVrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706801913; x=1707406713; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NfocMJ4OgAO3HX5ciQuRwEHA66Qb0abBxdrZu7QgJK8=; b=hQAADA/5efLT5Aoe3YHn3aQerl4XizwbUnv8NxoBFqccqdowxckZ3Fw+9iWFz1ShXf O1CWLCjb0p6U12KNwr1sQtRByTBqFAUQOvxHRGof5HMSbBx4MlkUMdfgaWIEPqDj/StI RxbWjOF3+fChinDzt22AJvXpLNPdjVJWbLE/mDGszdfXirXI7DRtCi1gFcPoY3Sg+K0s y5qpqrr5doZOuVHWq61bVDeL0pw9ptTMYU/sBXe3VVzaW4sOHNhbCTFudvKfnzIf85v2 L7acnKG8yJfUDE5N1mtSIr6J4rsonn1AKFYUHS1dPFoiMJ+cTmsbQ7cQTKlprJRjGzCD koRw== X-Gm-Message-State: AOJu0YxqtgPsssmvaTodG4bKqqmEjam4zNZy2v52G37xZcfCusIWtaZ5 s/rnUC3++qEfhIAlFr87vXzW+0cyA3Q7P6BIj2H27KVMQxesHRq1w2Dw3lkd X-Google-Smtp-Source: AGHT+IHoQ+STx0Mtklo+82AQiYzym0FxwtREoYYkvWJJFLvYAR+q0n/qO/TxOD+ql7cJimr41fmKxA== X-Received: by 2002:a05:6122:17a1:b0:4b7:185a:d8d with SMTP id o33-20020a05612217a100b004b7185a0d8dmr5268349vkf.1.1706801907778; Thu, 01 Feb 2024 07:38:27 -0800 (PST) Received: from lvondent-mobl4.. (071-047-239-151.res.spectrum.com. [71.47.239.151]) by smtp.gmail.com with ESMTPSA id ca5-20020a056122400500b004bd503f054asm1624586vkb.42.2024.02.01.07.38.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 07:38:26 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 4/5] shared/bap: Allow using bt_bap_attach for broadcast Date: Thu, 1 Feb 2024 10:38:19 -0500 Message-ID: <20240201153820.1016507-4-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201153820.1016507-1-luiz.dentz@gmail.com> References: <20240201153820.1016507-1-luiz.dentz@gmail.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Luiz Augusto von Dentz This enables use of bt_bap_attach for broadcast by checking if there is a client or ATT instance. --- src/shared/bap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index 851d6a5facc3..ce8d35f86af3 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -4156,7 +4156,8 @@ bool bt_bap_attach(struct bt_bap *bap, struct bt_gatt_client *client) queue_foreach(bap_cbs, bap_attached, bap); if (!client) { - bap_attach_att(bap, bap->att); + if (bap->att) + bap_attach_att(bap, bap->att); return true; } From patchwork Thu Feb 1 15:38:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 13541290 Received: from mail-ua1-f44.google.com (mail-ua1-f44.google.com [209.85.222.44]) (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 71F7A6216A for ; Thu, 1 Feb 2024 15:38:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706801914; cv=none; b=JiDJJs8h9IJiPFg8M8hcrCcn3Mxdi11R0/tVydrdC0vTHiesUBvZKCn9wkzT5B9iYMprp9/k1qSYgl8xy9Y7PmbtW7WFOHAvLp7xUYwpR42C5tkE7KW4n0aiFNmh4ONcEayS70ZdhEcEHrlGYyjtrfNr115arOFk6PUuD5cyBN8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706801914; c=relaxed/simple; bh=AAOtZ8xC+h1vmDpGmod5czlcvsYkjYt1Bxoa+kp7CgA=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jVi8g7N8wBkSiyPPGv+iu6X1Jy4ecUlzrQ2Jmp60XeNMJ5qBNVXZblvjYF6ls/4zcKal9hgLS2Gt1QMzg2RYXyrQLKS1L/75f2cDlMY6LSOpwDHF9QztrC7+sHTcyRmSPBOC/ANy5lOQnGS5WDSKUKClVmnJtIC/bHF073ykp0A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=M/Yk0EOT; arc=none smtp.client-ip=209.85.222.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="M/Yk0EOT" Received: by mail-ua1-f44.google.com with SMTP id a1e0cc1a2514c-7d5fce59261so540822241.3 for ; Thu, 01 Feb 2024 07:38:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706801909; x=1707406709; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=G+0d8Hy5JsXKOl1rOEs9vku4hGWhA4odGKzZJQAiN/U=; b=M/Yk0EOTn7+IstCmDI3xA65DZKMtmyKxH7Q8xfiuZI+wnDedQlhwN1+7Rs0ARlL/Kq ROS2Ez7/qW/FDlRXmgrVHv/o8kt/C1iOxgKPMpv84v9st3SOFK379ox3DyauxZa+1x4r JUee9MQsFnOF/IHtJUN7KvlNnJR6ifqRktYPee4nRcY1BSnjiVAi9+82JopVJa9Taryq iqwsyVK6wvTrY1Tw19bqEzxLFhK8h0WtH6m0/S3xv8288eRPcyA7MebwaTVaBhMlnoGD IM/BjpI8i1BUHYtbGz1Cw8Vn8xIcaao0kKdx3f3aACfiHfKFRU4sZjopERLeijQxUdy1 s6tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706801909; x=1707406709; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G+0d8Hy5JsXKOl1rOEs9vku4hGWhA4odGKzZJQAiN/U=; b=LP1cpMIPiy7kQKlnr4uGq221N9fknAMHdqjVR5v65q61oJ9VAf6d+XurWw30bGZB8n KOIWCYYUCcBeCXUW86jSCpfhsIniQW/B8gdniRw7sVdOxt8010oyrXaBYel8ev5zML/m eAK5B+VjbdUkvncpDqtelG7Ob7XkIZoSZWFZxpqBw8EDEV4Yb7QCRAFhANpAwujKF40t odSSzCT4tT1HnxVkva2HGZ4h4NJ48+offHilWjrEagpNiv+BT3rTIxwjYlleNfR4EbKh Nop44JbdtmwSvVlmbhuB6GTzIs3tmLbEcOsmnykAFlBrMEpAVBmeoaQSR9TJtSaRYQ/X q7fw== X-Gm-Message-State: AOJu0YwXn4/ptRgIghD0AHGP2avlRRa4RbM1rBGC0bNNXDPYhPpEsCRf 5ejFStciD7DQBKrujJUHT4ZcGwqxYThMZS61104r6ypXBYMonb5VIBAYroy9 X-Google-Smtp-Source: AGHT+IEjQmPCBzwR1qPhysfcKse1zn/wg0SuW3g8IKIvAl/7o1i1at6TO7MmqTPwmTt3gsGSa0mS4A== X-Received: by 2002:ac5:c76b:0:b0:4bd:3d31:353a with SMTP id c11-20020ac5c76b000000b004bd3d31353amr4544564vkn.4.1706801908920; Thu, 01 Feb 2024 07:38:28 -0800 (PST) Received: from lvondent-mobl4.. (071-047-239-151.res.spectrum.com. [71.47.239.151]) by smtp.gmail.com with ESMTPSA id ca5-20020a056122400500b004bd503f054asm1624586vkb.42.2024.02.01.07.38.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 07:38:28 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 5/5] bap: Fix crash when a broadcast strean setup is pending Date: Thu, 1 Feb 2024 10:38:20 -0500 Message-ID: <20240201153820.1016507-5-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201153820.1016507-1-luiz.dentz@gmail.com> References: <20240201153820.1016507-1-luiz.dentz@gmail.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Luiz Augusto von Dentz This fixes the following crash when a broadcast stream setup is pending and the device is remove: bluetoothd[37]: src/device.c:device_free() 0x89a500 bluetoothd[37]: GLib: Invalid file descriptor. bluetoothd[37]: ++++++++ backtrace ++++++++ bluetoothd[37]: #1 g_logv+0x270 (/usr/lib64/libglib-2.0.so.0.7600.6) [0x7feb557e3120] bluetoothd[37]: #2 g_log+0x93 (/usr/lib64/libglib-2.0.so.0.7600.6) [0x7feb557e3403] bluetoothd[37]: #3 g_io_channel_error_from_errno+0x4a (/usr/lib64/libglib-2.0.so.0.7600.6) [0x7feb557cd9da] bluetoothd[37]: #4 g_io_unix_close+0x53 (/usr/lib64/libglib-2.0.so.0.7600.6) [0x7feb55839d53] bluetoothd[37]: #5 g_io_channel_shutdown+0x10f (/usr/lib64/libglib-2.0.so.0.7600.6) [0x7feb557cdf7f] bluetoothd[37]: #6 g_io_channel_unref+0x39 (/usr/lib64/libglib-2.0.so.0.7600.6) [0x7feb557ce1e9] bluetoothd[37]: #7 g_source_unref_internal+0x24f (/usr/lib64/libglib-2.0.so.0.7600.6) [0x7feb557db79f] bluetoothd[37]: #8 g_main_context_dispatch+0x288 (/usr/lib64/libglib-2.0.so.0.7600.6) [0x7feb557dd638] bluetoothd[37]: #9 g_main_context_iterate.isra.0+0x318 (/usr/lib64/libglib-2.0.so.0.7600.6) [0x7feb5583b6b8] bluetoothd[37]: #10 g_main_loop_run+0x7f (/usr/lib64/libglib-2.0.so.0.7600.6) [0x7feb557dcaff] bluetoothd[37]: #11 mainloop_run+0x15 (src/shared/mainloop-glib.c:68) [0x662e65] bluetoothd[37]: #12 mainloop_run_with_signal+0x128 (src/shared/mainloop-notify.c:190) [0x663368] bluetoothd[37]: #13 main+0x154b (src/main.c:1454) [0x41521b] bluetoothd[37]: #14 __libc_start_call_main+0x7a (/usr/lib64/libc.so.6) [0x7feb54e1fb8a] bluetoothd[37]: #15 __libc_start_main@@GLIBC_2.34+0x8b (/usr/lib64/libc.so.6) [0x7feb54e1fc4b] bluetoothd[37]: #16 _start+0x25 (src/main.c:1197) [0x416305] bluetoothd[37]: +++++++++++++++++++++++++++ --- profiles/audio/bap.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index 7e87d12d02f1..26fd465bf560 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -974,6 +974,9 @@ static DBusMessage *set_configuration(DBusConnection *conn, DBusMessage *msg, setup->id = 0; } + if (ep->data->service) + service_set_connecting(ep->data->service); + return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); } @@ -2437,6 +2440,11 @@ static int bap_bcast_probe(struct btd_service *service) return -EINVAL; } + if (!bt_bap_attach(data->bap, NULL)) { + error("BAP unable to attach"); + return -EINVAL; + } + bap_data_add(data); data->ready_id = bt_bap_ready_register(data->bap, bap_ready, service, @@ -2644,6 +2652,7 @@ static struct btd_profile bap_bcast_profile = { .remote_uuid = BCAAS_UUID_STR, .device_probe = bap_bcast_probe, .device_remove = bap_bcast_remove, + .disconnect = bap_disconnect, .auto_connect = false, .experimental = true, };