USB 15e4:002c) - Python 76%
- JavaScript 12%
- C 9%
- Shell 3%
- Nix <1%
- 1 more language <1%
newmark-ns7ii #
newmark-ns7ii is an open-source Linux driver and Mixxx mapping for the
Numark NS7 II DJ controller (USB 15e4:002c).
The NS7 II is not a standard USB Audio Class device: its interfaces are
vendor-specific (class 0xff), so Linux cannot bind snd-usb-audio and get
audio and MIDI automatically. This project reverse-engineered the Windows
protocol from USB captures, implements the transport as an out-of-tree ALSA
driver, and provides a controller mapping for Mixxx.
A public hack, not a product. This project was mainly implemented by AI agents (mostly DeepSeek V4.1 Flash 1017 and Kimi K3.1 Pro). It is published because it may be useful to someone else — not as a claim of quality, stability or reproducibility. Test on your own unit before relying on it.
Status (2026-10-27, hardware-tested on one NS7 II): the driver builds, loads, exposes a 4-channel playback / 2-channel capture ALSA card and duplex raw MIDI. Motor start/stop and the PLAY LED work from Mixxx. Audible output routing, non-zero capture content and platter scratch still need validation. Read
STATUS.mdandNEXT.mdbefore relying on a feature.
What you get #
| Device endpoint | Linux interface |
|---|---|
ISO OUT 0x02 |
ALSA playback: 4 channels, 44.1 kHz, S32_LE, 24 significant bits on the wire |
ISO IN 0x81 |
1 ms clock used to pace playback and keep the control surface awake |
BULK IN 0x86 |
ALSA capture: 2 channels, 44.1 kHz, decoded from serial bit-plane frames |
BULK IN 0x83 / OUT 0x04 |
Duplex ALSA raw MIDI; 42-byte USB records, one MIDI message per output record |
ALSA names: card NS7II, PCM Numark NS7II Audio, raw MIDI
Numark NS7II MIDI. The Mixxx mapping lives in mixxx/.
Quick start #
All commands run from the repository root. Building and loading need root; the software checks do not.
1. Enter a build environment #
On NixOS, the project ships a shell with the compiler, ALSA tools, Python, Node,
tshark and Mixxx:
nix-shell # or: direnv allow, once
Elsewhere install gcc, make, python3 (standard library only), the kernel
headers for the running kernel, and optionally node and alsa-utils.
The shell exports KDIR, the kernel build tree matching the running kernel. If
detection is wrong or /lib/modules/$(uname -r)/build is missing, override it:
make KDIR=/path/to/linux-6.18.37/lib/modules/6.18.37/build
2. Build and test #
make # -> build/snd_ns7ii.ko
make test # userspace wire-format tests, no kernel headers needed
make check # wire tests + mapping validation + capture regression (if present)
make check should end with SUMMARY: 0 failed. The Windows capture data is
not distributed; when extracted/ is absent the capture regression is skipped
rather than failed. See capture/README.md.
3. Load it and check the device #
sudo rmmod snd_ns7ii 2>/dev/null # ignore "not currently loaded"
sudo insmod build/snd_ns7ii.ko
cat /proc/asound/cards # expect a 'NS7II' card
aplay -l; arecord -l; amidi -l # 4-ch playback, 2-ch capture, duplex MIDI
make check-hardware # module, ALSA, sequencer and counters in one view
The driver keeps the USB transport running after the first start, so the USB LED
staying lit while the module is loaded is expected. Unload with make unload.
4. Install the Mixxx mapping #
make mixxx-install
Restart Mixxx and choose, under Preferences → Controllers, device
Numark NS7II MIDI and mapping Numark NS7 II.
The mapping is inputs-only by default. LEDs and platter motors stay off
until you enable enableOutputs / enableMotor in its settings. Read
mixxx/README.md first: it has the safe single-LED and motor
test procedure.
Documentation #
| Start here | Why |
|---|---|
docs/README.md |
Documentation index and reading paths for users, driver developers, reverse engineers and mapping authors |
TUTORIAL.md |
The full story: from a Windows USB capture to an ALSA driver |
MIXXX.md |
Audio setup in Mixxx, channel routing, test plan and limits |
mixxx/README.md |
Mapping coverage, settings, verified vs unverified behaviour |
STATUS.md |
Verified hardware state and known rough edges |
NEXT.md |
Current handoff: open issues and the next experiment |
analysis/ |
Capture-backed protocol evidence, with frame citations |
capture/ |
Recording and analysing a new USB capture |
CONTRIBUTING.md |
How to build, test, report bugs and contribute |
Goodies #
These were built for this project but are deliberately reusable. The full
write-up, commands and lessons are in docs/GOODIES.md.
| Reusable thing | Use it for |
|---|---|
tools/usbq.py |
Query a huge USB capture by endpoint, time, frame or byte pattern without reading the raw PDML |
tools/pdml_extract.py, tools/pcapng_extract.py |
Turn a Wireshark PDML export or USBPcap .pcapng into compact, queryable records |
tools/verify_capture.py |
Turn protocol conclusions into executable regression assertions |
tools/check.sh |
One command to verify the whole software stack |
tools/analyze_capture.py |
Align a scripted capture to its action manifest and decode outputs |
tools/midi_inventory.py, tools/capture2_midi_inventory.py |
Inventory every MIDI message a device actually sent |
tools/mixxx_keys.py, tools/validate_mapping.py, tools/ns7ii_mapping_harness.js |
Validate a Mixxx mapping offline, without a Mixxx checkout or hardware |
tools/motor-replay.py, tools/platter-test.sh, tools/motor-burst-diagnose.sh |
Safe, repeatable hardware bring-up and A/B tests for actuators |
tools/generate_test_audio.py |
Generate per-channel tone files to identify physical audio routing |
Workflows worth copying: capture → extract → query → assert; the counter-driven hardware loop (read counters, do one thing, read again); offline mapping validation before touching hardware; and one layer changed per round.
Lessons that generalise: absence from a capture is not proof of absence on the wire; a clock packet is not a sustained clock; MIDI running status must be re-expanded before framing; host-side URB completion is not device-side success; and a shared transport may have to stay alive if the device cannot restart.
Ideas for another project: a Linux usbmon adapter for the same query tools, a generic vendor-audio driver skeleton, a reusable Mixxx mapping validator, and action-manifest capture profiles for other devices.
The full write-up, commands, examples and caveats are in
docs/GOODIES.md.
Repository layout #
| Path | Contents |
|---|---|
driver/ |
Kernel module, wire helpers and userspace tests |
mixxx/ |
Mixxx controller mapping (XML + JavaScript) and its guide |
tools/ |
Capture, protocol, mapping and hardware test tools |
analysis/ |
Protocol findings with capture frame citations |
capture/ |
Capture protocol, action manifest and analysis workflow |
docs/ |
Documentation index, reusable goodies, glossary |
Makefile, shell.nix |
Build, check, install and environment entry points |
Licence and attribution #
The repository is an aggregate of two separately licensed parts:
driver/— GPL-2.0-only. It is derived from the GPL-2.0-only Omatainer NS7 driver (drivers/ns7/snd_ns7.c) and cannot be relicensed. Seedriver/LICENSE.- Everything else — GPL-3.0-or-later. See
LICENSE.
The Mixxx mapping follows the Mixxx controller-mapping conventions and was informed by Mixxx's own NS7 mapping. Protocol analysis was performed against captures of the device under Windows and Serato; those captures are not distributed with the repository.