Page MenuHomeFreeBSD

D47461.1788253856.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D47461.1788253856.diff

diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -2330,9 +2330,11 @@
"prev=0x%08x\n", __func__, c->name, go,
c->trigger);
if (c->trigger != PCMTRIG_START) {
- c->trigger = go;
CHN_UNLOCK(c);
PCM_LOCK(d);
+ CHN_LOCK(c);
+ c->trigger = go;
+ CHN_UNLOCK(c);
CHN_INSERT_HEAD(d, c, channels.pcm.busy);
PCM_UNLOCK(d);
CHN_LOCK(c);
@@ -2347,9 +2349,11 @@
"prev=0x%08x\n", __func__, c->name, go,
c->trigger);
if (c->trigger == PCMTRIG_START) {
- c->trigger = go;
CHN_UNLOCK(c);
PCM_LOCK(d);
+ CHN_LOCK(c);
+ c->trigger = go;
+ CHN_UNLOCK(c);
CHN_REMOVE(d, c, channels.pcm.busy);
PCM_UNLOCK(d);
CHN_LOCK(c);
diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -146,20 +146,19 @@
int ret, otrigger;
info = data;
-
- if (!PCMTRIG_COMMON(go) || go == info->trigger)
- return (0);
-
c = info->channel;
p = c->parentchannel;
- otrigger = info->trigger;
- info->trigger = go;
CHN_LOCKASSERT(c);
+ if (!PCMTRIG_COMMON(go) || go == info->trigger)
+ return (0);
CHN_UNLOCK(c);
CHN_LOCK(p);
+ otrigger = info->trigger;
+ info->trigger = go;
+
switch (go) {
case PCMTRIG_START:
if (otrigger != PCMTRIG_START)

File Metadata

Mime Type
text/plain
Expires
Tue, Sep 1, 9:10 AM (13 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29496610
Default Alt Text
D47461.1788253856.diff (1 KB)

Event Timeline