Page MenuHomeFreeBSD

D46164.diff
No OneTemporary

D46164.diff

diff --git a/share/man/man4/sndstat.4 b/share/man/man4/sndstat.4
--- a/share/man/man4/sndstat.4
+++ b/share/man/man4/sndstat.4
@@ -77,7 +77,11 @@
status (STRING): on hdaa0
bitperfect (BOOL): FALSE
pvchan (NUMBER): 1
+ pvchanrate (NUMBER): 48000
+ pvchanformat (NUMBER): 0x00000010
rvchan (NUMBER): 0
+ rvchanrate (NUMBER): 48000
+ rvchanformat (NUMBER): 0x00000010
channel_info (NVLIST_ARRAY): 1
name (STRING): pcm0:virtual_play:dsp0.vp0
parentchan (STRING): pcm0:play:dsp0.p0
@@ -177,8 +181,16 @@
Whether the sound card has bit-perfect mode enabled.
.It Dv pvchan
Number of playback virtual channels.
+.It Dv pvchanrate
+Playback virtual channel sample rate.
+.It Dv pvchanformat
+Playback virtual channel format.
.It Dv rvchan
Number of recording virtual channels.
+.It Dv rvchanrate
+Recording virtual channel sample rate.
+.It Dv rvchanformat
+Recording virtual channel format.
.It Dv channel_info
Channel information.
There are a number of name/value pairs inside this field:
diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
--- a/sys/dev/sound/pcm/sndstat.c
+++ b/sys/dev/sound/pcm/sndstat.c
@@ -444,7 +444,15 @@
nvlist_add_bool(
sound4di, SNDST_DSPS_SOUND4_BITPERFECT, d->flags & SD_F_BITPERFECT);
nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHAN, d->pvchancount);
+ nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHANRATE,
+ d->pvchanrate);
+ nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHANFORMAT,
+ d->pvchanformat);
nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_RVCHAN, d->rvchancount);
+ nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_RVCHANRATE,
+ d->rvchanrate);
+ nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_RVCHANFORMAT,
+ d->rvchanformat);
nchan = 0;
CHN_FOREACH(c, d, channels.pcm) {
diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h
--- a/sys/sys/sndstat.h
+++ b/sys/sys/sndstat.h
@@ -73,7 +73,11 @@
#define SNDST_DSPS_SOUND4_STATUS "status"
#define SNDST_DSPS_SOUND4_BITPERFECT "bitperfect"
#define SNDST_DSPS_SOUND4_PVCHAN "pvchan"
+#define SNDST_DSPS_SOUND4_PVCHANRATE "pvchanrate"
+#define SNDST_DSPS_SOUND4_PVCHANFORMAT "pvchanformat"
#define SNDST_DSPS_SOUND4_RVCHAN "rvchan"
+#define SNDST_DSPS_SOUND4_RVCHANRATE "rvchanrate"
+#define SNDST_DSPS_SOUND4_RVCHANFORMAT "rvchanformat"
#define SNDST_DSPS_SOUND4_CHAN_INFO "channel_info"
#define SNDST_DSPS_SOUND4_CHAN_NAME "name"
#define SNDST_DSPS_SOUND4_CHAN_PARENTCHAN "parentchan"

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 21, 1:22 AM (20 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14751397
Default Alt Text
D46164.diff (2 KB)

Event Timeline