From: "Yoann Congal" <yoann.congal@smile.fr>
To: "Wei Deng" <wei.deng@oss.qualcomm.com>,
<openembedded-core@lists.openembedded.org>
Cc: <jinwang.li@oss.qualcomm.com>, <xiuzhuo.shang@oss.qualcomm.com>,
<mengshi.wu@oss.qualcomm.com>, <cheng.jiang@oss.qualcomm.com>,
<quic_chezhou@quicinc.com>, <shuai.zhang@oss.qualcomm.com>
Subject: Re: [wrynose][PATCH 1/4] bluez5: fix set volume failure
Date: Mon, 06 Jul 2026 09:59:22 +0200 [thread overview]
Message-ID: <DJRBVA1RDACS.3AD63SNCFOM6D@smile.fr> (raw)
In-Reply-To: <20260626093920.1079859-1-wei.deng@oss.qualcomm.com>
On Fri Jun 26, 2026 at 11:39 AM CEST, Wei Deng wrote:
> From: Jinwang Li <jinwang.li@oss.qualcomm.com>
>
> Backport upstream fix for AVRCP volume initialization failure when
> AVRCP connects before AVDTP.
>
> Upstream-Status: Backport [bluez/bluez@121e5ca]
> Signed-off-by: Jinwang Li <jinwang.li@oss.qualcomm.com>
> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Hello Wei Deng,
While this has the author "Signed-off-by" line, it also must have yours
as the submitter of the backport request.
In this case, I've replaced your series with cherry-picks strait from
master so, no action needed on your side.
Thanks!
> ---
> meta/recipes-connectivity/bluez5/bluez5.inc | 1 +
> ...t-volume-failure-with-invalid-device.patch | 46 +++++++++++++++++++
> 2 files changed, 47 insertions(+)
> create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-transport-Fix-set-volume-failure-with-invalid-device.patch
>
> diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
> index c792cc9c66c..c09a759244e 100644
> --- a/meta/recipes-connectivity/bluez5/bluez5.inc
> +++ b/meta/recipes-connectivity/bluez5/bluez5.inc
> @@ -71,6 +71,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
> file://0001-Revert-shared-shell-Don-t-init-input-for-non-interac.patch \
> file://0001-tools-Work-around-broken-stdin-handling-in-home-made.patch \
> file://0001-gatt-client-Fix-use-after-free-caused-by-reentrant-c.patch \
> + file://0001-transport-Fix-set-volume-failure-with-invalid-device.patch \
> "
> S = "${UNPACKDIR}/bluez-${PV}"
>
> diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-transport-Fix-set-volume-failure-with-invalid-device.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-transport-Fix-set-volume-failure-with-invalid-device.patch
> new file mode 100644
> index 00000000000..b5846dec47f
> --- /dev/null
> +++ b/meta/recipes-connectivity/bluez5/bluez5/0001-transport-Fix-set-volume-failure-with-invalid-device.patch
> @@ -0,0 +1,46 @@
> +From 8a80f70c23ca5f93b1db7e3956cc7ee28c1fa767 Mon Sep 17 00:00:00 2001
> +From: Jinwang Li <jinwang.li@oss.qualcomm.com>
> +Date: Mon, 9 Mar 2026 19:18:26 +0800
> +Subject: [PATCH] transport: Fix set volume failure with invalid device volume
> +
> +When AVRCP is connected before AVDTP, an invalid device volume causes
> +the target to reject registration for the EVENT_VOLUME_CHANGED
> +notification, which breaks subsequent volume updates.
> +
> +Fix this by initializing the volume to the maximum value in the AVRCP
> +target init path when it is invalid, allowing the controller to
> +subscribe to AVRCP_EVENT_VOLUME_CHANGED.
> +
> +Fixes: fa7828bddd21 ("transport: Fix not being able to initialize volume properly")
> +Suggested-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> +Signed-off-by: Jinwang Li <jinwang.li@oss.qualcomm.com>
> +Upstream-Status: Backport [https://github.com/bluez/bluez/commit/121e5ca79be559c5374f8a54c6fb6e233e383379]
> +---
> + profiles/audio/avrcp.c | 9 ++++++++-
> + 1 file changed, 8 insertions(+), 1 deletion(-)
> +
> +diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
> +index 724b46c59..326dfdab7 100644
> +--- a/profiles/audio/avrcp.c
> ++++ b/profiles/audio/avrcp.c
> +@@ -4296,9 +4296,16 @@ static void target_init(struct avrcp *session)
> + if (target->version < 0x0104)
> + return;
> +
> +- if (avrcp_volume_supported(target))
> ++ if (avrcp_volume_supported(target)) {
> + session->supported_events |=
> + (1 << AVRCP_EVENT_VOLUME_CHANGED);
> ++ /* Check if transport volume hasn't been initialized then set it
> ++ * to max so it works properly if the controller attempts to
> ++ * subscribe to AVRCP_EVENT_VOLUME_CHANGED.
> ++ */
> ++ if (media_transport_get_a2dp_volume(session->dev) < 0)
> ++ media_transport_set_a2dp_volume(session->dev, 127);
> ++ }
> +
> + session->supported_events |=
> + (1 << AVRCP_EVENT_ADDRESSED_PLAYER_CHANGED) |
> +--
> +2.34.1
> +
--
Yoann Congal
Smile ECS
prev parent reply other threads:[~2026-07-06 7:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 9:39 [wrynose][PATCH 1/4] bluez5: fix set volume failure Wei Deng
2026-06-26 9:39 ` [wrynose][PATCH 2/4] bluez5: Fix sending extra bytes with MGMT_OP_ADD_EXT_ADV_DATA Wei Deng
2026-07-03 14:05 ` Yoann Congal
2026-06-26 9:39 ` [wrynose][PATCH 3/4] bluez5: fix gatt cache sync issue Wei Deng
2026-06-26 9:39 ` [wrynose][PATCH 4/4] bluez5: set L2CAP IMTU for OBEX profile listeners Wei Deng
2026-07-06 7:59 ` Yoann Congal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DJRBVA1RDACS.3AD63SNCFOM6D@smile.fr \
--to=yoann.congal@smile.fr \
--cc=cheng.jiang@oss.qualcomm.com \
--cc=jinwang.li@oss.qualcomm.com \
--cc=mengshi.wu@oss.qualcomm.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=quic_chezhou@quicinc.com \
--cc=shuai.zhang@oss.qualcomm.com \
--cc=wei.deng@oss.qualcomm.com \
--cc=xiuzhuo.shang@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox