File: debug.md

package info (click to toggle)
hifiberry-dsp 1.3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 23,228 kB
  • sloc: python: 7,624; xml: 6,099; sh: 1,035; makefile: 5
file content (72 lines) | stat: -rw-r--r-- 1,871 bytes parent folder | download
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
# HiFiBerry DSP Debug Configuration

## Enabling Debug Mode

To enable debug logging of all DSP memory writes (including REST API and SigmaStudio TCP server):

1. Edit the configuration file:
   ```bash
   sudo nano /etc/default/sigmatcpserver
   ```

2. Uncomment the DEBUG_OPTIONS line:
   ```bash
   DEBUG_OPTIONS="--debug"
   ```

3. Restart the service:
   ```bash
   sudo systemctl restart sigmatcpserver
   ```

## Viewing Debug Logs

To view the debug output:
```bash
sudo journalctl -u sigmatcpserver -f
```

## Debug Output Format

When debug mode is enabled, you'll see log entries for all memory writes including:
- Direct memory writes via REST API (`/memory` endpoint)
- Biquad filter writes via REST API (`/biquad` endpoint) 
- Register writes via REST API (`/register` endpoint)
- Memory writes from SigmaStudio via TCP server

Example debug output:
```
DEBUG: Memory write to address 0x1234 (4660), length: 20 bytes
DEBUG: Write data: 01 00 00 00 FF FE 12 34 ...
```

## Coverage

Debug logging captures all DSP memory writes regardless of the source:
- **REST API**: All endpoints that write to DSP memory (`/memory`, `/biquad`, `/register`)
- **TCP Server**: All writes from SigmaStudio or other TCP clients
- **Internal Operations**: Profile loading, filter application, etc.

## Available Options

You can also add other options in `/etc/default/sigmatcpserver`:

- `--debug` - Log all DSP memory writes
- `--verbose` - Enable verbose logging  
- `--alsa` - Enable ALSA volume control
- `--lgsoundsync` - Enable LG Sound Sync
- `--no-autoload-filters` - Disable filter autoloading

## Disabling Debug Mode

To disable debug logging:

1. Edit `/etc/default/sigmatcpserver`
2. Comment out or remove the DEBUG_OPTIONS line:
   ```bash
   #DEBUG_OPTIONS="--debug"
   ```
3. Restart the service:
   ```bash
   sudo systemctl restart sigmatcpserver
   ```