Muting only affects audio that is playing

From: Sean C. Farley <scf_at_FreeBSD.org>
Date: Wed, 10 Dec 2025 03:56:13 UTC
When I mute the mixer, it will mute any program currently playing audio 
to the device.  That is as expected.

However, this does not prevent audio from being played in other 
conditions:
- Restarting mpv.
- Pausing then unpausing mpv.
- Playing something in Firefox then skipping into the video.  Pausing
   and unpausing seems to work with Firefox.

I wish I could recall better, but I think it used to work at least prior 
to switching from the motherboard sound to a dedicated sound card.

Mute should stick, yes?  I have also tried pcm.mute=on, but it does not 
change anything.

My setup:
- FreeBSD 14.3-STABLE
- Using OSS for sound:
   - Firefox is compiled without any audio options so uses OSS.
   - mpv --audio-device=oss//dev/dsp4
- Sound BlasterX AE-5 Plus

dmesg:
hdacc1: <Creative CA0132 HDA CODEC> at cad 1 on hdac1
hdaa1: <Creative CA0132 Audio Function Group> at nid 1 on hdacc1
pcm4: <Creative CA0132 (Rear Analog)> at nid 11 and 18 on hdaa1
pcm5: <Creative CA0132 (Rear Digital)> at nid 12 on hdaa1
pcm6: <Creative CA0132 (Front Analog Headphones)> at nid 16 on hdaa1

$ mixer -f /dev/mixer vol.mute=on
vol.mute: off -> on
...

$ mixer -f /dev/mixer4
pcm4:mixer: <Creative CA0132 (Rear Analog)> on hdaa1 (play/rec) (default)
     vol       = 0.50:0.50     pbk mute
     bass      = 0.50:0.50     pbk
     treble    = 0.50:0.50     pbk
     pcm       = 0.20:0.20     pbk
     speaker   = 1.00:1.00     pbk
     mic       = 1.00:1.00     rec src
     rec       = 0.50:0.50     pbk
     ogain     = 1.00:1.00     pbk

Devices under /dev/sndstat:
pcm4: <Creative CA0132 (Rear Analog)> on hdaa1 (1p:0v/1r:0v) default
pcm5: <Creative CA0132 (Rear Digital)> on hdaa1 (1p:0v/0r:0v)
pcm6: <Creative CA0132 (Front Analog Headphones)> on hdaa1 (1p:0v/0r:0v)

$ sndctl -f /dev/dsp4
pcm4: <Creative CA0132 (Rear Analog)> on hdaa1 (play/rec)
     name                = pcm4
     desc                = Creative CA0132 (Rear Analog)
     status              = on hdaa1
     devnode             = dsp4
     from_user           = 0
     unit                = 4
     caps                = INPUT,MMAP,OUTPUT,REALTIME,TRIGGER
     bitperfect          = 0
     autoconv            = 1
     realtime            = 0
     play.format         = s16le:2.0
     play.rate           = 48000
     play.vchans         = 1
     play.min_rate       = 1
     play.max_rate       = 2016000
     play.min_chans      = 2
     play.max_chans      = 2
     play.formats        = s16le,s32le
     rec.rate            = 48000
     rec.format          = s16le:2.0
     rec.vchans          = 1
     rec.min_rate        = 1
     rec.max_rate        = 2016000
     rec.min_chans       = 2
     rec.max_chans       = 2
     rec.formats         = s16le,s32le

/boot/loader.conf:
snd_uaudio_load="YES"
hint.pcm.0.eq="1"
hint.pcm.1.eq="1"
hint.pcm.2.eq="1"
hint.pcm.3.eq="1"
hint.pcm.4.eq="1"
hint.pcm.5.eq="1"
hint.pcm.6.eq="1"
hint.pcm.7.eq="1"
hint.pcm.8.eq="1"

sysctl:
dev.pcm.4.%desc: Creative CA0132 (Rear Analog)
dev.pcm.4.%driver: pcm
dev.pcm.4.%iommu:
dev.pcm.4.%location: nid=11,18
dev.pcm.4.%parent: hdaa1
dev.pcm.4.%pnpinfo:
dev.pcm.4.bitperfect: 0
dev.pcm.4.buffersize: 65536
dev.pcm.4.eq: 1
dev.pcm.4.eq_preamp: +0.0dB
dev.pcm.4.mode: 7
dev.pcm.4.play.vchanformat: s16le:2.0
dev.pcm.4.play.vchanmode: fixed
dev.pcm.4.play.vchanrate: 48000
dev.pcm.4.play.vchans: 1
dev.pcm.4.rec.vchanformat: s16le:2.0
dev.pcm.4.rec.vchanmode: fixed
dev.pcm.4.rec.vchanrate: 48000
dev.pcm.4.rec.vchans: 1
hw.snd.basename_clone: 1
hw.snd.compat_linux_mmap: 0
hw.snd.default_auto: 1
hw.snd.default_unit: 4
hw.snd.feeder_eq_exact_rate: 0
hw.snd.feeder_eq_presets: PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.feeder_rate_polyphase_max: 183040
hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
hw.snd.feeder_rate_quality: 4
hw.snd.feeder_rate_round: 25
hw.snd.latency: 2
hw.snd.latency_profile: 1
hw.snd.report_soft_formats: 1
hw.snd.report_soft_matrix: 1
hw.snd.syncdelay: -1
hw.snd.timeout: 5
hw.snd.usefrags: 0
hw.snd.vchans_enable: 1
hw.snd.verbose: 1
hw.snd.vpc_0db: 100
hw.snd.vpc_autoreset: 1
hw.snd.vpc_mixer_bypass: 1
hw.snd.vpc_reset: 0

Sean
-- 
scf@FreeBSD.org