xref: /src/sbin/devd/snd.conf (revision 428517a7712e44b58e0687fbee4037a8ebe5bf5a)
1# Audio redirection
2notify 0 {
3	match "system"		"SND";
4	match "subsystem"	"CONN";
5	match "type"		"IN";
6	match "cdev"		"dsp[0-9]+";
7
8	# Other audio servers or device switching commands can be used here
9	# instead of virtual_oss(8).
10	#
11	# FIXME: We are hardcoding /dev/vdsp.ctl here, simply because it is a
12	# common virtual_oss control device name. Until we find a proper way to
13	# define control devices here, /dev/vdsp.ctl can be changed to the
14	# control device of choice.
15	action			"/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -R /dev/$cdev";
16};
17
18notify 0 {
19	match "system"		"SND";
20	match "subsystem"	"CONN";
21	match "type"		"OUT";
22	match "cdev"		"dsp[0-9]+";
23
24	# See comment above.
25	action			"/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -P /dev/$cdev";
26};
27
28notify 0 {
29	match "system"		"SND";
30	match "subsystem"	"CONN";
31	match "type"		"NODEV";
32
33	# No connected devices. Disable both recording and playback to avoid
34	# repeated virtual_oss error messages.
35	action			"/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -f /dev/null";
36};
37