AlexxIT/go2rtc · error
alsa: unknown path
Error message
alsa: unknown path: %s
What it means
Open determined the device path is neither a playback ('p' suffix) nor capture ('c' suffix) ALSA node, so it cannot choose a producer type. The device was opened and format-checked successfully but is closed again and rejected; the input path at fault is included in the message.
Solutions
- Use a standard ALSA path ending with the direction letter, e.g. hw:0,0p for playback or hw:0,0c for capture
- Verify the device name with aplay -l / arecord -l
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/alsa/open_linux.go:43 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of AlexxIT/go2rtc@c245815e75 (2026-09-07).
Data as JSON: /api/errors/6c98111801f1c3ff.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/alsa/open_linux.go:43
dev, err := device.Open(path)
if err != nil {
return nil, err
}
if !dev.CheckFormat(device.SNDRV_PCM_FORMAT_S16_LE) {
_ = dev.Close()
return nil, errors.New("alsa: format S16LE not supported")
}
switch path[len(path)-1] {
case 'p': // playback
return newPlayback(dev)
case 'c': // capture
return newCapture(dev)
}
_ = dev.Close()
return nil, fmt.Errorf("alsa: unknown path: %s", path)
}
View on GitHub (pinned to c245815e75)