Page MenuHomeFreeBSD

sound: Retire snd_mixer->busy
ClosedPublic

Authored by christos on Nov 21 2025, 5:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 1, 7:24 AM
Unknown Object (File)
Dec 21 2025, 2:58 AM
Unknown Object (File)
Dec 20 2025, 1:16 AM
Unknown Object (File)
Dec 8 2025, 8:13 AM
Unknown Object (File)
Dec 4 2025, 7:34 AM
Unknown Object (File)
Dec 3 2025, 6:56 AM
Unknown Object (File)
Nov 30 2025, 2:28 PM
Unknown Object (File)
Nov 29 2025, 1:24 PM
Subscribers

Details

Summary

Does not really serve any real purpose. It gets set on mixer_open() and
unset on mixer_close(), so it essentially tells us whether the mixer is
open or not.

mixer_close() uses it to return EBADF in case the mixer is not busied,
as in, the mixer has not been open()'d yet. This is redundant. The other
place where this is used is to decide whether to serve an ioctl issued
by userland, in which case it won't if, again, the mixer has not been
busied (i.e., opened). Again, seems redundant.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj added inline comments.
sys/dev/sound/pci/es137x.c
1543

Was the busy state just getting leaked here?

This revision is now accepted and ready to land.Nov 28 2025, 2:03 PM
sys/dev/sound/pci/es137x.c
1543

I don't think so. The busy state was set in mixer_open() (i.e., open(2) for /dev/mixer), and cleared in mixer_close().

This revision was automatically updated to reflect the committed changes.