Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157085244
D48435.id149754.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
D48435.id149754.diff
View Options
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
@@ -497,9 +497,7 @@
KASSERT(direction == c->direction, ("%s(): invalid direction %d/%d",
__func__, direction, c->direction));
- CHN_LOCK(c);
- newspd = c->speed;
- CHN_UNLOCK(c);
+ newspd = *vchanrate;
ret = sysctl_handle_int(oidp, &newspd, 0, req);
if (ret != 0 || req->newptr == NULL) {
@@ -530,7 +528,6 @@
ret = chn_reset(c, c->format, newspd);
if (ret == 0) {
- *vchanrate = c->speed;
if (restart != 0) {
CHN_FOREACH(ch, c, children.busy) {
CHN_LOCK(ch);
@@ -543,6 +540,7 @@
}
}
}
+ *vchanrate = c->speed;
CHN_UNLOCK(c);
@@ -605,15 +603,11 @@
KASSERT(direction == c->direction, ("%s(): invalid direction %d/%d",
__func__, direction, c->direction));
- CHN_LOCK(c);
-
bzero(fmtstr, sizeof(fmtstr));
- if (snd_afmt2str(c->format, fmtstr, sizeof(fmtstr)) != c->format)
+ if (snd_afmt2str(*vchanformat, fmtstr, sizeof(fmtstr)) != *vchanformat)
strlcpy(fmtstr, "<ERROR>", sizeof(fmtstr));
- CHN_UNLOCK(c);
-
ret = sysctl_handle_string(oidp, fmtstr, sizeof(fmtstr), req);
if (ret != 0 || req->newptr == NULL) {
PCM_RELEASE_QUICK(d);
@@ -637,7 +631,6 @@
ret = chn_reset(c, newfmt, c->speed);
if (ret == 0) {
- *vchanformat = c->format;
if (restart != 0) {
CHN_FOREACH(ch, c, children.busy) {
CHN_LOCK(ch);
@@ -650,6 +643,7 @@
}
}
}
+ *vchanformat = c->format;
CHN_UNLOCK(c);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 19, 8:47 AM (16 h, 32 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33303318
Default Alt Text
D48435.id149754.diff (1 KB)
Attached To
Mode
D48435: sound: Report actual vchanrate and vchanformat in sysctl
Attached
Detach File
Event Timeline
Log In to Comment