aboutsummaryrefslogtreecommitdiff
path: root/sbin/devd
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/devd')
-rw-r--r--sbin/devd/Makefile5
-rw-r--r--sbin/devd/devd.conf.516
-rw-r--r--sbin/devd/moused.conf9
-rw-r--r--sbin/devd/snd.conf26
4 files changed, 56 insertions, 0 deletions
diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile
index 5d5721d16884..553aecf4ee88 100644
--- a/sbin/devd/Makefile
+++ b/sbin/devd/Makefile
@@ -32,6 +32,11 @@ CONSOLEDIR= ${DEVDDIR}
CONSOLE+= moused.conf syscons.conf
CONSOLEPACKAGE= console-tools
+CONFGROUPS+= SND
+SNDDIR= ${DEVDDIR}
+SND= snd.conf
+SNDPACKAGE= sound
+
.if ${MK_BLUETOOTH} != "no"
CONFGROUPS+= BLUETOOTH
BLUETOOTHDIR= ${DEVDDIR}
diff --git a/sbin/devd/devd.conf.5 b/sbin/devd/devd.conf.5
index baf4b9d3a183..8df3e910e076 100644
--- a/sbin/devd/devd.conf.5
+++ b/sbin/devd/devd.conf.5
@@ -652,6 +652,22 @@ and
for details.
.El
.Pp
+.Bl -column "System" "Subsystem" "1234567" -compact
+.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description"
+.It Li SND Ta Ta Ta
+Events related to the
+.Xr sound 4
+driver.
+.It Li SND Ta Li CONN Ta Li IN Ta
+Connected input device specified in
+.Pa cdev
+variable.
+.It Li SND Ta Li CONN Ta Li OUT Ta
+Connected output device specified in
+.Pa cdev
+variable.
+.El
+.Pp
.\"
.\" End of tables
.\"
diff --git a/sbin/devd/moused.conf b/sbin/devd/moused.conf
index ed1060ffdf2e..8821c2bb8375 100644
--- a/sbin/devd/moused.conf
+++ b/sbin/devd/moused.conf
@@ -33,3 +33,12 @@ notify 100 {
action "service moused quietstop $cdev";
};
+
+notify 100 {
+ match "system" "DEVFS";
+ match "subsystem" "CDEV";
+ match "type" "CREATE";
+ match "cdev" "input/event[0-9]+";
+
+ action "service moused quietstart $cdev";
+};
diff --git a/sbin/devd/snd.conf b/sbin/devd/snd.conf
new file mode 100644
index 000000000000..a45f427f6c79
--- /dev/null
+++ b/sbin/devd/snd.conf
@@ -0,0 +1,26 @@
+# 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).
+ #
+ # FIXME: We are hardcoding /dev/vdsp.ctl here, simply because it is a
+ # common virtual_oss control device name. Until we find a proper way to
+ # define control devices here, /dev/vdsp.ctl can be changed to the
+ # control device of choice.
+ action "/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -R /dev/$cdev";
+};
+
+notify 0 {
+ match "system" "SND";
+ match "subsystem" "CONN";
+ match "type" "OUT";
+ match "cdev" "dsp[0-9]+";
+
+ # See comment above.
+ action "/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -P /dev/$cdev";
+};