aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sndctl/sndctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/sndctl/sndctl.c')
-rw-r--r--usr.sbin/sndctl/sndctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/sndctl/sndctl.c b/usr.sbin/sndctl/sndctl.c
index 156c845481c5..6977f0ab0ebe 100644
--- a/usr.sbin/sndctl/sndctl.c
+++ b/usr.sbin/sndctl/sndctl.c
@@ -830,6 +830,8 @@ mod_play_vchans(struct snd_dev *dp, void *arg)
if (dp->from_user)
return (-1);
+ if (!dp->play.pchans)
+ return (0);
snprintf(buf, sizeof(buf), "dev.pcm.%d.play.vchans", dp->unit);
@@ -873,6 +875,8 @@ mod_rec_vchans(struct snd_dev *dp, void *arg)
if (dp->from_user)
return (-1);
+ if (!dp->rec.pchans)
+ return (0);
snprintf(buf, sizeof(buf), "dev.pcm.%d.rec.vchans", dp->unit);