aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Thébault <quentin.thebault@defenso.fr>2026-02-23 12:33:33 +0000
committerChristos Margiolis <christos@FreeBSD.org>2026-02-23 12:33:33 +0000
commit06b466526a7fc35cc6fc5bf6f6269e7f3a0a7aea (patch)
tree4a3d63ae32e73ce870971ecffe99ad8aae4bf543
parent0076f6d1ad05e80d372bef1caf15615cd639fb5c (diff)
virtual_oss: use hw.snd.default_unit by default
Reviewed by: christos MFC after: 1 week Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr> Sponsored by: Defenso PR: 293130 Pull Request: https://github.com/freebsd/freebsd-src/pull/2043
-rw-r--r--libexec/rc/rc.d/virtual_oss3
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/rc/rc.d/virtual_oss b/libexec/rc/rc.d/virtual_oss
index b8f1e7620582..42353a6c1520 100644
--- a/libexec/rc/rc.d/virtual_oss
+++ b/libexec/rc/rc.d/virtual_oss
@@ -24,6 +24,7 @@ required_modules="cuse"
configs=
pidpath="/var/run/${name}"
+default_unit=$(sysctl -n hw.snd.default_unit)
virtual_oss_default_args="\
-S \
-C 2 \
@@ -32,7 +33,7 @@ virtual_oss_default_args="\
-b 24 \
-s 8ms \
-i 8 \
- -f /dev/dsp \
+ -f /dev/dsp${default_unit} \
-d dsp \
-t vdsp.ctl"