Page MenuHomeFreeBSD

D43794.id134002.diff
No OneTemporary

D43794.id134002.diff

diff --git a/usr.sbin/mixer/mixer.8 b/usr.sbin/mixer/mixer.8
--- a/usr.sbin/mixer/mixer.8
+++ b/usr.sbin/mixer/mixer.8
@@ -19,7 +19,7 @@
.\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
.\" THE SOFTWARE.
.\"
-.Dd January 12, 2024
+.Dd February 8, 2024
.Dt MIXER 8
.Os
.Sh NAME
@@ -28,12 +28,12 @@
.Sh SYNOPSIS
.Nm
.Op Fl f Ar device
-.Op Fl d Ar unit
+.Op Fl d Ar pcmN | N
.Op Fl os
.Op Ar dev Ns Op Cm \&. Ns Ar control Ns Op Cm \&= Ns Ar value
.Ar ...
.Nm
-.Op Fl d Ar unit
+.Op Fl d Ar pcmN | N
.Op Fl os
.Fl a
.Nm
@@ -44,16 +44,17 @@
utility is used to set and display soundcard mixer device controls.
.Pp
The options are as follows:
-.Bl -tag -width "-f device"
+.Bl -tag -width "-d pcmN | N"
.It Fl a
Print the values for all mixer devices available in the system
.Pq see Sx FILES .
-.It Fl d Ar unit
+.It Fl d Ar pcmN | N
Change the default audio card to
-.Ar unit .
-The unit has to be an integer value.
-To see what unit values are available, look at the number each mixer device has by running
-.Nm .
+.Ar pcmN ,
+where N is the unit number (e.g for pcm0, the unit number is 0).
+See
+.Sx EXAMPLES
+on how to list all available audio devices in the system.
.It Fl f Ar device
Open
.Ar device
@@ -218,6 +219,11 @@
option has not been specified.
.El
.Sh EXAMPLES
+List all available audio devices in the system:
+.Bd -literal -offset indent
+$ mixer -a | grep ^pcm
+.Ed
+.Pp
Increase the volume for the
.Cm vol
device of the first mixer found by 5%:
diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c
--- a/usr.sbin/mixer/mixer.c
+++ b/usr.sbin/mixer/mixer.c
@@ -66,6 +66,8 @@
aflag = 1;
break;
case 'd':
+ if (strncmp(optarg, "pcm", 3) == 0)
+ optarg += 3;
dunit = strtol(optarg, NULL, 10);
if (errno == EINVAL || errno == ERANGE)
err(1, "strtol(%s)", optarg);

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 8, 6:51 PM (9 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29413501
Default Alt Text
D43794.id134002.diff (1 KB)

Event Timeline