* [PATCH BlueZ 0/1] audio/avrcp: Add AvrcpVersion config option
@ 2026-09-22 15:00 Pavel Bozhko
2026-09-22 15:00 ` [PATCH BlueZ 1/1] " Pavel Bozhko
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Bozhko @ 2026-09-22 15:00 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Pavel Bozhko
Some devices advertise AVRCP 1.3 in SDP but still support absolute
volume (SetAbsoluteVolume and EVENT_VOLUME_CHANGED), introduced in
AVRCP 1.4. Examples include certain TVs such as LG webOS UM7450PLA
and Xiaomi Mi TV 4A 43 when they act as the audio source.
This patch adds an AvrcpVersion option under [AVRCP] so the local
target version can be raised when the peer SDP record is too old.
Pavel Bozhko (1):
audio/avrcp: Add AvrcpVersion config option
profiles/audio/avrcp.c | 7 +++++++
src/btd.h | 1 +
src/main.c | 32 ++++++++++++++++++++++++++++++++
src/main.conf | 8 ++++++++
4 files changed, 48 insertions(+)
--
2.50.1 (Apple Git-155)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH BlueZ 1/1] audio/avrcp: Add AvrcpVersion config option
2026-09-22 15:00 [PATCH BlueZ 0/1] audio/avrcp: Add AvrcpVersion config option Pavel Bozhko
@ 2026-09-22 15:00 ` Pavel Bozhko
2026-09-22 16:34 ` bluez.test.bot
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Bozhko @ 2026-09-22 15:00 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Pavel Bozhko
Some devices advertise AVRCP 1.3 in SDP but still support absolute
volume (SetAbsoluteVolume and EVENT_VOLUME_CHANGED), which the
specification introduced in version 1.4. Examples include certain
TVs such as LG webOS UM7450PLA and Xiaomi Mi TV 4A 43 when acting
as the audio source.
Add an AvrcpVersion option under [AVRCP] and apply it to the target
in target_init(), so the version check in avrcp_volume_supported()
can succeed for such peers.
---
profiles/audio/avrcp.c | 7 +++++++
src/btd.h | 1 +
src/main.c | 32 ++++++++++++++++++++++++++++++++
src/main.conf | 8 ++++++++
4 files changed, 48 insertions(+)
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index df5f97eaf..3c11ac064 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -4304,6 +4304,13 @@ static void target_init(struct avrcp *session)
target = data_init(session, AVRCP_REMOTE_UUID);
session->target = target;
+ if (btd_opts.avrcp.version &&
+ target->version < btd_opts.avrcp.version) {
+ DBG("Forcing AVRCP version 0x%04x (SDP 0x%04x)",
+ btd_opts.avrcp.version, target->version);
+ target->version = btd_opts.avrcp.version;
+ }
+
DBG("%p version 0x%04x", target, target->version);
btd_service_connecting_complete(service, 0);
diff --git a/src/btd.h b/src/btd.h
index d70276b1d..4ae46100d 100644
--- a/src/btd.h
+++ b/src/btd.h
@@ -124,6 +124,7 @@ struct btd_avdtp_opts {
struct btd_avrcp_opts {
bool volume_without_target;
bool volume_category;
+ uint16_t version;
};
struct btd_advmon_opts {
diff --git a/src/main.c b/src/main.c
index c7a55d30f..763fd2c8d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -181,6 +181,7 @@ static const char *avdtp_options[] = {
static const char *avrcp_options[] = {
"VolumeWithoutTarget",
"VolumeCategory",
+ "AvrcpVersion",
NULL
};
@@ -1350,6 +1351,35 @@ static void parse_avdtp(GKeyFile *config)
parse_avdtp_stream_mode(config);
}
+static void parse_avrcp_version(GKeyFile *config)
+{
+ char *str = NULL;
+ char *endptr = NULL;
+ unsigned int major, minor;
+ unsigned long val;
+ int n = 0;
+
+ if (!parse_config_string(config, "AVRCP", "AvrcpVersion", &str))
+ return;
+
+ if (sscanf(str, "%u.%u%n", &major, &minor, &n) == 2 && !str[n] &&
+ major <= 0xff && minor <= 0xff) {
+ btd_opts.avrcp.version = (major << 8) | minor;
+ g_free(str);
+ return;
+ }
+
+ val = strtoul(str, &endptr, 0);
+ if (endptr && *endptr == '\0' && val > 0 && val <= 0xffff) {
+ btd_opts.avrcp.version = val;
+ g_free(str);
+ return;
+ }
+
+ error("Invalid AVRCP version \"%s\"", str);
+ g_free(str);
+}
+
static void parse_avrcp(GKeyFile *config)
{
parse_config_bool(config, "AVRCP",
@@ -1358,6 +1388,7 @@ static void parse_avrcp(GKeyFile *config)
parse_config_bool(config, "AVRCP",
"VolumeCategory",
&btd_opts.avrcp.volume_category);
+ parse_avrcp_version(config);
}
static void parse_advmon(GKeyFile *config)
@@ -1433,6 +1464,7 @@ static void init_defaults(void)
btd_opts.avrcp.volume_without_target = false;
btd_opts.avrcp.volume_category = true;
+ btd_opts.avrcp.version = 0;
btd_opts.advmon.rssi_sampling_period = 0xFF;
btd_opts.csis.encrypt = true;
diff --git a/src/main.conf b/src/main.conf
index 1d8e97dc6..79048ea25 100644
--- a/src/main.conf
+++ b/src/main.conf
@@ -380,6 +380,14 @@
# notifications.
#VolumeCategory = true
+# Override the AVRCP version used for the local Target role. Some peers
+# report an older profile version (e.g. 1.3) while still supporting features
+# introduced later, such as absolute volume (SetAbsoluteVolume and
+# EVENT_VOLUME_CHANGED, AVRCP 1.4).
+# Possible values: 1.3, 1.4, 1.5, 1.6 or hexadecimal (e.g. 0x0104).
+# Defaults to using the version from the remote SDP record.
+#AvrcpVersion = 1.4
+
[Policy]
#
# The ReconnectUUIDs defines the set of remote services that should try
--
2.50.1 (Apple Git-155)
^ permalink raw reply related [flat|nested] 5+ messages in thread* RE: audio/avrcp: Add AvrcpVersion config option
2026-09-22 15:00 ` [PATCH BlueZ 1/1] " Pavel Bozhko
@ 2026-09-22 16:34 ` bluez.test.bot
0 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2026-09-22 16:34 UTC (permalink / raw)
To: linux-bluetooth, pvbozhko
[-- Attachment #1: Type: text/plain, Size: 2114 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1171436/
---Test result---
Test Summary:
CheckPatch FAIL 0.38 seconds
GitLint PASS 0.25 seconds
BuildEll PASS 15.28 seconds
BluezMake PASS 280.61 seconds
MakeCheck PASS 3.21 seconds
MakeDistcheck PASS 113.35 seconds
CheckValgrind PASS 114.41 seconds
CheckSmatch WARNING 215.57 seconds
bluezmakeextell PASS 71.20 seconds
TestFunctional PASS 902.81 seconds
IncrementalBuild PASS 286.04 seconds
ScanBuild PASS 790.96 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,1/1] audio/avrcp: Add AvrcpVersion config option
WARNING:LONG_LINE: line length of 81 exceeds 80 columns
#122: FILE: profiles/audio/avrcp.c:4310:
+ btd_opts.avrcp.version, target->version);
/home/runner/work/bluez/bluez/src/patch/14838844.patch total: 0 errors, 1 warnings, 90 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/home/runner/work/bluez/bluez/src/patch/14838844.patch has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
src/main.c: note: in included file (through src/device.h):
https://github.com/bluez/bluez/pull/2567
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH BlueZ v2 1/1] audio/avrcp: Add AvrcpVersion config option
@ 2026-09-23 9:18 Pavel Bozhko
2026-09-23 10:47 ` bluez.test.bot
2026-10-08 16:54 ` bluez.test.bot
0 siblings, 2 replies; 5+ messages in thread
From: Pavel Bozhko @ 2026-09-23 9:18 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Pavel Bozhko
Some devices advertise AVRCP 1.3 in SDP but still support absolute
volume (SetAbsoluteVolume and EVENT_VOLUME_CHANGED), which the
specification introduced in version 1.4. Examples include certain
TVs such as LG webOS UM7450PLA and Xiaomi Mi TV 4A 43 when acting
as the audio source.
Add an AvrcpVersion option under [AVRCP] and apply it to the target
in target_init(), so the version check in avrcp_volume_supported()
can succeed for such peers.
---
v2: wrap DBG() arguments to stay within 80 columns
profiles/audio/avrcp.c | 7 +++++++
src/btd.h | 1 +
src/main.c | 32 ++++++++++++++++++++++++++++++++
src/main.conf | 8 ++++++++
4 files changed, 48 insertions(+)
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index df5f97eaf..79fe0c04e 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -4304,6 +4304,13 @@ static void target_init(struct avrcp *session)
target = data_init(session, AVRCP_REMOTE_UUID);
session->target = target;
+ if (btd_opts.avrcp.version &&
+ target->version < btd_opts.avrcp.version) {
+ DBG("Forcing AVRCP version 0x%04x (SDP 0x%04x)",
+ btd_opts.avrcp.version, target->version);
+ target->version = btd_opts.avrcp.version;
+ }
+
DBG("%p version 0x%04x", target, target->version);
btd_service_connecting_complete(service, 0);
diff --git a/src/btd.h b/src/btd.h
index d70276b1d..4ae46100d 100644
--- a/src/btd.h
+++ b/src/btd.h
@@ -124,6 +124,7 @@ struct btd_avdtp_opts {
struct btd_avrcp_opts {
bool volume_without_target;
bool volume_category;
+ uint16_t version;
};
struct btd_advmon_opts {
diff --git a/src/main.c b/src/main.c
index c7a55d30f..763fd2c8d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -181,6 +181,7 @@ static const char *avdtp_options[] = {
static const char *avrcp_options[] = {
"VolumeWithoutTarget",
"VolumeCategory",
+ "AvrcpVersion",
NULL
};
@@ -1350,6 +1351,35 @@ static void parse_avdtp(GKeyFile *config)
parse_avdtp_stream_mode(config);
}
+static void parse_avrcp_version(GKeyFile *config)
+{
+ char *str = NULL;
+ char *endptr = NULL;
+ unsigned int major, minor;
+ unsigned long val;
+ int n = 0;
+
+ if (!parse_config_string(config, "AVRCP", "AvrcpVersion", &str))
+ return;
+
+ if (sscanf(str, "%u.%u%n", &major, &minor, &n) == 2 && !str[n] &&
+ major <= 0xff && minor <= 0xff) {
+ btd_opts.avrcp.version = (major << 8) | minor;
+ g_free(str);
+ return;
+ }
+
+ val = strtoul(str, &endptr, 0);
+ if (endptr && *endptr == '\0' && val > 0 && val <= 0xffff) {
+ btd_opts.avrcp.version = val;
+ g_free(str);
+ return;
+ }
+
+ error("Invalid AVRCP version \"%s\"", str);
+ g_free(str);
+}
+
static void parse_avrcp(GKeyFile *config)
{
parse_config_bool(config, "AVRCP",
@@ -1358,6 +1388,7 @@ static void parse_avrcp(GKeyFile *config)
parse_config_bool(config, "AVRCP",
"VolumeCategory",
&btd_opts.avrcp.volume_category);
+ parse_avrcp_version(config);
}
static void parse_advmon(GKeyFile *config)
@@ -1433,6 +1464,7 @@ static void init_defaults(void)
btd_opts.avrcp.volume_without_target = false;
btd_opts.avrcp.volume_category = true;
+ btd_opts.avrcp.version = 0;
btd_opts.advmon.rssi_sampling_period = 0xFF;
btd_opts.csis.encrypt = true;
diff --git a/src/main.conf b/src/main.conf
index 1d8e97dc6..79048ea25 100644
--- a/src/main.conf
+++ b/src/main.conf
@@ -380,6 +380,14 @@
# notifications.
#VolumeCategory = true
+# Override the AVRCP version used for the local Target role. Some peers
+# report an older profile version (e.g. 1.3) while still supporting features
+# introduced later, such as absolute volume (SetAbsoluteVolume and
+# EVENT_VOLUME_CHANGED, AVRCP 1.4).
+# Possible values: 1.3, 1.4, 1.5, 1.6 or hexadecimal (e.g. 0x0104).
+# Defaults to using the version from the remote SDP record.
+#AvrcpVersion = 1.4
+
[Policy]
#
# The ReconnectUUIDs defines the set of remote services that should try
--
2.50.1 (Apple Git-155)
^ permalink raw reply related [flat|nested] 5+ messages in thread* RE: audio/avrcp: Add AvrcpVersion config option
2026-09-23 9:18 [PATCH BlueZ v2 1/1] " Pavel Bozhko
@ 2026-09-23 10:47 ` bluez.test.bot
2026-10-08 16:54 ` bluez.test.bot
1 sibling, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2026-09-23 10:47 UTC (permalink / raw)
To: linux-bluetooth, pvbozhko
[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1172081/
---Test result---
Test Summary:
CheckPatch PASS 0.44 seconds
GitLint PASS 0.29 seconds
BuildEll PASS 14.88 seconds
BluezMake PASS 262.58 seconds
MakeCheck PASS 2.86 seconds
MakeDistcheck PASS 112.36 seconds
CheckValgrind PASS 117.33 seconds
CheckSmatch WARNING 191.58 seconds
bluezmakeextell PASS 71.86 seconds
TestFunctional FAIL 903.64 seconds
IncrementalBuild PASS 259.41 seconds
ScanBuild PASS 760.61 seconds
Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
src/main.c: note: in included file (through src/device.h):
##############################
Test: TestFunctional - FAIL
Desc: Run test-functional
Output:
FAIL functional.test_bap::test_bass_past_transport_acquire[hosts8-vm2]: AssertionError: Failed to acquire: org.bluez.Error.Failed
https://github.com/bluez/bluez/pull/2571
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: audio/avrcp: Add AvrcpVersion config option
2026-09-23 9:18 [PATCH BlueZ v2 1/1] " Pavel Bozhko
2026-09-23 10:47 ` bluez.test.bot
@ 2026-10-08 16:54 ` bluez.test.bot
1 sibling, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2026-10-08 16:54 UTC (permalink / raw)
To: linux-bluetooth, pvbozhko
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
This is an automated email and please do not reply to this email.
Dear Submitter,
This series was picked up by the CI more than 2 weeks ago and the pull
request created for it is still open, which means the series was never
applied to the tree.
Series: audio/avrcp: Add AvrcpVersion config option
Pull Request: https://github.com/bluez/bluez/pull/2571
Created: 2026-09-23 10:01:20+00:00
The pull request has been closed and no further action is taken on this
series.
If the change should still be considered, it must be resent to the Linux
Bluetooth mailing list (linux-bluetooth@vger.kernel.org) so that it is
picked up again.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-08 16:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-22 15:00 [PATCH BlueZ 0/1] audio/avrcp: Add AvrcpVersion config option Pavel Bozhko
2026-09-22 15:00 ` [PATCH BlueZ 1/1] " Pavel Bozhko
2026-09-22 16:34 ` bluez.test.bot
-- strict thread matches above, loose matches on Subject: below --
2026-09-23 9:18 [PATCH BlueZ v2 1/1] " Pavel Bozhko
2026-09-23 10:47 ` bluez.test.bot
2026-10-08 16:54 ` bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox