Skip to contentSkip to conversation

org.bluez.MediaTransport: Allow Volume property to follow profile range

PATCH Applied Luiz Augusto von Dentz 3 participants 4 messages Jan 22, 2025 – Jan 23, 2025 Bluetooth drivers

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/2 org.bluez.MediaTransport: Allow Volume property to follow profile range

From: Luiz Augusto von Dentz <[email protected]>

This makes the Volume property to follow the profile defined range.

---
 doc/org.bluez.MediaTransport.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
doc/org.bluez.MediaTransport.rst +2 -1
index 78789bc8044a..a4894a413652 100644
@@ -128,7 +128,8 @@ uint16 Volume [readwrite, optional]
 	Indicates volume level of the transport, this property is only writeable
 	when the transport was acquired by the sender.
 
-	Possible Values: 0-127
+	Possible Values: 0-127 (A2DP)
+			 0-255 (BAP)
 
 object Endpoint [readonly, optional, experimental]
 ``````````````````````````````````````````````````
Signature · 1 line
2.48.1
author maintainer
#1 lore raw

PATCH 2/2 vcp: Fix using scaled values for volume

From: Luiz Augusto von Dentz <[email protected]>

This makes the volume range 0-255 as per VCP spec rather than scaling it to fit 0-127.

---
 profiles/audio/transport.c | 14 +++++++-------
 profiles/audio/vcp.c       | 23 +++++------------------
 profiles/audio/vcp.h       |  4 ++--
 3 files changed, 14 insertions(+), 27 deletions(-)
profiles/audio/transport.c +7 -7
index eff95a7c2655..4635c978bd80 100644
@@ -126,8 +126,8 @@ struct media_transport_ops {
 	void (*set_state)(struct media_transport *transport,
 				transport_state_t state);
 	void *(*get_stream)(struct media_transport *transport);
-	int8_t (*get_volume)(struct media_transport *transport);
-	int (*set_volume)(struct media_transport *transport, int8_t level);
+	uint8_t (*get_volume)(struct media_transport *transport);
+	int (*set_volume)(struct media_transport *transport, uint8_t level);
 	int (*set_delay)(struct media_transport *transport, uint16_t delay);
 	void (*update_links)(const struct media_transport *transport);
 	GDestroyNotify destroy;
@@ -616,7 +616,7 @@ static void transport_a2dp_remove_owner(struct media_transport *transport,
 	a2dp->cancel_resume = FALSE;
 }
 
-static int8_t transport_a2dp_get_volume(struct media_transport *transport)
+static uint8_t transport_a2dp_get_volume(struct media_transport *transport)
 {
 	struct a2dp_transport *a2dp = transport->data;
 	return a2dp->volume;
@@ -624,7 +624,7 @@ static int8_t transport_a2dp_get_volume(struct media_transport *transport)
 
 #ifdef HAVE_AVRCP
 static int transport_a2dp_src_set_volume(struct media_transport *transport,
-					int8_t level)
+					uint8_t level)
 {
 	struct a2dp_transport *a2dp = transport->data;
 
@@ -635,7 +635,7 @@ static int transport_a2dp_src_set_volume(struct media_transport *transport,
 }
 
 static int transport_a2dp_snk_set_volume(struct media_transport *transport,
-					int8_t level)
+					uint8_t level)
 {
 	struct a2dp_transport *a2dp = transport->data;
 	bool notify;
@@ -2190,13 +2190,13 @@ static void bap_connecting(struct bt_bap_stream *stream, bool state, int fd,
 	bap_update_links(transport);
 }
 
-static int8_t transport_bap_get_volume(struct media_transport *transport)
+static uint8_t transport_bap_get_volume(struct media_transport *transport)
 {
 	return bt_audio_vcp_get_volume(transport->device);
 }
 
 static int transport_bap_set_volume(struct media_transport *transport,
-								int8_t volume)
+								uint8_t volume)
 {
 	return bt_audio_vcp_set_volume(transport->device, volume) ? 0 : -EIO;
 }
profiles/audio/vcp.c +5 -18
index 608496a003b6..423210b4af3b 100644
@@ -103,25 +103,12 @@ static bool match_data(const void *data, const void *match_data)
 	return vdata->vcp == vcp;
 }
 
-static int8_t scale_volume(uint8_t volume)
-{
-	/* Convert 0-255 to 0-127. */
-	return volume / 2;
-}
-
-static uint8_t unscale_volume(int8_t volume)
-{
-	/* Convert 0-127 to 0-255. */
-	return volume * 2;
-}
-
 static void vcp_volume_changed(struct bt_vcp *vcp, uint8_t volume)
 {
 	struct vcp_data *data = queue_find(sessions, match_data, vcp);
 
 	if (data)
-		media_transport_update_device_volume(data->device,
-						      scale_volume(volume));
+		media_transport_update_device_volume(data->device, volume);
 }
 
 static void vcp_data_add(struct vcp_data *data)
@@ -179,22 +166,22 @@ static void vcp_data_remove(struct vcp_data *data)
 	}
 }
 
-int8_t bt_audio_vcp_get_volume(struct btd_device *device)
+uint8_t bt_audio_vcp_get_volume(struct btd_device *device)
 {
 	struct vcp_data *data = queue_find(sessions, match_device, device);
 
 	if (data)
-		return scale_volume(bt_vcp_get_volume(data->vcp));
+		return bt_vcp_get_volume(data->vcp);
 
 	return 0;
 }
 
-bool bt_audio_vcp_set_volume(struct btd_device *device, int8_t volume)
+bool bt_audio_vcp_set_volume(struct btd_device *device, uint8_t volume)
 {
 	struct vcp_data *data = queue_find(sessions, match_device, device);
 
 	if (data)
-		return bt_vcp_set_volume(data->vcp, unscale_volume(volume));
+		return bt_vcp_set_volume(data->vcp, volume);
 
 	return FALSE;
 }
profiles/audio/vcp.h +2 -2
index f313cd96a5fc..cf7935d1a4ea 100644
@@ -8,5 +8,5 @@
  *
  */
 
-int8_t bt_audio_vcp_get_volume(struct btd_device *device);
-bool bt_audio_vcp_set_volume(struct btd_device *device, int8_t volume);
+uint8_t bt_audio_vcp_get_volume(struct btd_device *device);
+bool bt_audio_vcp_set_volume(struct btd_device *device, uint8_t volume);
Signature · 1 line
2.48.1
#2 lore raw
In reply to Luiz Augusto von Dentz

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/project/bluetooth/list/?series=927649

---Test result---

Test Summary:

CheckPatch                    PENDING   0.21 seconds
GitLint                       PENDING   0.17 seconds
BuildEll                      PASS      20.29 seconds
BluezMake                     FAIL      1421.52 seconds
MakeCheck                     FAIL      23.80 seconds
MakeDistcheck                 PASS      161.88 seconds
CheckValgrind                 FAIL      157.54 seconds
CheckSmatch                   FAIL      263.22 seconds
bluezmakeextell               FAIL      90.73 seconds
IncrementalBuild              PENDING   0.27 seconds
ScanBuild                     PASS      848.03 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: BluezMake - FAIL
Desc: Build BlueZ
Output:

tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:12893:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without 12893 | int main(int argc, char *argv[])

      |     ^~~~
unit/test-avdtp.c: In function ‘main’:
unit/test-avdtp.c:766:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
  766 | int main(int argc, char *argv[])
      |     ^~~~
profiles/audio/transport.c:2445:4: error: initialization of ‘uint8_t (*)(struct media_transport *)’ {aka ‘unsigned char (*)(struct media_transport *)’} from incompatible pointer type ‘int8_t (*)(struct media_transport *)’ {aka ‘signed char (*)(struct media_transport *)’} [-Werror=incompatible-pointer-types]
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2406:16: note: in definition of macro ‘TRANSPORT_OPS’
 2406 |  .get_volume = _get_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:4: note: (near initialization for ‘transport_ops[6].get_volume’)
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2406:16: note: in definition of macro ‘TRANSPORT_OPS’
 2406 |  .get_volume = _get_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:31: error: initialization of ‘int (*)(struct media_transport *, uint8_t)’ {aka ‘int (*)(struct media_transport *, unsigned char)’} from incompatible pointer type ‘int (*)(struct media_transport *, int8_t)’ {aka ‘int (*)(struct media_transport *, signed char)’} [-Werror=incompatible-pointer-types]
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2407:16: note: in definition of macro ‘TRANSPORT_OPS’
 2407 |  .set_volume = _set_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:31: note: (near initialization for ‘transport_ops[6].set_volume’)
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2407:16: note: in definition of macro ‘TRANSPORT_OPS’
 2407 |  .set_volume = _set_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
unit/test-avrcp.c: In function ‘main’:
unit/test-avrcp.c:989:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
  989 | int main(int argc, char *argv[])
      |     ^~~~

cc1: all warnings being treated as errors
make[1]: *** [Makefile:10125: profiles/audio/bluetoothd-transport.o] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4693: all] Error 2
##############################
Test: MakeCheck - FAIL
Desc: Run Bluez Make Check
Output:

profiles/audio/transport.c:2445:4: error: initialization of ‘uint8_t (*)(struct media_transport *)’ {aka ‘unsigned char (*)(struct media_transport *)’} from incompatible pointer type ‘int8_t (*)(struct media_transport *)’ {aka ‘signed char (*)(struct media_transport *)’} [-Werror=incompatible-pointer-types]

 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2406:16: note: in definition of macro ‘TRANSPORT_OPS’
 2406 |  .get_volume = _get_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:4: note: (near initialization for ‘transport_ops[6].get_volume’)
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2406:16: note: in definition of macro ‘TRANSPORT_OPS’
 2406 |  .get_volume = _get_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:31: error: initialization of ‘int (*)(struct media_transport *, uint8_t)’ {aka ‘int (*)(struct media_transport *, unsigned char)’} from incompatible pointer type ‘int (*)(struct media_transport *, int8_t)’ {aka ‘int (*)(struct media_transport *, signed char)’} [-Werror=incompatible-pointer-types]
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2407:16: note: in definition of macro ‘TRANSPORT_OPS’
 2407 |  .set_volume = _set_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:31: note: (near initialization for ‘transport_ops[6].set_volume’)
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2407:16: note: in definition of macro ‘TRANSPORT_OPS’
 2407 |  .set_volume = _set_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~

cc1: all warnings being treated as errors
make[1]: *** [Makefile:10125: profiles/audio/bluetoothd-transport.o] Error 1
make: *** [Makefile:12344: check] Error 2
##############################
Test: CheckValgrind - FAIL
Desc: Run Bluez Make Check with Valgrind
Output:

tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:12893:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without 12893 | int main(int argc, char *argv[])

      |     ^~~~
profiles/audio/transport.c:2445:4: error: initialization of ‘uint8_t (*)(struct media_transport *)’ {aka ‘unsigned char (*)(struct media_transport *)’} from incompatible pointer type ‘int8_t (*)(struct media_transport *)’ {aka ‘signed char (*)(struct media_transport *)’} [-Werror=incompatible-pointer-types]
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2406:16: note: in definition of macro ‘TRANSPORT_OPS’
 2406 |  .get_volume = _get_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:4: note: (near initialization for ‘transport_ops[6].get_volume’)
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2406:16: note: in definition of macro ‘TRANSPORT_OPS’
 2406 |  .get_volume = _get_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:31: error: initialization of ‘int (*)(struct media_transport *, uint8_t)’ {aka ‘int (*)(struct media_transport *, unsigned char)’} from incompatible pointer type ‘int (*)(struct media_transport *, int8_t)’ {aka ‘int (*)(struct media_transport *, signed char)’} [-Werror=incompatible-pointer-types]
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2407:16: note: in definition of macro ‘TRANSPORT_OPS’
 2407 |  .set_volume = _set_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:31: note: (near initialization for ‘transport_ops[6].set_volume’)
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2407:16: note: in definition of macro ‘TRANSPORT_OPS’
 2407 |  .set_volume = _set_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~

cc1: all warnings being treated as errors
make[1]: *** [Makefile:10125: profiles/audio/bluetoothd-transport.o] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:12344: check] Error 2
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

src/shared/crypto.c:271:21: warning: Variable length array is used.
src/shared/crypto.c:272:23: warning: Variable length array is used.
src/shared/gatt-helpers.c:768:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:830:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1323:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1354:23: warning: Variable length array is used.
src/shared/gatt-server.c:278:25: warning: Variable length array is used.
src/shared/gatt-server.c:618:25: warning: Variable length array is used.
src/shared/gatt-server.c:716:25: warning: Variable length array is used.
src/shared/bap.c:296:25: warning: array of flexible structures
src/shared/bap.c: note: in included file:
./src/shared/ascs.h:88:25: warning: array of flexible structures
src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
src/shared/crypto.c:271:21: warning: Variable length array is used.
src/shared/crypto.c:272:23: warning: Variable length array is used.
src/shared/gatt-helpers.c:768:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:830:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1323:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1354:23: warning: Variable length array is used.
src/shared/gatt-server.c:278:25: warning: Variable length array is used.
src/shared/gatt-server.c:618:25: warning: Variable length array is used.
src/shared/gatt-server.c:716:25: warning: Variable length array is used.
src/shared/bap.c:296:25: warning: array of flexible structures
src/shared/bap.c: note: in included file:
./src/shared/ascs.h:88:25: warning: array of flexible structures
src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
tools/mesh-cfgtest.c:1453:17: warning: unknown escape sequence: '\%'
tools/sco-tester.c: note: in included file:
./lib/bluetooth.h:232:15: warning: array of flexible structures
./lib/bluetooth.h:237:31: warning: array of flexible structures
tools/bneptest.c:634:39: warning: unknown escape sequence: '\%'
tools/seq2bseq.c:57:26: warning: Variable length array is used.
tools/obex-client-tool.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
android/avctp.c:505:34: warning: Variable length array is used.
android/avctp.c:556:34: warning: Variable length array is used.
unit/test-avrcp.c:373:26: warning: Variable length array is used.
unit/test-avrcp.c:398:26: warning: Variable length array is used.
unit/test-avrcp.c:414:24: warning: Variable length array is used.
android/avrcp-lib.c:1085:34: warning: Variable length array is used.
android/avrcp-lib.c:1583:34: warning: Variable length array is used.
android/avrcp-lib.c:1612:34: warning: Variable length array is used.
android/avrcp-lib.c:1638:34: warning: Variable length array is used.
mesh/mesh-io-mgmt.c:523:67: warning: Variable length array is used.
client/display.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
src/shared/crypto.c:271:21: warning: Variable length array is used.
src/shared/crypto.c:272:23: warning: Variable length array is used.
src/shared/gatt-helpers.c:768:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:830:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1323:31: warning: Variable length array is used.
src/shared/gatt-helpers.c:1354:23: warning: Variable length array is used.
src/shared/gatt-server.c:278:25: warning: Variable length array is used.
src/shared/gatt-server.c:618:25: warning: Variable length array is used.
src/shared/gatt-server.c:716:25: warning: Variable length array is used.
src/shared/bap.c:296:25: warning: array of flexible structures
src/shared/bap.c: note: in included file:
./src/shared/ascs.h:88:25: warning: array of flexible structures
src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
monitor/packet.c: note: in included file:
monitor/display.h:82:26: warning: Variable length array is used.
monitor/packet.c:1868:26: warning: Variable length array is used.
monitor/packet.c: note: in included file:
monitor/bt.h:3606:52: warning: array of flexible structures
monitor/bt.h:3594:40: warning: array of flexible structures
monitor/l2cap.c: note: in included file:
monitor/display.h:82:26: warning: Variable length array is used.
monitor/msft.c: note: in included file:
monitor/msft.h:88:44: warning: array of flexible structures
monitor/att.c: note: in included file:
monitor/display.h:82:26: warning: Variable length array is used.
tools/rctest.c:627:33: warning: non-ANSI function declaration of function 'automated_send_recv'
tools/hex2hcd.c:136:26: warning: Variable length array is used.
tools/meshctl.c:324:33: warning: non-ANSI function declaration of function 'forget_mesh_devices'
tools/mesh-gatt/node.c:456:39: warning: non-ANSI function declaration of function 'node_get_local_node'
tools/mesh-gatt/net.c:1239:30: warning: non-ANSI function declaration of function 'get_next_seq'
tools/mesh-gatt/net.c:2193:29: warning: non-ANSI function declaration of function 'net_get_default_ttl'
tools/mesh-gatt/net.c:2207:26: warning: non-ANSI function declaration of function 'net_get_seq_num'
tools/mesh-gatt/prov.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
tools/mesh-gatt/onoff-model.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
ell/log.c:431:65: warning: non-ANSI function declaration of function 'register_debug_section'
ell/log.c:439:68: warning: non-ANSI function declaration of function 'free_debug_sections'
ell/random.c:60:42: warning: non-ANSI function declaration of function 'l_getrandom_is_supported'
ell/cipher.c:660:28: warning: non-ANSI function declaration of function 'init_supported'
ell/checksum.c:372:28: warning: non-ANSI function declaration of function 'init_supported'
ell/checksum.c:434:47: warning: non-ANSI function declaration of function 'l_checksum_cmac_aes_supported'
ell/cipher.c:519:24: warning: Variable length array is used.
ell/cert-crypto.c:36:33: warning: Variable length array is used.
ell/cert-crypto.c:132:36: warning: Variable length array is used.
ell/cert-crypto.c:188:36: warning: Variable length array is used.
ell/cert-crypto.c:241:31: warning: Variable length array is used.
ell/key.c:538:25: warning: Variable length array is used.
ell/dbus-service.c:548:49: warning: non-ANSI function declaration of function '_dbus_object_tree_new'
ell/dbus-filter.c:232:46: warning: Variable length array is used.
ell/tls.c:45:25: warning: Variable length array is used.
ell/tls.c:86:22: warning: Variable length array is used.
ell/tls.c:86:46: warning: Variable length array is used.
ell/tls-suites.c:1078:25: warning: Variable length array is used.
ell/tls-suites.c:1080:34: warning: Variable length array is used.
ell/tls-suites.c:1083:41: warning: Variable length array is used.
ell/tls-suites.c:1132:41: warning: Variable length array is used.
ell/tls.c:1819:26: warning: Variable length array is used.
emulator/btdev.c:448:29: warning: Variable length array is used.
emulator/bthost.c:613:28: warning: Variable length array is used.
emulator/bthost.c:787:28: warning: Variable length array is used.
attrib/gatttool.c:235:23: warning: Variable length array is used.
attrib/interactive.c: note: in included file (through /usr/include/readline/readline.h):
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function'
/usr/include/readline/rltypedefs.h:36:25: warning: non-ANSI function declaration of function 'VFunction'
/usr/include/readline/rltypedefs.h:37:27: warning: non-ANSI function declaration of function 'CPFunction'
/usr/include/readline/rltypedefs.h:38:29: warning: non-ANSI function declaration of function 'CPPFunction'
attrib/interactive.c:174:27: warning: non-ANSI function declaration of function 'disconnect_io'
attrib/interactive.c:299:23: warning: Variable length array is used.
profiles/sap/server.c: note: in included file:
profiles/sap/sap.h:77:35: warning: array of flexible structures
profiles/audio/transport.c:2445:4: error: initialization of ‘uint8_t (*)(struct media_transport *)’ {aka ‘unsigned char (*)(struct media_transport *)’} from incompatible pointer type ‘int8_t (*)(struct media_transport *)’ {aka ‘signed char (*)(struct media_transport *)’} [-Werror=incompatible-pointer-types]

 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2406:16: note: in definition of macro ‘TRANSPORT_OPS’
 2406 |  .get_volume = _get_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:4: note: (near initialization for ‘transport_ops[6].get_volume’)
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2406:16: note: in definition of macro ‘TRANSPORT_OPS’
 2406 |  .get_volume = _get_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:31: error: initialization of ‘int (*)(struct media_transport *, uint8_t)’ {aka ‘int (*)(struct media_transport *, unsigned char)’} from incompatible pointer type ‘int (*)(struct media_transport *, int8_t)’ {aka ‘int (*)(struct media_transport *, signed char)’} [-Werror=incompatible-pointer-types]
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2407:16: note: in definition of macro ‘TRANSPORT_OPS’
 2407 |  .set_volume = _set_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:31: note: (near initialization for ‘transport_ops[6].set_volume’)
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2407:16: note: in definition of macro ‘TRANSPORT_OPS’
 2407 |  .set_volume = _set_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~

cc1: all warnings being treated as errors
make[1]: *** [Makefile:10125: profiles/audio/bluetoothd-transport.o] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4693: all] Error 2
##############################
Test: bluezmakeextell - FAIL
Desc: Build Bluez with External ELL
Output:

profiles/audio/transport.c:2445:4: error: initialization of ‘uint8_t (*)(struct media_transport *)’ {aka ‘unsigned char (*)(struct media_transport *)’} from incompatible pointer type ‘int8_t (*)(struct media_transport *)’ {aka ‘signed char (*)(struct media_transport *)’} [-Werror=incompatible-pointer-types]

 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2406:16: note: in definition of macro ‘TRANSPORT_OPS’
 2406 |  .get_volume = _get_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:4: note: (near initialization for ‘transport_ops[6].get_volume’)
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2406:16: note: in definition of macro ‘TRANSPORT_OPS’
 2406 |  .get_volume = _get_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:31: error: initialization of ‘int (*)(struct media_transport *, uint8_t)’ {aka ‘int (*)(struct media_transport *, unsigned char)’} from incompatible pointer type ‘int (*)(struct media_transport *, int8_t)’ {aka ‘int (*)(struct media_transport *, signed char)’} [-Werror=incompatible-pointer-types]
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2407:16: note: in definition of macro ‘TRANSPORT_OPS’
 2407 |  .set_volume = _set_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~
profiles/audio/transport.c:2445:31: note: (near initialization for ‘transport_ops[6].set_volume’)
 2445 |    transport_asha_get_volume, transport_asha_set_volume, \
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/transport.c:2407:16: note: in definition of macro ‘TRANSPORT_OPS’
 2407 |  .set_volume = _set_volume, \
      |                ^~~~~~~~~~~
profiles/audio/transport.c:2472:2: note: in expansion of macro ‘ASHA_OPS’
 2472 |  ASHA_OPS(ASHA_PROFILE_UUID),
      |  ^~~~~~~~

cc1: all warnings being treated as errors
make[1]: *** [Makefile:10125: profiles/audio/bluetoothd-transport.o] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4693: all] Error 2
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:

---
Regards,
Linux Bluetooth

#3 lore raw
In reply to Luiz Augusto von Dentz
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 6 lines · On Wed, 22 Jan 2025 16:14:45 -0500 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

This makes the Volume property to follow the profile defined range.

---
 doc/org.bluez.MediaTransport.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Here is the summary with links:
- [BlueZ,v1,1/2] org.bluez.MediaTransport: Allow Volume property to follow profile range

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=43dbd5f7e64c
  - [BlueZ,v1,2/2] vcp: Fix using scaled values for volume
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=1d9a70206e38

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html