diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-12-18 10:02:41 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-02-23 16:48:18 +0100 |
commit | 70372a7566b5e552dbe48abdac08c275081d8558 (patch) | |
tree | 5f83c45b918bed80633bf9b3dbbdc123c3b6bb60 /sound/core | |
parent | dec84316dd53c90e93b4ee849483bd4bd1e9a585 (diff) | |
download | linux-70372a7566b5e552dbe48abdac08c275081d8558.tar.bz2 |
ALSA: pcm: Don't leave PREPARED state after draining
When a PCM draining is performed to an empty stream that has been
already in PREPARED state, the current code just ignores and leaves as
it is, although the drain is supposed to set all such streams to SETUP
state. This patch covers that overlooked case.
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/pcm_native.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index b03a638b420c..279e24f61305 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -1552,6 +1552,8 @@ static int snd_pcm_do_drain_init(struct snd_pcm_substream *substream, int state) if (! snd_pcm_playback_empty(substream)) { snd_pcm_do_start(substream, SNDRV_PCM_STATE_DRAINING); snd_pcm_post_start(substream, SNDRV_PCM_STATE_DRAINING); + } else { + runtime->status->state = SNDRV_PCM_STATE_SETUP; } break; case SNDRV_PCM_STATE_RUNNING: |