Page MenuHomeFreeBSD

D46163.id141454.diff
No OneTemporary

D46163.id141454.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
@@ -29,7 +29,7 @@
.\"
.\" Note: The date here should be updated whenever a non-trivial
.\" change is made to the manual page.
-.Dd June 5, 2024
+.Dd July 26, 2024
.Dt SNDSTAT 4
.Os
.Sh NAME
@@ -74,6 +74,7 @@
max_chn (NUMBER): 2
provider_info (NVLIST):
unit (NUMBER): 0
+ status (STRING): on hdaa0
bitperfect (BOOL): FALSE
pvchan (NUMBER): 1
rvchan (NUMBER): 0
@@ -169,6 +170,9 @@
.Bl -tag -width ".Dv channel_info"
.It Dv unit
Sound card unit.
+.It Dv status
+Status string.
+Usually reports the driver the device is attached on.
.It Dv bitperfect
Whether the sound card has bit-perfect mode enabled.
.It Dv pvchan
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
@@ -440,6 +440,7 @@
nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_UNIT,
device_get_unit(d->dev)); // XXX: I want signed integer here
+ nvlist_add_string(sound4di, SNDST_DSPS_SOUND4_STATUS, d->status);
nvlist_add_bool(
sound4di, SNDST_DSPS_SOUND4_BITPERFECT, d->flags & SD_F_BITPERFECT);
nvlist_add_number(sound4di, SNDST_DSPS_SOUND4_PVCHAN, d->pvchancount);
diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h
--- a/sys/sys/sndstat.h
+++ b/sys/sys/sndstat.h
@@ -70,6 +70,7 @@
*/
#define SNDST_DSPS_SOUND4_PROVIDER "sound(4)"
#define SNDST_DSPS_SOUND4_UNIT "unit"
+#define SNDST_DSPS_SOUND4_STATUS "status"
#define SNDST_DSPS_SOUND4_BITPERFECT "bitperfect"
#define SNDST_DSPS_SOUND4_PVCHAN "pvchan"
#define SNDST_DSPS_SOUND4_RVCHAN "rvchan"

File Metadata

Mime Type
text/plain
Expires
Thu, Sep 17, 8:06 PM (7 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39102577
Default Alt Text
D46163.id141454.diff (1 KB)

Event Timeline