Hide from default sndstat some information not used on daily basis,
to make it readable by average user with average screen size.
This commit is contained in:
parent
d3e4b91f9c
commit
1d676e56c6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=202267
@ -81,7 +81,7 @@ static int sndstat_files = 0;
|
|||||||
|
|
||||||
static SLIST_HEAD(, sndstat_entry) sndstat_devlist = SLIST_HEAD_INITIALIZER(sndstat_devlist);
|
static SLIST_HEAD(, sndstat_entry) sndstat_devlist = SLIST_HEAD_INITIALIZER(sndstat_devlist);
|
||||||
|
|
||||||
int snd_verbose = 1;
|
int snd_verbose = 0;
|
||||||
TUNABLE_INT("hw.snd.verbose", &snd_verbose);
|
TUNABLE_INT("hw.snd.verbose", &snd_verbose);
|
||||||
|
|
||||||
#ifdef SND_DEBUG
|
#ifdef SND_DEBUG
|
||||||
@ -372,12 +372,10 @@ sndstat_prepare(struct sbuf *s)
|
|||||||
PCM_ACQUIRE_QUICK(d);
|
PCM_ACQUIRE_QUICK(d);
|
||||||
sbuf_printf(s, "%s:", device_get_nameunit(ent->dev));
|
sbuf_printf(s, "%s:", device_get_nameunit(ent->dev));
|
||||||
sbuf_printf(s, " <%s>", device_get_desc(ent->dev));
|
sbuf_printf(s, " <%s>", device_get_desc(ent->dev));
|
||||||
sbuf_printf(s, " %s [%s]", ent->str,
|
if (snd_verbose > 0)
|
||||||
(d->flags & SD_F_MPSAFE) ? "MPSAFE" : "GIANT");
|
sbuf_printf(s, " %s", ent->str);
|
||||||
if (ent->handler)
|
if (ent->handler)
|
||||||
ent->handler(s, ent->dev, snd_verbose);
|
ent->handler(s, ent->dev, snd_verbose);
|
||||||
else
|
|
||||||
sbuf_printf(s, " [no handler]");
|
|
||||||
sbuf_printf(s, "\n");
|
sbuf_printf(s, "\n");
|
||||||
PCM_RELEASE_QUICK(d);
|
PCM_RELEASE_QUICK(d);
|
||||||
}
|
}
|
||||||
|
@ -37,9 +37,6 @@
|
|||||||
struct pcm_channel *c; \
|
struct pcm_channel *c; \
|
||||||
struct pcm_feeder *f; \
|
struct pcm_feeder *f; \
|
||||||
\
|
\
|
||||||
if (verbose < 1) \
|
|
||||||
return (0); \
|
|
||||||
\
|
|
||||||
d = device_get_softc(dev); \
|
d = device_get_softc(dev); \
|
||||||
PCM_BUSYASSERT(d); \
|
PCM_BUSYASSERT(d); \
|
||||||
\
|
\
|
||||||
@ -48,9 +45,19 @@
|
|||||||
return (0); \
|
return (0); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
sbuf_printf(s, " (%dp:%dv/%dr:%dv channels %splex%s)", \
|
if (verbose < 1) { \
|
||||||
d->playcount, d->pvchancount, d->reccount, d->rvchancount, \
|
sbuf_printf(s, " (%s%s%s", \
|
||||||
(d->flags & SD_F_SIMPLEX) ? "sim" : "du", \
|
d->playcount ? "play" : "", \
|
||||||
|
(d->playcount && d->reccount) ? "/" : "", \
|
||||||
|
d->reccount ? "rec" : ""); \
|
||||||
|
} else { \
|
||||||
|
sbuf_printf(s, " (%dp:%dv/%dr:%dv", \
|
||||||
|
d->playcount, d->pvchancount, \
|
||||||
|
d->reccount, d->rvchancount); \
|
||||||
|
} \
|
||||||
|
sbuf_printf(s, "%s)%s", \
|
||||||
|
((d->playcount != 0 && d->reccount != 0) && \
|
||||||
|
(d->flags & SD_F_SIMPLEX)) ? " simplex" : "", \
|
||||||
(device_get_unit(dev) == snd_unit) ? " default" : "")
|
(device_get_unit(dev) == snd_unit) ? " default" : "")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user