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-03-02 14:46:00 +0000
commit960ef72179bd11aad0fe5ec794317030913685a8 (patch)
tree3ab8edca5aaa92551290fde3aa94cb1956b35fb2
parentf35cb87a56b0fb21dc19546135bd68315ce17714 (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 (cherry picked from commit 06b466526a7fc35cc6fc5bf6f6269e7f3a0a7aea)
-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"