[alsa-devel] [PATCH v2 17/27] ALSA: pcm: Check PCM state by a common helper function