Merge "audio: Fix handling of a thread exit command with a bad cookie" into main