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, Dec 22, 7:13 PM
Unknown Object (File)
Sun, Dec 22, 7:12 PM
Unknown Object (File)
Fri, Dec 13, 1:19 PM
Unknown Object (File)
Thu, Dec 5, 5:10 AM
Unknown Object (File)
Nov 22 2024, 3:49 PM
Unknown Object (File)
Nov 1 2024, 7:21 AM
Unknown Object (File)
Oct 31 2024, 7:17 PM
Unknown Object (File)
Oct 31 2024, 2:09 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 60090
Build 56974: arc lint + arc unit

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