projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5ab94e
)
ALSA: PCM: Allow resume only for suspended streams
author
Takashi Iwai
<tiwai@suse.de>
Mon, 24 Jun 2024 12:54:34 +0000
(14:54 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Tue, 25 Jun 2024 09:53:35 +0000
(11:53 +0200)
snd_pcm_resume() should bail out if the stream isn't in a suspended
state. Otherwise it'd allow doubly resume.
Link:
https://patch.msgid.link/20240624125443.27808-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_native.c
patch
|
blob
|
history
diff --git
a/sound/core/pcm_native.c
b/sound/core/pcm_native.c
index
521ba56
..
c152ccf
100644
(file)
--- a/
sound/core/pcm_native.c
+++ b/
sound/core/pcm_native.c
@@
-1775,6
+1775,8
@@
static int snd_pcm_pre_resume(struct snd_pcm_substream *substream,
snd_pcm_state_t state)
{
struct snd_pcm_runtime *runtime = substream->runtime;
+ if (runtime->state != SNDRV_PCM_STATE_SUSPENDED)
+ return -EBADFD;
if (!(runtime->info & SNDRV_PCM_INFO_RESUME))
return -ENOSYS;
runtime->trigger_master = substream;