Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163446273
D58371.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58371.diff
View Options
Index: sys/dev/sound/pci/hdspe-pcm.c
===================================================================
--- sys/dev/sound/pci/hdspe-pcm.c
+++ sys/dev/sound/pci/hdspe-pcm.c
@@ -825,6 +825,8 @@
device_printf(scp->dev, "hdspechan_setspeed(%d)\n", speed);
#endif
+ mtx_lock(&sc->lock);
+
if (hdspe_running(sc) == 1)
goto end;
@@ -875,8 +877,10 @@
sc->speed = hr->speed;
end:
+ speed = sc->speed;
+ mtx_unlock(&sc->lock);
- return (sc->speed);
+ return (speed);
}
static uint32_t
@@ -898,6 +902,8 @@
device_printf(scp->dev, "hdspechan_setblocksize(%d)\n", blocksize);
#endif
+ mtx_lock(&sc->lock);
+
if (hdspe_running(sc) == 1)
goto end;
@@ -928,7 +934,6 @@
}
}
- mtx_lock(&sc->lock);
sc->ctrl_register &= ~HDSPE_LAT_MASK;
sc->ctrl_register |= hdspe_encode_latency(hl->n);
hdspe_write_4(sc, HDSPE_CONTROL_REG, sc->ctrl_register);
@@ -936,13 +941,17 @@
mtx_unlock(&sc->lock);
#if 0
- device_printf(scp->dev, "New period=%d\n", sc->period);
+ device_printf(scp->dev, "New period=%d\n", hl->period);
#endif
+ /* sndbuf_resize() may sleep. */
sndbuf_resize(ch->buffer,
- (HDSPE_CHANBUF_SIZE * AFMT_CHANNEL(ch->format)) / (sc->period * 4),
- (sc->period * 4));
+ (HDSPE_CHANBUF_SIZE * AFMT_CHANNEL(ch->format)) / (hl->period * 4),
+ (hl->period * 4));
+
+ return (ch->buffer->blksz);
end:
+ mtx_unlock(&sc->lock);
return (ch->buffer->blksz);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 24, 6:53 AM (6 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35409488
Default Alt Text
D58371.diff (1 KB)
Attached To
Mode
D58371: snd_hdspe: Serialize rate and latency updates
Attached
Detach File
Event Timeline
Log In to Comment