Skip to content

Commit

Permalink
wid: Fix WID 364 and 366 handlers in BAP
Browse files Browse the repository at this point in the history
Those WIDs are send for both LT and LT2. To properly validate we
must check only for specific lower tester.
  • Loading branch information
sjanc committed Sep 11, 2024
1 parent 89edff0 commit c9b10cd
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions autopts/wid/bap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1860,12 +1860,13 @@ def hdl_wid_364(_: WIDParams):

for config in stack.bap.ase_configs:
if config.audio_dir == AudioDir.SOURCE:
ev = stack.bap.wait_stream_received_ev(config.addr_type,
config.addr,
config.ase_id,
10)
if ev is None:
return False
if config.addr_type == pts_addr_type_get() and config.addr == pts_addr_get():
ev = stack.bap.wait_stream_received_ev(config.addr_type,
config.addr,
config.ase_id,
10)
if ev is None:
return False

return True

Expand All @@ -1878,12 +1879,13 @@ def hdl_wid_366(_: WIDParams):

for config in stack.bap.ase_configs:
if config.audio_dir == AudioDir.SINK:
ev = stack.bap.wait_stream_received_ev(config.addr_type,
config.addr,
config.ase_id,
10)
if ev is None:
return False
if config.addr_type == pts_addr_type_get() and config.addr == pts_addr_get():
ev = stack.bap.wait_stream_received_ev(config.addr_type,
config.addr,
config.ase_id,
10)
if ev is None:
return False

return True

Expand Down

0 comments on commit c9b10cd

Please sign in to comment.