Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151028258
D55670.id.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
D55670.id.diff
View Options
diff --git a/libexec/rc/rc.d/virtual_oss b/libexec/rc/rc.d/virtual_oss
--- a/libexec/rc/rc.d/virtual_oss
+++ b/libexec/rc/rc.d/virtual_oss
@@ -25,6 +25,10 @@
configs=
pidpath="/var/run/${name}"
default_unit=$(sysctl -n hw.snd.default_unit 2> /dev/null)
+
+# Default configuration's control device.
+: "${virtual_oss_default_control_device:="vdsp.ctl"}"
+
virtual_oss_default_args="\
-S \
-C 2 \
@@ -35,7 +39,7 @@
-i 8 \
-f /dev/dsp${default_unit} \
-d dsp \
- -t vdsp.ctl"
+ -t ${virtual_oss_default_control_device}"
# Set to NO by default. Set it to "YES" to enable virtual_oss.
: "${virtual_oss_enable:="NO"}"
diff --git a/sbin/devd/snd.conf b/sbin/devd/snd.conf
--- a/sbin/devd/snd.conf
+++ b/sbin/devd/snd.conf
@@ -7,12 +7,8 @@
# Other audio servers or device switching commands can be used here
# instead of virtual_oss(8).
- #
- # FIXME: We are hardcoding /dev/vdsp.ctl here, simply because it is a
- # common virtual_oss control device name. Until we find a proper way to
- # define control devices here, /dev/vdsp.ctl can be changed to the
- # control device of choice.
- action "/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -R /dev/$cdev";
+ action "/usr/sbin/virtual_oss_cmd \
+ /dev/$(sysrc virtual_oss_default_control_device) -R /dev/$cdev";
};
notify 0 {
@@ -22,7 +18,8 @@
match "cdev" "dsp[0-9]+";
# See comment above.
- action "/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -P /dev/$cdev";
+ action "/usr/sbin/virtual_oss_cmd \
+ /dev/$(sysrc virtual_oss_default_control_device) -P /dev/$cdev";
};
notify 0 {
@@ -32,5 +29,6 @@
# No connected devices. Disable both recording and playback to avoid
# repeated virtual_oss error messages.
- action "/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -f /dev/null";
+ action "/usr/sbin/virtual_oss_cmd \
+ /dev/$(sysrc virtual_oss_default_control_device) -f /dev/null";
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 1:14 PM (10 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30971821
Default Alt Text
D55670.id.diff (1 KB)
Attached To
Mode
D55670: virtual_oss: Introduce virtual_oss_default_control_device rc variable
Attached
Detach File
Event Timeline
Log In to Comment