Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132904263
D48335.id151462.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
D48335.id151462.diff
View Options
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -238,8 +238,8 @@
struct mtx *lock;
struct cdev *mixer_dev;
struct cdev *dsp_dev;
- uint32_t pvchanrate, pvchanformat;
- uint32_t rvchanrate, rvchanformat;
+ uint32_t pvchanrate, pvchanformat, pvchanmode;
+ uint32_t rvchanrate, rvchanformat, rvchanmode;
int32_t eqpreamp;
struct sysctl_ctx_list play_sysctl_ctx, rec_sysctl_ctx;
struct sysctl_oid *play_sysctl_tree, *rec_sysctl_tree;
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
@@ -356,7 +356,7 @@
struct snddev_info *d;
struct pcm_channel *c;
uint32_t dflags;
- int direction, ret;
+ int *vchanmode, direction, ret;
char dtype[16];
d = devclass_get_softc(pcm_devclass, VCHAN_SYSCTL_UNIT(oidp->oid_arg1));
@@ -373,6 +373,7 @@
return (ENODEV);
}
direction = PCMDIR_PLAY;
+ vchanmode = &d->pvchanmode;
break;
case VCHAN_REC:
if ((d->flags & SD_F_RVCHANS) == 0) {
@@ -380,6 +381,7 @@
return (ENODEV);
}
direction = PCMDIR_REC;
+ vchanmode = &d->rvchanmode;
break;
default:
PCM_UNLOCK(d);
@@ -402,14 +404,12 @@
KASSERT(direction == c->direction, ("%s(): invalid direction %d/%d",
__func__, direction, c->direction));
- CHN_LOCK(c);
- if (c->flags & CHN_F_VCHAN_PASSTHROUGH)
+ if (*vchanmode & CHN_F_VCHAN_PASSTHROUGH)
strlcpy(dtype, "passthrough", sizeof(dtype));
- else if (c->flags & CHN_F_VCHAN_ADAPTIVE)
+ else if (*vchanmode & CHN_F_VCHAN_ADAPTIVE)
strlcpy(dtype, "adaptive", sizeof(dtype));
else
strlcpy(dtype, "fixed", sizeof(dtype));
- CHN_UNLOCK(c);
ret = sysctl_handle_string(oidp, dtype, sizeof(dtype), req);
if (ret == 0 && req->newptr != NULL) {
@@ -436,6 +436,7 @@
c->flags &= ~CHN_F_VCHAN_DYNAMIC;
c->flags |= dflags;
CHN_UNLOCK(c);
+ *vchanmode = dflags;
}
PCM_RELEASE_QUICK(d);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 22, 1:12 AM (3 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24024285
Default Alt Text
D48335.id151462.diff (1 KB)
Attached To
Mode
D48335: sound: Cache vchanmode
Attached
Detach File
Event Timeline
Log In to Comment