From patchwork Thu Apr 11 18:07: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: 788015 Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) (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 E0AA1137907 for ; Thu, 11 Apr 2024 18:07:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712858847; cv=none; b=fNw98GV8s6ncdwTRjfx3AThjqTRLmQKOR5b8kMbPl6TQ0UKa6BUYPJ4JTT3+Ay07VNjWeewuK0dpu+dTFv7ytklNeW0CmYaaifxAgxEj7Xe5gZPD+H9r9oR/eu4vyCZueeAGY4KAWhP1ZLKVdynD83dMycWOALiG6RoBgFYHf7Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712858847; c=relaxed/simple; bh=2zd2aErHG1lZPkrmYGGNWy8rR9E2GG4suFCJDjI8SaE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=ZjdW1XD4cPu0wQOaJPqhKHbPVzVZ0J4pwP1suLb+2gBeaUorUA3DPAWJ1J4xvRHOs/roccnqQefn5z8FAe4JI6JXD0TAaP2adyPdFiN7XpSjyIkeC2ZNA+B2qfgky5SqKvlVDWXDWGt1H+DR5AFea7OixNC3ysrGvPxNFxAolY0= 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=b8cWJwUY; arc=none smtp.client-ip=209.85.167.181 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="b8cWJwUY" Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-3c5ee27c2ddso14592b6e.2 for ; Thu, 11 Apr 2024 11:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712858844; x=1713463644; 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=+hANOqpWi5mccCXObOolBPcIhoSeVd6fCezYfr1BhRY=; b=b8cWJwUYD5WwBqA5gFJxn+X37BOLSlXMlp7ZON7lLVgzTj9fPUIXJFk48+7YTm0Mwx tRLYsgjbolBwLGsW1fTrGzSm6aZEKfFBdQEYlY9j6aVhv39Cja7Jf07COV7I0qsjGw09 mlXN1I/ZgQzpcqeaOrL4QBayfZgn/GIHAB6rAznsjME9vdI0/l3i8MqyrXir9dN26+4c Z1cWw2mUKfCtiW0JnXS5bUgByzadtaSSXHR7Jtm4M9Zo4tQPY1EZswtRoERFLSd8wIkD IQGkZIdFnTnvncqLSr804qxxoSLbHeKjuA0muLk2A1HCprfQm+CkdjX2rd6evjn73ay4 BxIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712858844; x=1713463644; 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=+hANOqpWi5mccCXObOolBPcIhoSeVd6fCezYfr1BhRY=; b=gdzzVJnCIXNkCiXTosgNlMirORcpyG9m2RccgG4DpyKTD334yDrk/wQSh5N9HNPs4R cf3duNBf4SeipYbaWr8RRkogRzGIhCmvI/SjUt7bVoLe9IZlEV4gH212xg2RGizhKvWT UKA99msIu19op6d4ZjPpZpsQWWQiRySI7VIoMUBYLL2n1OXP94zF5my3vBW9FevD34MW mChXiBCJACSctIDaGSeObgQnwc3yBBYH0e4Rw9jEXm9p/Y7e9K/VekAXMjnP6DKtexOU sccnBZTBtg52GaiFEft9Fuk+z1ZhxcEi0cNgWpC9tFQwdnjWL9rU0j4yorN7ysHIBWJQ 2T0w== X-Gm-Message-State: AOJu0Yyo057PipYSsvJAOrAaLDDv1WLF8guQSpIyT4+NAxUMPjZPzTtZ rJxSX2oHz1/lca9xI3msweoyVfoSWoJV9S0RvSggA2QEBEvnu3mbLfrGPg== X-Google-Smtp-Source: AGHT+IHvwwQM3TUNZpn9xs7gRqUUi84Z97/TbDSZ/C4ZrplxV8z6sX8fql4z7h32v37ZcYufHFdeiw== X-Received: by 2002:aca:1107:0:b0:3c5:e03a:8f51 with SMTP id 7-20020aca1107000000b003c5e03a8f51mr330427oir.48.1712858843986; Thu, 11 Apr 2024 11:07:23 -0700 (PDT) Received: from lvondent-mobl4.. (107-146-107-067.biz.spectrum.com. [107.146.107.67]) by smtp.gmail.com with ESMTPSA id z4-20020ab02244000000b007e7b2f8e0b5sm225711uan.13.2024.04.11.11.07.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 11:07:22 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v3 1/3] shared/bap: Fix not updating location Date: Thu, 11 Apr 2024 14:07:19 -0400 Message-ID: <20240411180721.157181-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.44.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 Fix not updating map.location when selecting. --- src/shared/bap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index f553096dfcc6..b452461ac715 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -5163,12 +5163,10 @@ int bt_bap_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, /* Check if there are any channels left to select */ map.count &= ~(map.count & rc->count); - if (!map.count) - break; - /* Check if there are any locations left to select */ map.location &= ~(map.location & rc->location); - if (!map.location) + + if (!map.count || !map.location) break; /* Check if device require AC*(i) settings */ From patchwork Thu Apr 11 18:07: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: 788409 Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (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 F00E813790A for ; Thu, 11 Apr 2024 18:07:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712858850; cv=none; b=A5kUErytdYbdSPWALjm88Y6eQHGy+2nXG7A5jdgR4mhhODqv0WO3t1/WytYH9OcenrorHOX4Q0FcPOyXagp57W/DJw7W9wPWUxC5VlgW8J6R5BkkT7QjOeTifJpZkZ5bb3JNKZ54gSmGNv0BxDlgjcufw/5/4A1bhhS4kKN5cFk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712858850; c=relaxed/simple; bh=LMFPVJf139a0wduO1eF0t+hakDsuenH9PZx5QV3puXg=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UqRxNGfbOLuVNzGok/1KI+4h9nah417igWpNfiu4UmJb9U3OeaUONo6l0utOUBvIzwezfcAHZhUCbS+kagEr+F5KkpJDwUoLPY/vUOj/uVi1TCUqJT356kQNyMToPbIhk9vQgLUkE0aTneIedGRiGAqnoFzWt7zOvEAsQUFLWz8= 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=RKG88hw8; arc=none smtp.client-ip=209.85.167.179 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="RKG88hw8" Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3c61486d3fcso25003b6e.2 for ; Thu, 11 Apr 2024 11:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712858847; x=1713463647; 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=LIvfY2P2js/Mn1HiN2qEldVKoXzkLk9p7C/LKB+J86c=; b=RKG88hw8VThW26tknBa18qCCPL9J8Kql0UGWD+WeISq0kRnncKcZaHwqtYId9jnzvK t7CWiWW5usxIE3nX+qUZIOdEoEsuVpDvl6P9Jfo/DuyBT8eQnLaD+7YKuAoUyVHXRSgV v5XSlXdGp+4pk9zzn8CtuurKEGYYuG54cwT28mnE3xg1mdN+DuZCdKne8NCO4v4fYSXY cjNl++igDD3FEQoZuyAlogxX8WASizghM8Uy73f6KBTo4RoZOYFGu3JIA+SKKfn5bZ3m 9YBKG7ACCNzyuUFwORzLBc8W9Lv62BnahiSMWaRa9qfA9NOBPhL07gnB5M5iGTrU5XWc 95BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712858847; x=1713463647; 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=LIvfY2P2js/Mn1HiN2qEldVKoXzkLk9p7C/LKB+J86c=; b=ZsaecRE0PW1pQD6E6Af7v728yD/HxsJfkUjYB1v52IWOTkbfIJnWZ8EW9gu3gDoBCD BZjQpKUj6+HM6NBQRyS42s70tnvPc0pk/RNJIp9XBfb//AUDkCJKSB2491/xhsyTyvhy SEbFNUxiSGWl3w2Rg2iPPZBwdzBiHkMesoLssj8QCrxAjexwokLSyIab8ivqBv4QhwqH CVXme3S4zrJwPsEnKNpNMs7lA0UFirr76kYzLPL4OBNlh21YZ8LwS3sZZUHtVsJKiupr PhFbGAHhlOORGauRoBNNaXBzIcn7S+3pbEx/ifTMs7l61+7Q7kPrrlePpAIQuHhSFjfT t0aQ== X-Gm-Message-State: AOJu0Yz/QiP2nL4MqyWbdWZ06KMM+FDRDhVN6hZcvhOUSwSw4176R5ZR JPtyl3fHqwY7rnmdsgZCwNyHOpXeEDp59GI4XziQu08GkpqpplqH46NjXw== X-Google-Smtp-Source: AGHT+IFrIaYVFNJPaZwOgdoJbectBMSK0wLHZ+EiLyO0xFfEnWryzPLEi+YU1T4XQQyrOaMOT1fNJw== X-Received: by 2002:a05:6808:982:b0:3c6:998:e304 with SMTP id a2-20020a056808098200b003c60998e304mr430974oic.44.1712858847102; Thu, 11 Apr 2024 11:07:27 -0700 (PDT) Received: from lvondent-mobl4.. (107-146-107-067.biz.spectrum.com. [107.146.107.67]) by smtp.gmail.com with ESMTPSA id z4-20020ab02244000000b007e7b2f8e0b5sm225711uan.13.2024.04.11.11.07.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 11:07:24 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v3 2/3] shared/bap: Make bt_bap_select fallback in case of no channel allocation Date: Thu, 11 Apr 2024 14:07:20 -0400 Message-ID: <20240411180721.157181-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240411180721.157181-1-luiz.dentz@gmail.com> References: <20240411180721.157181-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 channel allocation could not be matched attempt to call .select without a channel allocation as the device might require a different matching algorithm. Fixes: https://github.com/bluez/bluez/issues/793 --- src/shared/bap.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index b452461ac715..cc1fa1ffbe32 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -5116,6 +5116,7 @@ int bt_bap_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, void *user_data) { const struct queue_entry *lchan, *rchan; + int selected = 0; if (!lpac || !rpac || !func) return -EINVAL; @@ -5158,8 +5159,7 @@ int bt_bap_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, rc->location, &rpac->qos, func, user_data, lpac->user_data); - if (count) - (*count)++; + selected++; /* Check if there are any channels left to select */ map.count &= ~(map.count & rc->count); @@ -5175,6 +5175,16 @@ int bt_bap_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, } } + /* Fallback to no channel allocation since none could be matched. */ + if (!selected) { + lpac->ops->select(lpac, rpac, 0, &rpac->qos, func, user_data, + lpac->user_data); + selected++; + } + + if (count) + *count += selected; + return 0; } From patchwork Thu Apr 11 18:07:21 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: 788014 Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (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 E25E3137926 for ; Thu, 11 Apr 2024 18:07:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712858853; cv=none; b=crEhlxTG1kcntwtjFLVtC73Ou+KxwmAMVu703Fivzj7imwK6tM9/p9rcgS2NINELa/FLJndNF5lM/3YsaTSJA3x245+waSDRDDSuTK32oyoQqpV1bH8IPPYnCAsaQMyAY1xxYpQVnFtWdsZFj/LVY3R4BtCGKIkoTP8z1HkA54c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712858853; c=relaxed/simple; bh=kJ4h6rOJ9cgq2Pg3uwNNmPoC9V7YFE295QXlFUvb8yc=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IolufmuzfDQm4miU3EiKCuUi5CR287xiLVeVEsJ5poMhdiv9xrph4hDzt7eHyVWr5SbgxwRe1wqyP9HBKSiiudq22hbCvSoySQ9KL92+OZxxJryVcYGBo7N+QgEQIrpwU82Wzf8HFpmplP02EpxDQ/vTW2YmTuj/bxpm01q2d1U= 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=TuSC0A4h; arc=none smtp.client-ip=209.85.210.52 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="TuSC0A4h" Received: by mail-ot1-f52.google.com with SMTP id 46e09a7af769-6ea26393116so127033a34.0 for ; Thu, 11 Apr 2024 11:07:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712858850; x=1713463650; 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=wOI/F8iDtBdBhXssjS1UcW44VcPujPo0VyuOuDxcVF8=; b=TuSC0A4h9wtx1FedbMTv6YROJyHS1v1lNv+p7B9fZvWWi/V5xo3+fRMF4MomHgZVLk dwCE+MqUScyStbjAZU7KwSC1uw1k6a0uvz+WJdqcLmIDluRR9Akjbv7D3SaXzAB3+kV6 qCOkC2XNgUJGUJ1HIZmuK5/UQfKrmiKgr7kVRPhdwatbHcoYrsdM4r3XWNUnBbWU0khX C/INhrDjc3JWZSDJhe3Y1cd3c5KqfW1lOByqwXgLF01hd87wr9pbed0UPR7ztogaCBpO GS26l6wSp4BA8NtFihk24GG/zVYt6Ix5XBq1bEREmM8uKD78n2cmGASV7QiDL73GVwKG wxVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712858850; x=1713463650; 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=wOI/F8iDtBdBhXssjS1UcW44VcPujPo0VyuOuDxcVF8=; b=E0bsVfroUlXwtnuO4xX91a6TH4C4XGGgDZ7sWPRLE9pMd2wSr7Nd07BfDrAJSUDvU8 ZbjUNu2mN40ySzllatwIOPtDz+sE1egc9HXmn3dGEChLk804tEWiHau42fsQvssMggRJ NwnkU53PldJlTWkZi2WJKm6U3M1UqZUbFOp51a/0Kk1JztHl0xDxz6509vZTJW46+RGA nfJPJV7hbM125DP9Q9K0lqkz+krRJ/JEuSdny+jhsfvliCVMTUY5QtCSLoH4HssJKWX7 9m/IoV0lfYiVKCbiUZmI3Xu5qIIhecuuVeD/zazbWr7FHTZwBqWnAHYq/z5WVwkAPejE LK8Q== X-Gm-Message-State: AOJu0YyoUY2ioLjbzdcKRYSzeoxcFkFs969TgPJHlWaUbYuEys5lLfm0 QFJAjhiq8DM53qz/GrmBG2Y/x/X39hY4lpFCFmyexof9KgerA/v2RwU+/w== X-Google-Smtp-Source: AGHT+IHuHga23Mh0bnaIHLSwCO1Z5yzZXs6VvO0dZrWZ2UvEBNXRhwUuAR5QqJstylppzFJq2J5agQ== X-Received: by 2002:a05:6808:2b0e:b0:3c3:d80c:ee5f with SMTP id fe14-20020a0568082b0e00b003c3d80cee5fmr301432oib.51.1712858850043; Thu, 11 Apr 2024 11:07:30 -0700 (PDT) Received: from lvondent-mobl4.. (107-146-107-067.biz.spectrum.com. [107.146.107.67]) by smtp.gmail.com with ESMTPSA id z4-20020ab02244000000b007e7b2f8e0b5sm225711uan.13.2024.04.11.11.07.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 11:07:27 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v3 3/3] shared/bap: Fix not resuming reading source/sink locations Date: Thu, 11 Apr 2024 14:07:21 -0400 Message-ID: <20240411180721.157181-3-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240411180721.157181-1-luiz.dentz@gmail.com> References: <20240411180721.157181-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 there is and unexpected disconnect and the source/sink locations where left uninitialized this attempts to resume reading them once a new session is attached. --- src/shared/bap.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/shared/bap.c b/src/shared/bap.c index cc1fa1ffbe32..79d9345d9161 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -4703,6 +4703,18 @@ clone: } } + /* Resume reading sink locations if supported */ + if (pacs->sink && pacs->sink_loc && !pacs->sink_loc_value) { + if (gatt_db_attribute_get_char_data(pacs->sink_loc, + NULL, &value_handle, + NULL, NULL, NULL)) { + bt_gatt_client_read_value(bap->client, + value_handle, + read_sink_pac_loc, + bap, NULL); + } + } + /* Resume reading sources if supported */ if (pacs->source && queue_isempty(bap->rdb->sources)) { if (gatt_db_attribute_get_char_data(pacs->source, @@ -4715,6 +4727,19 @@ clone: } } + /* Resume reading source locations if supported */ + if (pacs->source && pacs->source_loc && + !pacs->source_loc_value) { + if (gatt_db_attribute_get_char_data(pacs->source_loc, + NULL, &value_handle, + NULL, NULL, NULL)) { + bt_gatt_client_read_value(bap->client, + value_handle, + read_source_pac_loc, + bap, NULL); + } + } + queue_foreach(bap->remote_eps, bap_endpoint_foreach, bap); bap_cp_attach(bap);