Skip to content

Commit

Permalink
wid: CAP: move vcp discovery to previous wid
Browse files Browse the repository at this point in the history
For some reason VCP discovery wasn't called in wid
handler where cap, bap and micp are discovered. This
caused procedures being called before VCP discovered
event has been received. Also added wait for vcp procedure
ev after some vcp procedures in wid 20106.
Fixes BTP ERROR in test cases: CAP/COM/CRC/BV-01-C,
CAP/COM/CRC/BV-03-C CAP/COM/CRC/BV-04-C
  • Loading branch information
piotrnarajowski committed Dec 27, 2024
1 parent 1ce4484 commit b776772
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions autopts/wid/cap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,9 @@ def hdl_wid_20100(params: WIDParams):
btp.micp_discover(addr_type, addr)
stack.micp.wait_discovery_completed_ev(addr_type, addr, 10)

btp.vcp_discover(addr_type, addr)
stack.vcp.wait_discovery_completed_ev(addr_type, addr, 30)

return True


Expand Down Expand Up @@ -1041,21 +1044,23 @@ def hdl_wid_20110(params: WIDParams):
lt1_test_name = params.test_case_name

stack = get_stack()
btp.vcp_discover(addr_type, addr)
stack.vcp.wait_discovery_completed_ev(addr_type, addr, 10)

if lt1_test_name == 'CAP/COM/CRC/BV-01-C':
btp.vcp_set_vol(50, addr_type, addr)
stack.vcp.wait_vcp_procedure_ev(addr_type, addr, 10)
if lt1_test_name == 'CAP/COM/CRC/BV-03-C':
btp.vcp_unmute(addr_type, addr)
stack.vcp.wait_vcp_procedure_ev(addr_type, addr, 10)
if lt1_test_name == 'CAP/COM/CRC/BV-04-C':
btp.vcp_mute(addr_type, addr)
stack.vcp.wait_vcp_procedure_ev(addr_type, addr, 10)
if lt1_test_name == 'CAP/COM/CRC/BV-05-C':
btp.vcp_set_vol(13, addr_type, addr)
if lt1_test_name == 'CAP/COM/CRC/BV-06-C':
btp.vcp_mute(addr_type, addr)
if lt1_test_name == 'CAP/COM/CRC/BV-09-C':
btp.aics_set_gain(42, addr_type, addr)
stack.aics.wait_aics_procedure_ev(addr_type, addr, 10)

return True

Expand Down

0 comments on commit b776772

Please sign in to comment.