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)
Mon, Apr 27, 1:10 PM
Unknown Object (File)
Sat, Apr 25, 8:12 AM
Unknown Object (File)
Fri, Apr 24, 9:10 PM
Unknown Object (File)
Sun, Apr 19, 8:52 PM
Unknown Object (File)
Sun, Apr 12, 5:23 PM
Unknown Object (File)
Sat, Apr 11, 12:08 PM
Unknown Object (File)
Fri, Apr 10, 3:55 PM
Unknown Object (File)
Thu, Apr 9, 10:29 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