Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177895886
D47322.1795539091.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D47322.1795539091.diff
View Options
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -316,7 +316,7 @@
else if (snd_unit_auto == 1)
snd_unit = pcm_best_unit(snd_unit);
- return (0);
+ return (dsp_make_dev(dev));
}
uint32_t
@@ -433,6 +433,15 @@
mode = pcm_mode_init(d);
+ sysctl_ctx_init(&d->play_sysctl_ctx);
+ d->play_sysctl_tree = SYSCTL_ADD_NODE(&d->play_sysctl_ctx,
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "play",
+ CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "playback channels node");
+ sysctl_ctx_init(&d->rec_sysctl_ctx);
+ d->rec_sysctl_tree = SYSCTL_ADD_NODE(&d->rec_sysctl_ctx,
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "rec",
+ CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "recording channels node");
+
/* XXX: a user should be able to set this with a control tool, the
sysadmin then needs min+max sysctls for this */
SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
@@ -497,21 +506,12 @@
if ((numplay == 0 || numrec == 0) && numplay != numrec)
d->flags |= SD_F_SIMPLEX;
- sysctl_ctx_init(&d->play_sysctl_ctx);
- d->play_sysctl_tree = SYSCTL_ADD_NODE(&d->play_sysctl_ctx,
- SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "play",
- CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "playback channels node");
- sysctl_ctx_init(&d->rec_sysctl_ctx);
- d->rec_sysctl_tree = SYSCTL_ADD_NODE(&d->rec_sysctl_ctx,
- SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "rec",
- CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "recording channels node");
-
if (numplay > 0 || numrec > 0)
d->flags |= SD_F_AUTOVCHAN;
sndstat_register(dev, d->status);
- return (dsp_make_dev(dev));
+ return (0);
}
int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 24, 4:51 PM (2 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41933330
Default Alt Text
D47322.1795539091.diff (1 KB)
Attached To
Mode
D47322: sound: Move sysctl and /dev/dspX creation to pcm_setstatus()
Attached
Detach File
Event Timeline