mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
If virtual_oss is not enabled when these rules run on startup, dmesg will show the following messages: Starting devd. virtual_oss_cmd: Could not open control device: /dev/vdsp.ctl: No such file or directory virtual_oss_cmd: Could not open control device: /dev/vdsp.ctl: No such file or directory Reported by: olce, Mark Millard <[email protected]> Sponsored by: The FreeBSD Foundation MFC after: 1 week
38 lines
993 B
Plaintext
38 lines
993 B
Plaintext
# Audio redirection
|
|
notify 0 {
|
|
match "system" "SND";
|
|
match "subsystem" "CONN";
|
|
match "type" "IN";
|
|
match "cdev" "dsp[0-9]+";
|
|
|
|
# Other audio servers or device switching commands can be used here
|
|
# instead of virtual_oss(8).
|
|
action "\
|
|
vd=/dev/$(sysrc -n virtual_oss_default_control_device); \
|
|
test -e ${vd} && /usr/sbin/virtual_oss_cmd ${vd} -R /dev/$cdev";
|
|
};
|
|
|
|
notify 0 {
|
|
match "system" "SND";
|
|
match "subsystem" "CONN";
|
|
match "type" "OUT";
|
|
match "cdev" "dsp[0-9]+";
|
|
|
|
# See comment above.
|
|
action "\
|
|
vd=/dev/$(sysrc -n virtual_oss_default_control_device); \
|
|
test -e ${vd} && /usr/sbin/virtual_oss_cmd ${vd} -P /dev/$cdev";
|
|
};
|
|
|
|
notify 0 {
|
|
match "system" "SND";
|
|
match "subsystem" "CONN";
|
|
match "type" "NODEV";
|
|
|
|
# No connected devices. Disable both recording and playback to avoid
|
|
# repeated virtual_oss error messages.
|
|
action "\
|
|
vd=/dev/$(sysrc -n virtual_oss_default_control_device); \
|
|
test -e ${vd} && /usr/sbin/virtual_oss_cmd ${vd} -f /dev/null";
|
|
};
|