Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162299579
D55531.id172772.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55531.id172772.diff
View Options
diff --git a/sbin/devd/devd.conf.5 b/sbin/devd/devd.conf.5
--- a/sbin/devd/devd.conf.5
+++ b/sbin/devd/devd.conf.5
@@ -38,7 +38,7 @@
.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
.\" SOFTWARE.
.\"
-.Dd July 9, 2025
+.Dd February 26, 2026
.Dt DEVD.CONF 5
.Os
.Sh NAME
@@ -666,6 +666,8 @@
Connected output device specified in
.Pa cdev
variable.
+.It Li SND Ta Li CONN Ta Li NODEV Ta
+No connected devices.
.El
.Pp
.\"
diff --git a/sbin/devd/snd.conf b/sbin/devd/snd.conf
--- a/sbin/devd/snd.conf
+++ b/sbin/devd/snd.conf
@@ -24,3 +24,13 @@
# See comment above.
action "/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -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 "/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -f /dev/null";
+};
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -483,6 +483,8 @@
snd_unit = pcm_best_unit(-1);
if (snd_unit_auto == 0)
snd_unit_auto = 1;
+ if (snd_unit < 0)
+ devctl_notify("SND", "CONN", "NODEV", NULL);
}
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jul 12, 8:14 PM (9 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35010223
Default Alt Text
D55531.id172772.diff (1 KB)
Attached To
Mode
D55531: sound: Notify devd when no devices are connected
Attached
Detach File
Event Timeline
Log In to Comment