Skip to content

Commit 706cfc2

Browse files
nirav-agrawaldkalowsk
authored andcommitted
samples: bluetooth: fixes tmap sample issues
- Added support for CAP_COMMANDER in configuration to allow tmap-cg and tmap-ums roles to be validated. For CG and UMR, CAP INITIATOR and CAP COMMANDER roles are mandatory. Without this support, config "CONFIG_BT_TMAP_CG_SUPPORTED" & "CONFIG_BT_TMAP_UMS_SUPPORTED" are not getting defined and function fail during "valid_tmap_role()". - Replaced iso_pool user-data size from 8 to kconfig setting "CONFIG_BT_CONN_TX_USER_DATA_SIZE" to allow conn_iso_send() to success. Without it the user-data for iso_pool configured with value 8 but the kconfig "BT_CONN_TX_USER_DATA_SIZE" has default value as 16 causes conn_iso_send() function to fail. - Updated audio_timer_timeout() with expected QoS interval value to send ISO_SDU at every 10msec instead of 1 sec. Without this sink device receiving null-sdu most of the time as ISO interval is 10ms and unicast-source keep sends SDU at every 1 sec. Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
1 parent 5a8189b commit 706cfc2

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

samples/bluetooth/tmap_bms/src/cap_initiator.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929

3030
NET_BUF_POOL_FIXED_DEFINE(tx_pool,
3131
(BROADCAST_ENQUEUE_COUNT * CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT),
32-
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU), 8, NULL);
32+
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU),
33+
CONFIG_BT_CONN_TX_USER_DATA_SIZE, NULL);
3334

3435
static K_SEM_DEFINE(sem_broadcast_started, 0, 1);
3536
static K_SEM_DEFINE(sem_broadcast_stopped, 0, 1);

samples/bluetooth/tmap_central/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ CONFIG_BT_TMAP=y
1616

1717
# CAP support
1818
CONFIG_BT_CAP_INITIATOR=y
19+
CONFIG_BT_CAP_COMMANDER=y
1920

2021
# CSIP support
2122
CONFIG_BT_CSIP_SET_COORDINATOR=y

samples/bluetooth/tmap_central/src/cap_initiator.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ static struct bt_bap_ep *unicast_sink_eps[CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_C
3535
static struct bt_bap_ep *unicast_source_eps[CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT];
3636

3737
NET_BUF_POOL_FIXED_DEFINE(tx_pool, CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT,
38-
CONFIG_BT_ISO_TX_MTU + BT_ISO_CHAN_SEND_RESERVE, 8, NULL);
38+
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU),
39+
CONFIG_BT_CONN_TX_USER_DATA_SIZE, NULL);
3940

4041
static K_SEM_DEFINE(sem_cas_discovery, 0, 1);
4142
static K_SEM_DEFINE(sem_discover_sink, 0, 1);
@@ -411,7 +412,7 @@ static void audio_timer_timeout(struct k_work *work)
411412
/* Retry later */
412413
}
413414

414-
k_work_schedule(&audio_send_work, K_MSEC(1000));
415+
k_work_schedule(&audio_send_work, K_USEC(unicast_preset_48_2_1.qos.interval));
415416
}
416417

417418
int cap_initiator_init(void)

0 commit comments

Comments
 (0)