Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:xmos/sw_usb_audio into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
xross committed Nov 10, 2022
2 parents e19af90 + 9f7a40b commit 5bb0351
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def pytest_addoption(parser):
def parse_features(config):
max_analogue_chans = 8

config_re = r"^(?P<uac>[12])(?P<sync_mode>[AS])(?P<slave>[MS])i(?P<chan_i>\d+)o(?P<chan_o>\d+)(?P<midi>[mx])(?P<spdif_i>[sx])(?P<spdif_o>[sx])(?P<adat_i>[ax])(?P<adat_o>[ax])(?P<dsd>[dx])(?P<tdm8>(_tdm8)?)"
config_re = r"^(?P<uac>[12])(?P<sync_mode>[AS])(?P<i2s>[MSX])i(?P<chan_i>\d+)o(?P<chan_o>\d+)(?P<midi>[mx])(?P<spdif_i>[sx])(?P<spdif_o>[sx])(?P<adat_i>[ax])(?P<adat_o>[ax])(?P<dsd>[dx])(?P<tdm8>(_tdm8)?)"
match = re.search(config_re, config)
if not match:
pytest.exit(f"Error: Unable to parse features from {config}")
Expand All @@ -45,8 +45,6 @@ def parse_features(config):
for k in ["midi", "spdif_i", "spdif_o", "adat_i", "adat_o", "dsd", "tdm8"]:
features[k] = features[k] not in ["", "x"]

features["slave"] = features["slave"] == "S"

# Set the number of analogue channels
features["analogue_i"] = min(features["chan_i"], max_analogue_chans)
features["analogue_o"] = min(features["chan_o"], max_analogue_chans)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_analogue.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def test_analogue_output(pytestconfig, xtag_wrapper, xsig, board_config, fs):
xsig_config = f'mc_analogue_output_{features["analogue_o"]}ch'
if "xk_316_mc" in board_config and features["tdm8"]:
xsig_config = "mc_analogue_output_2ch"
elif "xk_216_mc" in board_config and features["tdm8"] and features["slave"]:
elif "xk_216_mc" in board_config and features["tdm8"] and features["i2s"] == "S":
xsig_config += "_paired" # Pairs of channels can be swapped in hardware
xsig_config_path = Path(__file__).parent / "xsig_configs" / f"{xsig_config}.json"
adapter_dut, adapter_harness = xtag_wrapper
Expand Down

0 comments on commit 5bb0351

Please sign in to comment.