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)
Thu, Jun 18, 10:38 PM
Unknown Object (File)
May 25 2026, 1:21 PM
Unknown Object (File)
May 24 2026, 7:58 PM
Unknown Object (File)
May 22 2026, 3:37 PM
Unknown Object (File)
May 22 2026, 3:24 PM
Unknown Object (File)
May 22 2026, 10:40 AM
Unknown Object (File)
May 20 2026, 2:28 PM
Unknown Object (File)
May 6 2026, 11:01 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 60089
Build 56973: 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