Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2] [wrynose][backport] bluez5: Abort continuing response on fragmented CT replies
@ 2026-10-21  9:00 Shuai Zhang
  2026-10-27  7:22 ` Shuai Zhang
  2026-11-09 10:19 ` Yoann Congal
  0 siblings, 2 replies; 4+ messages in thread
From: Shuai Zhang @ 2026-10-21  9:00 UTC (permalink / raw)
  To: openembedded-core
  Cc: cheng.jiang, wei.deng, mengshi.wu, jinwang.li, xiuzhuo.shang,
	shuai.zhang, chenhong.zhou

Send AbortContinuingResponse when a Get Element Attributes reply
arrives fragmented, as the CT side does not reassemble fragments.

Backport upstream bluez commit 249e2bedf ("avrcp: Abort continuing
response on fragmented CT replies") to bluez 5.86.

Fixes PTS test AVRCP/CT/RCR/BV-03-C.

Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
---
Changes for v2:
- Fix subject prefix to [wrynose][backport]
- Drop Upstream-Status tag from the commit message
- Keep upstream Upstream-Status and both Signed-off-by lines in the recipe patch

Link to v1: https://lists.openembedded.org/g/openembedded-core/topic/patchtest_results_for/121863269
---
 meta/recipes-connectivity/bluez5/bluez5.inc   |  1 +
 ...inuing-response-on-fragmented-CT-rep.patch | 63 +++++++++++++++++++
 2 files changed, 64 insertions(+)
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch

diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
index d857c23..2d0ee56 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -76,6 +76,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
            file://0001-src-device-Fix-stored-gatt-cache-DB-Hash-value-no.patch    \
            file://0001-profile-Set-L2CAP-IMTU-for-OBEX-profile-listeners.patch \
            file://0001-adapter-restrict-delta-0-RSSI-to-proximity-filters.patch \
+           file://0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch \
            "
 S = "${UNPACKDIR}/bluez-${PV}"
 
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch
new file mode 100644
index 0000000..9b29ffa
--- /dev/null
+++ b/meta/recipes-connectivity/bluez5/bluez5/0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch
@@ -0,0 +1,63 @@
+From 41a00c93baa48cbd63b182b853e93a946962cada Mon Sep 17 00:00:00 2001
+From: Simon Mikuda <simon.mikuda@streamunlimited.com>
+Date: Tue, 9 Jun 2026 23:26:56 +0200
+Subject: [PATCH] avrcp: Abort continuing response on fragmented CT replies
+
+Send AbortContinuingResponse when a Get Element Attributes reply
+arrives fragmented, as the CT side does not reassemble fragments.
+
+Fixes PTS test AVRCP/CT/RCR/BV-03-C
+
+Upstream-Status: Backport [https://github.com/bluez/bluez/commit/249e2bedfacf51fc6c89f43a0adb9a12d761c2b7]
+Signed-off-by: Simon Mikuda <simon.mikuda@streamunlimited.com>
+Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
+---
+ profiles/audio/avrcp.c | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
+index 326dfda..557ed97 100644
+--- a/profiles/audio/avrcp.c
++++ b/profiles/audio/avrcp.c
+@@ -2466,6 +2466,24 @@ static void avrcp_parse_attribute_list(struct avrcp_player *player,
+ 	}
+ }
+ 
++static void avrcp_abort_continuing(struct avrcp *session, uint8_t pdu_id)
++{
++	uint8_t buf[AVRCP_HEADER_LENGTH + 1];
++	struct avrcp_header *pdu = (void *) buf;
++
++	memset(buf, 0, sizeof(buf));
++
++	set_company_id(pdu->company_id, IEEEID_BTSIG);
++	pdu->pdu_id = AVRCP_ABORT_CONTINUING;
++	pdu->packet_type = AVRCP_PACKET_TYPE_SINGLE;
++	pdu->params_len = cpu_to_be16(1);
++	pdu->params[0] = pdu_id;
++
++	avctp_send_vendordep_req(session->conn, AVC_CTYPE_CONTROL,
++					AVC_SUBUNIT_PANEL, buf, sizeof(buf),
++					NULL, session);
++}
++
+ static gboolean avrcp_get_element_attributes_rsp(struct avctp *conn,
+ 						uint8_t code, uint8_t subunit,
+ 						uint8_t transaction,
+@@ -2483,6 +2501,13 @@ static gboolean avrcp_get_element_attributes_rsp(struct avctp *conn,
+ 	if (code == AVC_CTYPE_REJECTED)
+ 		return FALSE;
+ 
++	/* Abort fragmented responses as reassembly is not supported */
++	if (pdu->packet_type == AVRCP_PACKET_TYPE_START ||
++			pdu->packet_type == AVRCP_PACKET_TYPE_CONTINUING) {
++		avrcp_abort_continuing(session, AVRCP_GET_ELEMENT_ATTRIBUTES);
++		return FALSE;
++	}
++
+ 	count = pdu->params[0];
+ 
+ 	if (be16_to_cpu(pdu->params_len) - 1 < count * 8) {
+-- 
+2.34.1
+
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] [wrynose][backport] bluez5: Abort continuing response on fragmented CT replies
  2026-10-21  9:00 [PATCH v2] [wrynose][backport] bluez5: Abort continuing response on fragmented CT replies Shuai Zhang
@ 2026-10-27  7:22 ` Shuai Zhang
  2026-10-27  8:44   ` [OE-core] " Yoann Congal
  2026-11-09 10:19 ` Yoann Congal
  1 sibling, 1 reply; 4+ messages in thread
From: Shuai Zhang @ 2026-10-27  7:22 UTC (permalink / raw)
  To: openembedded-core
  Cc: cheng.jiang, wei.deng, mengshi.wu, jinwang.li, xiuzhuo.shang,
	chenhong.zhou

Hi Maintainer,

On 10/21/2026 5:00 PM, Shuai Zhang wrote:
> Send AbortContinuingResponse when a Get Element Attributes reply
> arrives fragmented, as the CT side does not reassemble fragments.
>
> Backport upstream bluez commit 249e2bedf ("avrcp: Abort continuing
> response on fragmented CT replies") to bluez 5.86.
>
> Fixes PTS test AVRCP/CT/RCR/BV-03-C.
>
> Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
> ---
> Changes for v2:
> - Fix subject prefix to [wrynose][backport]
> - Drop Upstream-Status tag from the commit message
> - Keep upstream Upstream-Status and both Signed-off-by lines in the recipe patch
>
> Link to v1: https://lists.openembedded.org/g/openembedded-core/topic/patchtest_results_for/121863269
> ---
>   meta/recipes-connectivity/bluez5/bluez5.inc   |  1 +
>   ...inuing-response-on-fragmented-CT-rep.patch | 63 +++++++++++++++++++
>   2 files changed, 64 insertions(+)
>   create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch
>
> diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
> index d857c23..2d0ee56 100644
> --- a/meta/recipes-connectivity/bluez5/bluez5.inc
> +++ b/meta/recipes-connectivity/bluez5/bluez5.inc
> @@ -76,6 +76,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
>              file://0001-src-device-Fix-stored-gatt-cache-DB-Hash-value-no.patch    \
>              file://0001-profile-Set-L2CAP-IMTU-for-OBEX-profile-listeners.patch \
>              file://0001-adapter-restrict-delta-0-RSSI-to-proximity-filters.patch \
> +           file://0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch \
>              "
>   S = "${UNPACKDIR}/bluez-${PV}"
>   
> diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch
> new file mode 100644
> index 0000000..9b29ffa
> --- /dev/null
> +++ b/meta/recipes-connectivity/bluez5/bluez5/0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch
> @@ -0,0 +1,63 @@
> +From 41a00c93baa48cbd63b182b853e93a946962cada Mon Sep 17 00:00:00 2001
> +From: Simon Mikuda <simon.mikuda@streamunlimited.com>
> +Date: Tue, 9 Jun 2026 23:26:56 +0200
> +Subject: [PATCH] avrcp: Abort continuing response on fragmented CT replies
> +
> +Send AbortContinuingResponse when a Get Element Attributes reply
> +arrives fragmented, as the CT side does not reassemble fragments.
> +
> +Fixes PTS test AVRCP/CT/RCR/BV-03-C
> +
> +Upstream-Status: Backport [https://github.com/bluez/bluez/commit/249e2bedfacf51fc6c89f43a0adb9a12d761c2b7]
> +Signed-off-by: Simon Mikuda <simon.mikuda@streamunlimited.com>
> +Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
> +---
> + profiles/audio/avrcp.c | 25 +++++++++++++++++++++++++
> + 1 file changed, 25 insertions(+)
> +
> +diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
> +index 326dfda..557ed97 100644
> +--- a/profiles/audio/avrcp.c
> ++++ b/profiles/audio/avrcp.c
> +@@ -2466,6 +2466,24 @@ static void avrcp_parse_attribute_list(struct avrcp_player *player,
> + 	}
> + }
> +
> ++static void avrcp_abort_continuing(struct avrcp *session, uint8_t pdu_id)
> ++{
> ++	uint8_t buf[AVRCP_HEADER_LENGTH + 1];
> ++	struct avrcp_header *pdu = (void *) buf;
> ++
> ++	memset(buf, 0, sizeof(buf));
> ++
> ++	set_company_id(pdu->company_id, IEEEID_BTSIG);
> ++	pdu->pdu_id = AVRCP_ABORT_CONTINUING;
> ++	pdu->packet_type = AVRCP_PACKET_TYPE_SINGLE;
> ++	pdu->params_len = cpu_to_be16(1);
> ++	pdu->params[0] = pdu_id;
> ++
> ++	avctp_send_vendordep_req(session->conn, AVC_CTYPE_CONTROL,
> ++					AVC_SUBUNIT_PANEL, buf, sizeof(buf),
> ++					NULL, session);
> ++}
> ++
> + static gboolean avrcp_get_element_attributes_rsp(struct avctp *conn,
> + 						uint8_t code, uint8_t subunit,
> + 						uint8_t transaction,
> +@@ -2483,6 +2501,13 @@ static gboolean avrcp_get_element_attributes_rsp(struct avctp *conn,
> + 	if (code == AVC_CTYPE_REJECTED)
> + 		return FALSE;
> +
> ++	/* Abort fragmented responses as reassembly is not supported */
> ++	if (pdu->packet_type == AVRCP_PACKET_TYPE_START ||
> ++			pdu->packet_type == AVRCP_PACKET_TYPE_CONTINUING) {
> ++		avrcp_abort_continuing(session, AVRCP_GET_ELEMENT_ATTRIBUTES);
> ++		return FALSE;
> ++	}
> ++
> + 	count = pdu->params[0];
> +
> + 	if (be16_to_cpu(pdu->params_len) - 1 < count * 8) {
> +--
> +2.34.1
> +


  Just wanted to check if there are any updates on this. Thanks!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH v2] [wrynose][backport] bluez5: Abort continuing response on fragmented CT replies
  2026-10-27  7:22 ` Shuai Zhang
@ 2026-10-27  8:44   ` Yoann Congal
  0 siblings, 0 replies; 4+ messages in thread
From: Yoann Congal @ 2026-10-27  8:44 UTC (permalink / raw)
  To: shuai.zhang, openembedded-core
  Cc: cheng.jiang, wei.deng, mengshi.wu, jinwang.li, xiuzhuo.shang,
	chenhong.zhou

On Tue Oct 27, 2026 at 8:22 AM CET, Shuai Zhang via lists.openembedded.org wrote:
> Hi Maintainer,
>
> On 10/21/2026 5:00 PM, Shuai Zhang wrote:
>> Send AbortContinuingResponse when a Get Element Attributes reply
>> arrives fragmented, as the CT side does not reassemble fragments.
>>
>> Backport upstream bluez commit 249e2bedf ("avrcp: Abort continuing
>> response on fragmented CT replies") to bluez 5.86.
>>
>> Fixes PTS test AVRCP/CT/RCR/BV-03-C.
>>
>> Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
>> ---
>> Changes for v2:
>> - Fix subject prefix to [wrynose][backport]
>> - Drop Upstream-Status tag from the commit message
>> - Keep upstream Upstream-Status and both Signed-off-by lines in the recipe patch
>>
>> Link to v1: https://lists.openembedded.org/g/openembedded-core/topic/patchtest_results_for/121863269
>> ---
>>   meta/recipes-connectivity/bluez5/bluez5.inc   |  1 +
>>   ...inuing-response-on-fragmented-CT-rep.patch | 63 +++++++++++++++++++
>>   2 files changed, 64 insertions(+)
>>   create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch
>
>   Just wanted to check if there are any updates on this. Thanks!

Hello,

I couldn't take this for the current wrynose cycle, so, it will have to
wait until the next cycle, in 1-2 weeks.

Regards,
-- 
Yoann Congal
Smile ECS


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH v2] [wrynose][backport] bluez5: Abort continuing response on fragmented CT replies
  2026-10-21  9:00 [PATCH v2] [wrynose][backport] bluez5: Abort continuing response on fragmented CT replies Shuai Zhang
  2026-10-27  7:22 ` Shuai Zhang
@ 2026-11-09 10:19 ` Yoann Congal
  1 sibling, 0 replies; 4+ messages in thread
From: Yoann Congal @ 2026-11-09 10:19 UTC (permalink / raw)
  To: shuai.zhang, openembedded-core
  Cc: cheng.jiang, wei.deng, mengshi.wu, jinwang.li, xiuzhuo.shang,
	chenhong.zhou

On Wed Oct 21, 2026 at 11:00 AM CEST, Shuai Zhang via lists.openembedded.org wrote:
> Send AbortContinuingResponse when a Get Element Attributes reply
> arrives fragmented, as the CT side does not reassemble fragments.
>
> Backport upstream bluez commit 249e2bedf ("avrcp: Abort continuing
> response on fragmented CT replies") to bluez 5.86.
>
> Fixes PTS test AVRCP/CT/RCR/BV-03-C.
>
> Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
> ---
> Changes for v2:
> - Fix subject prefix to [wrynose][backport]
> - Drop Upstream-Status tag from the commit message
> - Keep upstream Upstream-Status and both Signed-off-by lines in the recipe patch
>
> Link to v1: https://lists.openembedded.org/g/openembedded-core/topic/patchtest_results_for/121863269
> ---
>  meta/recipes-connectivity/bluez5/bluez5.inc   |  1 +
>  ...inuing-response-on-fragmented-CT-rep.patch | 63 +++++++++++++++++++
>  2 files changed, 64 insertions(+)
>  create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch
>
> diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
> index d857c23..2d0ee56 100644
> --- a/meta/recipes-connectivity/bluez5/bluez5.inc
> +++ b/meta/recipes-connectivity/bluez5/bluez5.inc
> @@ -76,6 +76,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
>             file://0001-src-device-Fix-stored-gatt-cache-DB-Hash-value-no.patch    \
>             file://0001-profile-Set-L2CAP-IMTU-for-OBEX-profile-listeners.patch \
>             file://0001-adapter-restrict-delta-0-RSSI-to-proximity-filters.patch \
> +           file://0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch \
>             "
>  S = "${UNPACKDIR}/bluez-${PV}"
>  
> diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch
> new file mode 100644
> index 0000000..9b29ffa
> --- /dev/null
> +++ b/meta/recipes-connectivity/bluez5/bluez5/0001-avrcp-Abort-continuing-response-on-fragmented-CT-rep.patch
> @@ -0,0 +1,63 @@
> +From 41a00c93baa48cbd63b182b853e93a946962cada Mon Sep 17 00:00:00 2001
> +From: Simon Mikuda <simon.mikuda@streamunlimited.com>
> +Date: Tue, 9 Jun 2026 23:26:56 +0200
> +Subject: [PATCH] avrcp: Abort continuing response on fragmented CT replies
> +
> +Send AbortContinuingResponse when a Get Element Attributes reply
> +arrives fragmented, as the CT side does not reassemble fragments.
> +
> +Fixes PTS test AVRCP/CT/RCR/BV-03-C
> +
> +Upstream-Status: Backport [https://github.com/bluez/bluez/commit/249e2bedfacf51fc6c89f43a0adb9a12d761c2b7]
> +Signed-off-by: Simon Mikuda <simon.mikuda@streamunlimited.com>

Simon did not Signed-off the upstream commit. Please do not add someone
else's SoB => Please remove this for v3.

> +Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
 This is fine: you're supposed to SoB the patches you backport.

> +---
> + profiles/audio/avrcp.c | 25 +++++++++++++++++++++++++
> + 1 file changed, 25 insertions(+)

Regards,
-- 
Yoann Congal
Smile ECS


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-09 10:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21  9:00 [PATCH v2] [wrynose][backport] bluez5: Abort continuing response on fragmented CT replies Shuai Zhang
2026-10-27  7:22 ` Shuai Zhang
2026-10-27  8:44   ` [OE-core] " Yoann Congal
2026-11-09 10:19 ` Yoann Congal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox