Skip to content

NRSC-5 FM

NRSC-5 FM decodes HD Radio hybrid and full-digital FM services in an isolated browser worker. It delivers digital audio, station/service metadata, and broadcast objects rather than treating the signal as analog wide-FM audio.

Input geometry

Property Value
Domain complex IQ
Exact rate 1,488,375/2 S/s = 744,187.5 S/s
Bandwidth 350 kHz minimum, 440 kHz preferred, 500 kHz maximum
Tuning absolute RF, fixed-span channel policy
Module budget 1,024 MiB
Toolchain Emscripten 3.1.69

Pipeline

flowchart TB
    CU8[Receiver CU8] --> MIX[VFO frequency translation]
    MIX --> RAT[Exact rational channelizer<br/>to 1,488,375/2 S/s]
    RAT --> WRAP[RF Sentry NRSC-5 ABI wrapper]
    WRAP --> ACQ[OFDM acquisition / synchronization]
    ACQ --> FFT[OFDM FFT and partition processing]
    FFT --> FEC[Convolutional and Reed–Solomon FEC]
    FEC --> L2[Layer 2 / SIS / SIG / PIDS]
    L2 --> HDC[HDC audio through patched FAAD2]
    L2 --> OBJ[Objects, images, alerts, station data]
    HDC --> AUDIO[Decoder audio service]
    OBJ --> UI[Decoder workspace / station intelligence]

The vendored theori-io/nrsc5 3.2.0 source implements OFDM acquisition, carrier/symbol synchronization, logical-channel decoding, deinterleaving, convolutional and Reed–Solomon correction, service-information parsing, and audio/data service output. RF Sentry removes the upstream CLI, file, RTL-SDR, and RTL-TCP acquisition paths; IQ enters only through the bounded decoder ABI.

FFTW 3.3.10 provides transform code in the vendored build. HDC audio uses FAAD2 2.11.2 with RF Sentry's documented WebAssembly integration patches. Missing native imports are fail-closed stubs, not hidden host access.

FM and AM use separate exact-rate manifests backed by the same production artifact. The build matrix and decoders/vendor/PROVENANCE.md record its exact revision, patch/input hashes and artifact identity. The import audit grants no device, RTL-TCP, network, CLI or file-input authority. Fixed same-origin artifact retrieval belongs to the browser worker host, not to the decoder module.

Outputs

Events include synchronization, MER/BER diagnostics where the decoder engine supplies them, SIS/SIG station and service identity, program/audio service changes, PIDS, alerts, images, and other broadcast objects. Metrics retain their actual denominator and protocol stage; a sync lock is not a valid audio frame or complete object.

Audio is drained through ABI stereo-audio exports with an exact rational reported rate. Fragmented media uses bounded IDs, content types, names, dimensions, fragment indexes, and explicit consume operations.

Public services and content safety

Public HD1–HD8 program selection preserves left/right channels through DecoderAudioPath's exact-phase 44.1-to-48 kHz conversion and the stereo audio worklet. Program/source changes reset stale audio at their boundary. Handoff through the existing engine is exclusive: digital audio is not implicitly mixed with an unaligned analog source. Mono analog sources still feed both outputs without collapsing genuine decoder stereo.

Radio-reported restricted service access is enforced in both the UI and WASM adapter. Unavailable, unknown, restricted, corrupt and unsupported services remain distinct. Every radio-supplied string, image, binary object and fragment is bounded and validated; emergency content is explicitly not safety-certified.

Bounded session media deduplicates received objects by hash while retaining arrival history. Station logos and selected-program track art have separate associations; explicit downloads do not upload content to third parties. Supported TTN traffic mosaics and matching radar objects retain their received registration/coverage evidence. An empty registered radar crop does not prove the broadcast image failed or that the wider radar field contains no returns.

Detection and validation

Receiving IQ · searching for HD sync means the worker has received continuous decoder-rate samples. A strong analog FM signal can reach this state. HD sync acquired reports the decoder's synchronization event. A retune, input discontinuity or loss of sync returns the job to searching.

FM broadcast allocations and occupied bandwidth are recommendation priors. The detector can recognize a broad digital/wide-FM-shaped emission, but only NRSC-5 synchronization and decoded/FEC-valid service output confirm the protocol. Auto Start respects manifest geometry and avoids sanitizer variants.

Coverage and limitations

The production FM fixture is exercised by tools/test-nrsc5-fixture.sh and the decoder artifact/manager/event tests. Audio and broadcast-object retention remain bounded by session policy. RF Sentry does not claim calibrated RF MER or BER when the upstream engine does not supply an applicable measurement.

Ledger and remaining proof

docs/roadmap/decoders.md 6B.5 — HD Radio / NRSC-5 records repository qualification and subsequent focused live FM/audio/media checkpoints. These do not constitute final 6B.5 acceptance: its checkboxes remain open. Positive AM, the full rate/lane/failure/reacquisition matrix, live sanitizer fault capture/replay, upstream-output comparison, resource measurements and formal operator acceptance remain explicit gates. A pinned FM fixture cannot qualify the AM path.

Common artifact/manager/event regressions and tools/test-nrsc5-fixture.sh are evidence for their tested cases, not a replacement for that matrix. Diagnostic capture/hash/privacy details are on the sanitizer page.