diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-04-13 11:09:40 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-04-13 11:09:46 +0300 |
commit | 99fff44fe339b21c6a4ddd6c1239e587dd439cd3 (patch) | |
tree | 132e59f06c467786f21b9b67a5a031936850b384 /sound/core/pcm_native.c | |
parent | 6b580f523172f2c738b661069a57c23c74a75f88 (diff) | |
parent | 183ab39eb0ea9879bb68422a83e65f750f3192f0 (diff) | |
download | linux-99fff44fe339b21c6a4ddd6c1239e587dd439cd3.tar.xz |
Merge branch 'for-linus' into for-next
Back-merge the 5.1 devel branch for the further HD-audio development.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index f731f904e8cc..1d8452912b14 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -1445,8 +1445,15 @@ static int snd_pcm_pause(struct snd_pcm_substream *substream, int push) static int snd_pcm_pre_suspend(struct snd_pcm_substream *substream, int state) { struct snd_pcm_runtime *runtime = substream->runtime; - if (runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) + switch (runtime->status->state) { + case SNDRV_PCM_STATE_SUSPENDED: return -EBUSY; + /* unresumable PCM state; return -EBUSY for skipping suspend */ + case SNDRV_PCM_STATE_OPEN: + case SNDRV_PCM_STATE_SETUP: + case SNDRV_PCM_STATE_DISCONNECTED: + return -EBUSY; + } runtime->trigger_master = substream; return 0; } |