Page MenuHomeFreeBSD

sound: Call DSP_REGISTERED before PCM_DETACHING
ClosedPublic

Authored by christos on Oct 19 2024, 4:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 30, 9:32 AM
Unknown Object (File)
Fri, Nov 28, 7:02 PM
Unknown Object (File)
Nov 16 2025, 9:12 PM
Unknown Object (File)
Nov 6 2025, 1:55 PM
Unknown Object (File)
Nov 1 2025, 9:01 PM
Unknown Object (File)
Nov 1 2025, 5:45 AM
Unknown Object (File)
Oct 28 2025, 2:49 PM
Unknown Object (File)
Oct 23 2025, 10:02 PM
Subscribers

Details

Summary

DSP_REGISTERED first checks if the softc is not null, through
PCM_REGISTERED, which in turn calls PCM_ALIVE, whereas PCM_DETACHING
accesses the softc flags directly.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days

Diff Detail

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

Event Timeline

Use DSP_REGISTERED in dsp_close() as well.

sys/dev/sound/pcm/dsp.c
304

I suppose it doesn't matter, but is the change from PCM_REGISTERED to DSP_REGISTERED intentional?

sys/dev/sound/pcm/dsp.c
304

DSP_REGISTERED includes more checks, so I think it's better to use it and follow the same scheme as in the other functions.

This revision is now accepted and ready to land.Oct 21 2024, 2:15 PM