ALSA: pcm: Allow dropping stream directly after resume
authorTakashi Iwai <tiwai@suse.de>
Tue, 24 May 2016 13:08:31 +0000 (15:08 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 14 Jun 2017 05:43:52 +0000 (07:43 +0200)
commit4b95ff781e30c50298257d22a2c3743b2e5739be
tree348558ed57d9e59d581bb9af5b27eb98c38dd3b5
parent68b4acd322494444803a3f49884ae889c8ec6689
ALSA: pcm: Allow dropping stream directly after resume

So far, the PCM core refuses DROP ioctl when the stream in the
suspended state.  This was basically to avoid the invalid state change
*during* the suspend.  But since we protect the power change globally
in the common PCM ioctl caller side, it's guaranteed that
snd_pcm_drop() is called at the right power state.  So we can assume
that the drop of stream is safe immediately after SUSPENDED state.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_native.c