Skip to content

DICE: add guarded ZED-R16 fallback for 88.2/96 kHz formats - #224

Closed
stephanterning wants to merge 2 commits into
mrmidi:mainfrom
stephanterning:codex/zed-r16-rate-formats
Closed

stephanterning wants to merge 2 commits into
mrmidi:mainfrom
stephanterning:codex/zed-r16-rate-formats

Conversation

@stephanterning

Copy link
Copy Markdown

Problem and change

ZED-R16 needs its missing 88.2/96 kHz modes exposed when EAP format discovery is unavailable. The generic fallback only publishes the currently observed mode.

Add a small ZED-R16 fallback to the existing DICE format selector. It supplies the measured 16+10 PCM low-rate and 16+2 PCM high-rate layouts, preserving the capture-only MIDI slot. The fallback requires a matching GUID vendor/category/product and matching live stream counts, PCM counts, AM824 widths and MIDI-port counts. It accepts attachment at 44.1/48/88.2/96 kHz.

Prior discussion

Related to #223. This draft follows the issue immediately so the implementation can be discussed concretely; the approach has not been agreed with the maintainer.

Architecture and scope

Two production files and one existing test file. The change stays in DICE audio format discovery. Successful EAP results, including an empty catalog, remain authoritative. Other identities retain the observed-mode fallback.

Existing capability filtering, configuration validation, allocation and rate-change lifecycle remain in use. No clock probing, inferred channel scaling, transport/DMA changes or new subsystem. No signing, entitlements, build settings, device-name or clock-source-selector changes. Clock-source selection will be a separate contribution.

Testing and evidence

On the isolated branch based on upstream 787683e59a4469b84d6e3b50602eda7e844190f8:

  • 34 host tests passed: DiceMultirateValidationTests (6), DICETcatProtocolTests (26), DiceMultirateClockTests (2).
  • Coverage includes low/high attachment formats, allocation/configuration resolution, capability filtering, mismatched OUI/category/product, different serial numbers, invalid stream geometry, stale low-rate descriptors at a high rate, non-ZED fallback, and successful/empty EAP precedence.
  • Release ASFWDriver compile check passed, explicitly arm64; verified the binary architecture with lipo -archs. Unsigned; not installed.
  • Static analysis reported three warnings in untouched files: ASFWSCSIController.cpp (reference count), PostResetTimingCoordinator.cpp (dead store), ASFWAvcAudioStream.cpp (potential leak). No clean-base analyzer comparison was run.
  • git diff --check passed. Added/changed helper and test code formatted with the repository's clang-format configuration.
  • Behavioral references reviewed read-only: Linux sound/firewire/dice/dice.c:34–68 (GUID layout) and dice-stream.c:609–672 (EAP precedence/current-mode fallback). No reference implementation copied.

The isolated PR build has not been installed or hardware-qualified. Host tests do not validate DriverKit lifecycle or real controller behavior. Detailed historical hardware evidence is not included in this draft. Endurance, recovery, MIDI, external clocking and other DICE hardware are not qualified here; formations retain hardwareValidated=false and the existing validation policy.

Regression risks

The selector is shared by DICE devices. Identity/geometry rejection and EAP-precedence tests constrain the fallback's scope, but cannot establish compatibility across hardware or firmware revisions. An unrecognized ZED layout keeps the previous observed-mode behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant