Page MenuHomeFreeBSD

sound: Call DSP_REGISTERED before PCM_DETACHING
ClosedPublic

Authored by christos on Oct 19 2024, 4:01 PM.
Tags
None
Referenced Files
F174215722: D47195.diff
Thu, Oct 1, 10:34 AM
F174181865: D47195.id145156.diff
Thu, Oct 1, 4:58 AM
Unknown Object (File)
Tue, Sep 22, 12:19 AM
Unknown Object (File)
Mon, Sep 21, 12:05 AM
Unknown Object (File)
Sat, Sep 19, 4:34 AM
Unknown Object (File)
Sat, Sep 19, 2:36 AM
Unknown Object (File)
Sat, Sep 19, 2:33 AM
Unknown Object (File)
Sat, Sep 19, 2:32 AM
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