Skip to content

Commit 323d805

Browse files
gWaceyThalley
authored andcommitted
TMAP: Test TMAP/BMS/CTXT/BV-01-C [BMS Supports the Media Context Type]
Additions: - Create a custom test for TMAP/BMS/CTXT/BV-01-C - Include prerequisites for the test CAP/INI/BST/BV-01-C in this custom test. - Confirm that the TSPX_BASE IXIT entry includes the Streaming_Audio_Contexts LTV structure with the value “Media”. Signed-off-by: Graham Wacey <[email protected]>
1 parent 2ed5487 commit 323d805

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

autopts/ptsprojects/zephyr/tmap.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ def test_cases(ptses):
7575
TestFunc(btp.core_reg_svc_gap),
7676
TestFunc(stack.gap_init, iut_device_name),
7777
TestFunc(btp.gap_read_ctrl_info),
78-
TestFunc(lambda: pts.update_pixit_param("TMAP", "TSPX_bd_addr_iut",
79-
stack.gap.iut_addr_get_str())),
78+
TestFunc(lambda: pts.update_pixit_param("TMAP", "TSPX_bd_addr_iut", stack.gap.iut_addr_get_str())),
8079
TestFunc(btp.core_reg_svc_gatt),
8180
TestFunc(btp.set_pts_addr, pts_bd_addr, Addr.le_public),
8281
TestFunc(stack.gatt_init),
@@ -89,17 +88,29 @@ def test_cases(ptses):
8988
TestFunc(btp.core_reg_svc_tmap),
9089
TestFunc(btp.core_reg_svc_vcp),
9190
TestFunc(btp.core_reg_svc_vcs),
92-
TestFunc(btp.vcs_register, 1, False, 100),
9391
TestFunc(btp.core_reg_svc_tbs),
9492
TestFunc(btp.core_reg_svc_csip),
93+
TestFunc(btp.core_reg_svc_mics),
94+
TestFunc(btp.core_reg_svc_aics),
95+
TestFunc(btp.core_reg_svc_vocs),
96+
TestFunc(btp.core_reg_svc_gmcs),
97+
TestFunc(btp.core_reg_svc_cas),
98+
TestFunc(btp.core_reg_svc_micp),
99+
TestFunc(stack.aics_init),
95100
TestFunc(stack.ascs_init),
96101
TestFunc(stack.bap_init),
97102
TestFunc(stack.cap_init),
103+
TestFunc(stack.csip_init),
104+
TestFunc(stack.gmcs_init),
105+
TestFunc(stack.micp_init),
106+
TestFunc(stack.mics_init),
107+
TestFunc(stack.pacs_init),
108+
TestFunc(stack.tbs_init),
98109
TestFunc(stack.tmap_init),
99110
TestFunc(stack.vcp_init),
111+
TestFunc(btp.vcs_register, 1, False, 100),
100112
TestFunc(stack.vcs_init),
101-
TestFunc(stack.tbs_init),
102-
TestFunc(stack.csip_init),
113+
TestFunc(stack.vocs_init),
103114
]
104115

105116
adv_end = [

autopts/wid/tmap.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
QOS_CONFIG_SETTINGS,
2929
ASCSState,
3030
AudioDir,
31+
Context,
3132
WIDParams,
3233
create_lc3_ltvs_bytes,
3334
)
@@ -127,6 +128,8 @@ def hdl_wid_114(params: WIDParams):
127128
"""Please advertise with Broadcast Audio Announcement (0x1852) service data"""
128129

129130
# advertisement started in hdl_wid_506
131+
if params.test_case_name == 'TMAP/BMS/CTXT/BV-01-C':
132+
hdl_wid_506(params)
130133

131134
return True
132135

@@ -295,6 +298,12 @@ def hdl_wid_311(params: WIDParams):
295298
return True
296299

297300

301+
def hdl_wid_353(params: WIDParams):
302+
"""Wait for Broadcast ISO request."""
303+
304+
return True
305+
306+
298307
def hdl_wid_364(_: WIDParams):
299308
"""
300309
After processed audio stream data, please click OK.
@@ -330,6 +339,16 @@ def hdl_wid_376(_: WIDParams):
330339
return True
331340

332341

342+
def hdl_wid_377(_: WIDParams):
343+
"""
344+
Please confirm sent streaming data
345+
"""
346+
347+
# The IUT is expected to send autonomously
348+
349+
return True
350+
351+
333352
def hdl_wid_384(_: WIDParams):
334353
"""
335354
Click OK will start transmitting audio streaming data.
@@ -597,7 +616,7 @@ def hdl_wid_506(params: WIDParams):
597616
# based on cap/hdl_wid_114 using fixed configuration
598617

599618
source_num = 1
600-
metadata = struct.pack('<BBH', 3, AUDIO_METADATA_STREAMING_AUDIO_CONTEXTS, 0x0200)
619+
metadata = struct.pack("<BBH", 3, AUDIO_METADATA_STREAMING_AUDIO_CONTEXTS, Context.CONVERSATIONAL | Context.MEDIA)
601620
qos_set_name = '48_2_1'
602621
coding_format = 0x06
603622
vid = 0x0000

0 commit comments

Comments
 (0)