Page MenuHomeFreeBSD

sound: Standardize mixer_init() call order
Needs ReviewPublic

Authored by christos on Fri, Aug 21, 12:41 PM.
Tags
None
Referenced Files
F167493172: D59069.id184635.diff
Sat, Aug 22, 6:25 AM
F167490403: D59069.id.diff
Sat, Aug 22, 5:44 AM
F167487826: D59069.diff
Sat, Aug 22, 5:01 AM
Unknown Object (File)
Fri, Aug 21, 2:31 PM
Unknown Object (File)
Fri, Aug 21, 1:10 PM
Unknown Object (File)
Fri, Aug 21, 1:07 PM
Unknown Object (File)
Fri, Aug 21, 12:57 PM
Unknown Object (File)
Fri, Aug 21, 12:57 PM
Subscribers

Details

Summary

Device drivers call mixer_init() in a non-standard order - some before
pcm_init(), and some after pcm_register(). However, both approaches are
potentially risky, and logically weak, since pcm_register() is supposed
to be the function that finalizes sound(4) attach.

Standardize the call ordering by moving all mixer_init() calls after
pcm_init(). This is also necessary for a follow-up patch, which expects
pcm_init() to have run first and initialized the PCM lock.

Sponsored by: The FreeBSD Foundation
MFC after: 1 month

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75934
Build 72817: arc lint + arc unit