There is an easily reproducable case (see modification in tests), where
pcm_unregister() will clear SD_F_REGISTERED and start killing channels
(pcm_killchans()), right before dsp_close() acquires the PCM lock, which
will can lead to a panic in dsp_close().
The fix is rather hacky and ugly, but it does the job for now.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week