Solved FreeBSD 15.1: Bit-perfect MPD playback blocks Firefox audio

Hi everyone,

I'm using FreeBSD 15.1 with a Realtek ALC897 (pcm0), a Fosi Audio amplifier, and Polk speakers.

MPD/ncmpcpp works well with these settings:

Code:
dev.pcm.0.play.vchans=0

dev.pcm.0.bitperfect=1

MPD outputs directly to /dev/dsp0 using OSS.

The problem is that when MPD is playing, Firefox has no sound or bad sound. I also need audio from Zoom and Emacs notifications.

I've confirmed that applications can run into EBUSY when trying to open/dev/dsp0.

I tried disabling bit-perfect mode and enabling virtual channels, but haven't found a satisfactory solution.

Is there a way to preserve bit-perfect playback in MPD while allowing Firefox, Zoom, and Emacs to play audio simultaneously through pcm0? Or is software mixing unavoidable?

I'm particularly interested in how FreeBSD 15.1 handles virtual channels and whether there's a recommended configuration for this situation.

Thanks!
 
Thanks for the explanation. I did some more testing on FreeBSD 15.1.

My original settings were:

Code:
dev.pcm.0.bitperfect=1
dev.pcm.0.play.vchans=0

I changed them to:

Code:
dev.pcm.0.bitperfect=1
dev.pcm.0.play.vchans=1

With both bitperfect and virtual channels enabled, MPD, Firefox, and Emacs notification sounds now work simultaneously through pcm0.

I tested all three, and the sound is good.

So, at least on my Realtek ALC897, enabling virtual channels while keeping bitperfect=1 appears to solve the problem.

Thanks for the help!
 
Back
Top