Page MenuHomeFreeBSD

sound: Move sysctl and /dev/dspX creation to pcm_setstatus()
ClosedPublic

Authored by christos on Oct 28 2024, 10:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Feb 24, 11:49 PM
Unknown Object (File)
Sat, Feb 22, 2:26 PM
Unknown Object (File)
Sat, Feb 22, 1:41 PM
Unknown Object (File)
Sat, Feb 22, 1:40 PM
Unknown Object (File)
Feb 16 2025, 11:44 AM
Unknown Object (File)
Feb 4 2025, 9:12 AM
Unknown Object (File)
Feb 1 2025, 5:24 PM
Unknown Object (File)
Jan 26 2025, 12:24 PM
Subscribers

Details

Summary

Create the sysctl and /dev/dsp* nodes in pcm_setstatus(), which is
responsible for finalizing the device initialization, instead of doing
this in the middle of the initialization.

For the sysctl creation specifically, move them into pcm_sysinit(),
since this is where we create the rest of the sysctl nodes anyway.

A side effect of this change is, that we avoid the possibility of racing
in between pcm_register() and pcm_setstatus() by accessing /dev/dspX or
the sysctls within that window.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Diff Detail

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