/dev/dspN detection in PulseAudio

Myles C. Maxfield myles.maxfield at gmail.com
Mon Mar 18 04:39:01 UTC 2013


Hello,
After upgrading to the latest stable version of FreeBSD (9.1), I noticed
that some of my /dev/dspN devices had stopped showing up in PulseAudio. I
took a look at the code for the detect_oss() function in
src/modules/module-detect.c, and found that PulseAudio was discovering dsp
devices by parsing /dev/sndstat. I recompiled pulseaudio with debugging
symbols, and stepped through execution of the function. It turns out that
when PulseAudio opens /dev/sndstat, it reads an empty line in the middle of
the file, which was triggering the early-out of the loop (lines 151-152).
If I removed those two early-out lines, then all my /dev/dspN devices are
correctly recognized and everything works great. There is one caveat,
however: When I cat /dev/sndstat from the command-line, there is no empty
line in the middle of the file.

At this point, I'm wondering if I should submit a patch to the PulseAudio
port
(/ports/head/audio/pulseaudio/files/patch-src_modules_module-detect.c), or
if I should keep digging into why /dev/sndstat has an empty line in the
middle of the file (but only when the file is read by PulseAudio). Does
anyone have any suggestions on what I should do now?

Thanks,
Myles


More information about the freebsd-ports-bugs mailing list