The branch stable/15 has been updated by christos:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=960ef72179bd11aad0fe5ec794317030913685a8

commit 960ef72179bd11aad0fe5ec794317030913685a8
Author:     Quentin Thébault <[email protected]>
AuthorDate: 2026-02-23 12:33:33 +0000
Commit:     Christos Margiolis <[email protected]>
CommitDate: 2026-03-02 14:46:00 +0000

    virtual_oss: use hw.snd.default_unit by default
    
    Reviewed by:    christos
    MFC after:      1 week
    Signed-off-by:  Quentin Thébault <[email protected]>
    Sponsored by:   Defenso
    PR:             293130
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/2043
    (cherry picked from commit 06b466526a7fc35cc6fc5bf6f6269e7f3a0a7aea)
---
 libexec/rc/rc.d/virtual_oss | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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"
 

Reply via email to