diff options
| author | Christos Margiolis <christos@FreeBSD.org> | 2026-04-16 14:51:02 +0000 |
|---|---|---|
| committer | Christos Margiolis <christos@FreeBSD.org> | 2026-04-16 14:51:02 +0000 |
| commit | 70e27ecba51892cbe4cc94bbf785c6dd261dfd57 (patch) | |
| tree | abcaf352bb72518d2f602a4415598ded46f13877 /libexec/rc | |
| parent | aa2d89cb4263f5d638b150efb4a2e6adab4ee9d6 (diff) | |
virtual_oss: Introduce virtual_oss_default_control_device rc variable
The -t option gives the user the ability to create a control device for
a given virtual_oss(8) instance, so that the instance's configuration
can be manipulated during runtime with virtual_oss_cmd(8). As is
expected, the control device's name is not known, since it is specified
by the user.
This patch introduces a virtual_oss_default_control_device rc variable,
which defaults to "vdsp.ctl". The goal of this is that third-party
programs and scripts can access the control device of the default
virtual_oss(8) configuration without guessing. This is especially useful
for sbin/devd/snd.conf which deals with hot-swapping sound devices using
virtual_oss(8).
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55670
Diffstat (limited to 'libexec/rc')
| -rw-r--r-- | libexec/rc/rc.d/virtual_oss | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libexec/rc/rc.d/virtual_oss b/libexec/rc/rc.d/virtual_oss index d55b51463442..a25abf256f55 100644 --- a/libexec/rc/rc.d/virtual_oss +++ b/libexec/rc/rc.d/virtual_oss @@ -25,6 +25,10 @@ required_modules="cuse" 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 @@ virtual_oss_default_args="\ -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"}" |
