I know your symptom, and can tell what seems to fix it for me -no doubt there are diffs between our systems, so let's start with a sketch of mine. I listen thru low-impedance headphones needing an amp, and within the amp is an external sound card, call it EXTcard.
When I have your symptom (almost always after calling up Pianoteq) I get up Options>Devices. Audio device type: is ASIO, Device: is ASIO4ALL v2, Active output channels: is EXTcard 1 & 2 (both greyed out and neither is checked). Clicking Test does nothing.
Clicking Show this device's control panel gets THAT up. Bottom of the WDM Device List is EXTcard, unselected. Selecting it turns it blue, withdrawing the cursor then returning it to touch the selection fetches up a tooltip message like "Device unavailable. In use by another application?"
What changes this message for me, virtually without fail, is to power down the headphone amp then switch it on again. Observation shows this powers off EXTcard too (natch, but nice to eyeball it, because it opens up the idea that on repowering it asks the system where it sits inside it; something must account for the change it brings).
For now, on touching the blue selection the message is "Status active" or "Status available" according as MIDI is happening or not. Plus now, no greyouts, all that should be checked is, Test works, and Pianoteq is aloud.
Hope that's a help. BTW, the ASIO4ALL is v2.11 Beta1.