Page MenuHomeFreeBSD

sound: Retire pcm_veto_load
ClosedPublic

Authored by christos on Oct 25 2024, 12:06 PM.
Tags
None
Referenced Files
F142226229: D47280.diff
Sat, Jan 17, 12:22 PM
Unknown Object (File)
Nov 26 2025, 2:18 PM
Unknown Object (File)
Nov 10 2025, 10:43 PM
Unknown Object (File)
Nov 6 2025, 1:19 PM
Unknown Object (File)
Oct 29 2025, 12:31 PM
Unknown Object (File)
Oct 29 2025, 12:31 PM
Unknown Object (File)
Oct 29 2025, 12:28 PM
Unknown Object (File)
Oct 29 2025, 12:28 PM
Subscribers

Details

Summary

pcm_veto_load is used to prevent pcm_register() from running if the root
feeder has not been registered yet. However, feeder_register_root() is a
SYSINIT.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days

Diff Detail

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

Event Timeline

Also note that pcm_register() does not really touch the root feeder in the first place.

sys/dev/sound/pcm/feeder.c
65

Could the M_WAITOK be a problem (i.e we sleep here and pcm_register() continues normally)?

pcm_veto_load is used to prevent pcm_register() from running if the root feeder has not been registered yet. However, feeder_register_root() is a SYSINIT.

So are the functions which call pcm_register(), albeit indirectly. The point is probably to make sure that feeder_register_root() runs first. See the use of SI_ORDER_FIRST in the SYSINIT definition.

Also note that pcm_register() does not really touch the root feeder in the first place.

It doesn't, but functions like pcm_addchan(), called after pcm_register(), do.

I'd at least add a comment above the SYSINIT definition explaining why this one comes first.

This revision is now accepted and ready to land.Oct 29 2024, 12:02 AM
This revision was automatically updated to reflect the committed changes.