summaryrefslogtreecommitdiff
path: root/stacks/crdop/docs/SOUNDCARD-QUALIFICATION.md
blob: b35d55b98ce99915f87002adc9eec720d5e1a567 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Sound card qualification — CRDOP / MAX25-SoftModem

**Purpose:** Measurable criteria for interface hardware used with CRDOP. No product endorsements — class-based requirements.

See also [ROADMAP.md](../ROADMAP.md) (P0/P1 audio requirements).

---

## Mandatory architecture

```
CRDOP DSP → sound_proxy → libasound (hw:) → codec → radio interface
```

| Forbidden in production path | Reason |
|------------------------------|--------|
| PulseAudio default route | Mixing, resampling, latency |
| PipeWire default | Variable buffer |
| Bluetooth A2DP/HFP | Codec + AGC |

INI: `[audio] backend = alsa-kernel`, `no_pulse = yes`.

---

## Sample rate

| Baud target | Minimum rate | CRDOP default |
|-------------|--------------|---------------|
| 1200 AFSK | 48000 Hz | **48000** |
| 9600 G3RUH (audio tap) | 48000–96000 | 48000 + tuning |
| 19200 | 96000 Hz | 96000 if hardware supports |

---

## Qualification tests

Run on candidate interface **before** field deployment.

| ID | Test | Pass |
|----|------|------|
| **Q1** | Loopback cable, 1200 Hz sine 2 s | THD acceptable by ear + FFT peak at 1200 ±2 Hz |
| **Q2** | Loopback Bell 202 sniffer | `max25-signal-sniffer --loopback` or ALSA loop |
| **Q3** | Mark/space calibration tones | `--mark` / `--space` tools within ±5 Hz |
| **Q4** | 60 s full-duplex record+play | No xrun in `dmesg` / ALSA log |
| **Q5** | Clock drift | 10 min loopback: no cumulative symbol slip at 1200 bd |

---

## Interface classes

| Class | Isolation | 1200 AFSK | 19200 path |
|-------|-----------|-----------|------------|
| **A** | Galvanic line I/O, fixed gain | Required minimum | Test Q1–Q5 |
| **B** | USB codec, headphone/mic level | Acceptable with level match | Not recommended |
| **C** | Onboard mic/speaker only | Acoustic bench only | Fail |

CRDOP production path: **Class A or B** with line-level radio interface — see [HARDWARE-INTERFACE.md](HARDWARE-INTERFACE.md).

---

## Level guidelines

| Path | Typical level |
|------|---------------|
| Line OUT → radio mic in | 100–300 mV RMS (adjust pad) |
| Radio speaker/line → Line IN | Attenuate to avoid clipping |
| DC offset | AC coupling required |

---

## Baud scaling

Requirements **rise faster than linear** above 1200 bd:

| Baud | Clock jitter tolerance | Filter flatness |
|------|------------------------|-----------------|
| 1200 | moderate | 300–3000 Hz FM audio path OK |
| 9600 | strict | 10 Hz–5 kHz flat, constant group delay |
| 19200 | professional | Direct FSK tap — not soundcard mic path |

---

## Failure actions

| Symptom | Action |
|---------|--------|
| xruns | Increase `period_frames`; reduce system load |
| Wrong tones | Verify 48000 Hz; check resampler not inserted |
| Intermittent decode | Replace Class C with A/B; check ground loop |

---

## Community list (planned)

P0 bench exit: publish operator-submitted **class + Q1–Q2 result** table — no vendor ranking.
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com