summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorcg <cg@FreeBSD.org>2000-01-09 08:07:46 +0000
committercg <cg@FreeBSD.org>2000-01-09 08:07:46 +0000
commit874d48434cdd5eac08d716ce202677dc20799249 (patch)
tree589e2ef42c2738e74c3a4604b9f0347915dd5e4a /sys/dev
parentd80d29dc27c414c5c32106b6dd6805ba8d675895 (diff)
downloadFreeBSD-src-874d48434cdd5eac08d716ce202677dc20799249.zip
FreeBSD-src-874d48434cdd5eac08d716ce202677dc20799249.tar.gz
modify sndstat output
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/sound/pcm/sound.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index b9368b8..a98db81e 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -436,11 +436,19 @@ status_init(char *buf, int size)
d = gsd(i);
if (!d) continue;
dev = devclass_get_device(pcm_devclass, i);
- if (1) snprintf(buf + strlen(buf), size - strlen(buf),
- "pcm%d: <%s> %s (%d/%d channels%s)\n",
- i, device_get_desc(dev), d->status,
- d->playcount, d->reccount,
+ if (1) {
+ snprintf(buf + strlen(buf), size - strlen(buf),
+ "pcm%d: <%s> %s",
+ i, device_get_desc(dev), d->status);
+ if (d->chancount > 0)
+ snprintf(buf + strlen(buf), size - strlen(buf),
+ " (%dp/%dr channels%s)\n",
+ d->playcount, d->reccount,
(!(d->flags & SD_F_SIMPLEX))? " duplex" : "");
+ else
+ snprintf(buf + strlen(buf), size - strlen(buf),
+ " (mixer only)");
+ }
}
return strlen(buf);
}
OpenPOWER on IntegriCloud