Page MenuHomeFreeBSD

D55531.diff
No OneTemporary

D55531.diff

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

Mime Type
text/plain
Expires
Mon, Jul 13, 7:43 AM (9 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35010223
Default Alt Text
D55531.diff (1 KB)

Event Timeline