Commit graph

43 commits

Author SHA1 Message Date
Christos Margiolis cc7479d7dc mixer(8): Improve mute and recsrc controls
The input options of "dev.mute" (+, -, ^) and "dev.recsrc" (+, -, ^, =)
are quite cryptic. Allow the input to also be an actual description of
what these options do.

+ -> add (recsrc)
- -> remove (recsrc)
^ -> toggle (recsrc, mute)
= -> set (recsrc)
0 -> off (mute)
1 -> on (mute)

Also, deprecate the use of the symbol options in the EXAMPLES section of
the man page, by using the new descriptive options.

In the future, we might want to get rid of the symbol options
altogether, but preserve backwards compatibility for now.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Reviewed by:	dev_submerge.ch, imp
Differential Revision:	https://reviews.freebsd.org/D43796
2024-02-12 13:00:05 +02:00
Christos Margiolis 7bd14d09a9 mixer.8: Fix wrong sentence
246e0457d9 ("mixer.8: Add terse example
for increasing volume") mentions that the example changes the volume of
the "first mixer found", while the example shows how the change the
volume of the current mixer's "vol" device. Re-phrease sentence to
reflect the actual behavior of the command.

Also, improve the example by using the % operator, instead of hardcoding
0.05.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Reviewed by:	dev_submerge.ch, markj
Differential Revision:	https://reviews.freebsd.org/D43795
2024-02-12 13:00:05 +02:00
Christos Margiolis 75be886e58 mixer(8): Allow full PCM device names as input for the -d option
The -d option is a wrapper around hw.snd.default_unit. Currently
mixer(8) expects the option argument to be just the unit's number (e.g
pcm0 -> 0). To avoid confusion, allow full device names of the form
"pcmN" as well.

While here, improve the -d option's description in the man page.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Reviewed by:	dev_submerge.ch, imp
Differential Revision:	https://reviews.freebsd.org/D43794
2024-02-12 13:00:05 +02:00
Alexander Ziaee 246e0457d9 mixer.8: Add terse example for increasing volume
Reviewed by:	jhb
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1044
2024-01-12 14:55:36 -08:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Kyle Evans 4014365e42 mixer: remove volume backwards compat, add % interpretation
The current situation is fairly confusing, where an integer is interpreted
as a percent until you slap a decimal on it and magically it becomes an
absolute value.

Let's have a flag day in 14.0 and remove this shim entirely.  Setting with
percent can still be useful, so allow a trailing '%' to indicate as such.
As a side effect, we tighten down the format allowed in the volume a little
bit by ensuring there's no trailing garbage after the value once it's
separated into left and right components.

Reviewed by:	christos, hselasky, pauamma_gundo.com (manpages)
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D35101
2022-06-17 22:50:58 -05:00
Hans Petter Selasky 95e96c00fd mixer.8: Document shorthand syntax for volume setting.
Submitted by:		christos@
Differential Revision:	https://reviews.freebsd.org/D34614
Sponsored by:		NVIDIA Networking
2022-03-20 20:21:07 +01:00
Hans Petter Selasky bde8460272 mixer.4 and mixer.8: Fix mandoc -Tlint errors.
Submitted by:		christos@
Differential Revision:	https://reviews.freebsd.org/D34603
Sponsored by:		NVIDIA Networking
2022-03-20 20:21:03 +01:00
Mateusz Piotrowski c36d04222d mixer .8: Clean up the manual page
- Use correct macros (e.g., Pa for paths, Ar for arguments, Cm for
  command modifiers).
- Pet igor and mandoc -Tlint (e.g., start sentences after a newline).
- Use Ta instead of a tab character in tables.
- Stylize all table headers with Sy consistency.
- Add a missing "vol" variant to the synopsis of "dev.volume".
- Sort dev.recsrc command modifiers consistency.
- Use "Bd -literal" for code blocks in the examples. "Bl -tag" is not
  the right macro for that.

Fixes:	903873ce15 Implement and use new mixer(3) library for FreeBSD.
2022-03-13 13:40:51 +01:00
Christos Margiolis ce74223a36 mixer: make .Dt tags uppercase
The document title should be uppercase in man pages.

Reviewed by:	imp, gbe
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D33027
2021-11-20 08:58:36 +01:00
Mateusz Piotrowski a3a82ed843 mixer.8: Document -h 2021-10-17 10:02:15 +02:00
Hans Petter Selasky db6ba1e0c5 mixer(3) and mixer(8): Update manual pages.
- Use correct e-mail address.
- Set FreeBSD 14.0 as introduction for the updated mixer(8) utility.

Submitted by:	christos@
Differential Revision:	https://reviews.freebsd.org/D31636
Sponsored by:	NVIDIA Networking
2021-09-22 22:01:40 +02:00
Hans Petter Selasky 903873ce15 Implement and use new mixer(3) library for FreeBSD.
Wiki article: https://wiki.freebsd.org/SummerOfCode2021Projects/SoundMixerImprovements
This project was part of Google Summer of Code 2021.

Submitted by:	christos@
Differential Revision:	https://reviews.freebsd.org/D31636
Sponsored by:	NVIDIA Networking
2021-09-22 19:43:56 +02:00
Baptiste Daroussin 01c2b8ac0d use .Mt to mark up email addresses consistently (part2)
PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
2014-06-20 09:57:27 +00:00
John-Mark Gurney b2c696468c add Xref to sound(4)...
MFC after:	1 week
2014-06-02 22:58:00 +00:00
Ulrich Spörlein 0d9deed52c mdoc: drop redundant .Pp and .LP calls
They have no effect when coming in pairs, or before .Bl/.Bd
2010-10-08 12:40:16 +00:00
Ulrich Spörlein 62486687ed mdoc: consistently spell our email addresses <foo@FreeBSD.org>
Reviewed by:	ru
2010-05-19 08:57:53 +00:00
Jung-uk Kim c60bd3d3a5 Update list of possible mixer devices. These devices were added to
soundcard.h more than ten years ago.
2008-03-15 01:15:15 +00:00
Maxim Konovalov a88ee16ddd o Add "line" device to a list of mixer(8) devices.
PR:		docs/112520
Submitted by:	Pietro Cerutti
MFC after:	1 week
2007-05-09 05:33:54 +00:00
Ruslan Ermilov 9d73fabda7 Markup fixes.
Approved by:	re (blanket)
2005-06-14 12:26:36 +00:00
Matthew N. Dodd a103924701 Add the -S flag which produces the -s output without
mixing field separators.
2005-04-13 07:11:54 +00:00
Ruslan Ermilov 07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Ruslan Ermilov d37ea99837 Removed trailing whitespace. 2004-07-02 19:07:33 +00:00
Greg Lehey 872e095cc6 Document changes to default output. 2003-06-15 08:46:36 +00:00
Ruslan Ermilov f062eac425 Assorted mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-22 11:52:23 +00:00
Matthew N. Dodd 22baecf2bd Implement relative mixer adjustment.
PR:		46679 (similar functionality)
2003-04-09 15:25:52 +00:00
Philippe Charnier 490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Dima Dorfman f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
George C A Reid 5c7f33e12c Change the behaviour of mixer slightly such that not explicitly specifying
a mixer device will set/get the master volume levels

PR:		25156
Submitted by:	Tony Finch <dot@dotat.at>
Reviewed by:	cg, nik
2001-04-09 11:10:34 +00:00
Ruslan Ermilov 610a5778c5 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:44:04 +00:00
Ruslan Ermilov f4d874a1db mdoc(7) police: do not split author names in the AUTHORS section. 2000-11-22 09:35:58 +00:00
Maxim Sobolev 68a1b9058a Several cleanups:
- use getopt(3) to parse command line arguments instead of home-made incomplete
  parser;
- be more verbose when error in command line encountered (i.e. incorrect
  playing/recording device, incorrect recsrc syntax).
2000-08-15 05:42:39 +00:00
Jordan K. Hubbard 7a1203480c I've always wanted to be able to dump out the current values of
the mixer in a format suitable for saving and handing off to
mixer(1) at some future date to restore the settings.
Add a -s flag to do this.
2000-05-20 23:25:08 +00:00
Sheldon Hearn f2e366a105 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 14:09:25 +00:00
Nik Clayton 938b3a1e41 Remove xrefs to obosolete cdplay(1)
PR:             docs/17079
Submitted by:   Udo Erdelhoff <ue@nathan.ruhr.de>
2000-03-01 10:41:13 +00:00
Philippe Charnier 13f6e0f326 Terminate .Bl with .El 1999-11-27 16:55:50 +00:00
Mike Pritchard d824825b45 Spelling fix.
PR:		bin/14588
Submitted by:	Christian Weisgerber <naddy@mips.rhein-neckar.de>
1999-10-30 19:36:42 +00:00
Peter Wemm 97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Nik Clayton 414a35e60a Add $Id$, to make it simpler for members of the translation teams to
track.

The Id line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

     .\"    $Id$
     .\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by:            bde
1999-07-12 20:12:29 +00:00
Philippe Charnier f12a14713b .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq. 1998-03-23 08:31:20 +00:00
Philippe Charnier cd94e9c368 Use err(3). 1997-09-29 06:38:49 +00:00
John-Mark Gurney eddcf96d7d major modifications to the mixer. currently it doesn't report errors
that it encounters (such as invalid device), but does print usage upon
this error...

but otherwise allows complex commands such as:
mixer -f /dev/mixer4 synth line 50 -rec mic +rec line =rec cd ^rec mix
1997-09-19 13:38:51 +00:00
Mike Pritchard 34cf430230 Add a man page for mixer(8). 1997-01-10 06:33:13 +00:00