Changeset View
Standalone View
usr.sbin/mixer/mixer.8
Show All 15 Lines | |||||||||||
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||||||||
.\" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | .\" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||||||||
.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||||||||
.\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | .\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||||||||||
.\" THE SOFTWARE. | .\" THE SOFTWARE. | ||||||||||
.\" | .\" | ||||||||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||||||||
.\" | .\" | ||||||||||
.Dd March 20, 2022 | .Dd April 29, 2022 | ||||||||||
.Dt MIXER 8 | .Dt MIXER 8 | ||||||||||
.Os | .Os | ||||||||||
.Sh NAME | .Sh NAME | ||||||||||
.Nm mixer | .Nm mixer | ||||||||||
.Nd manipulate soundcard mixer controls | .Nd manipulate soundcard mixer controls | ||||||||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||||||||
.Nm | .Nm | ||||||||||
.Op Fl f Ar device | .Op Fl f Ar device | ||||||||||
▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||||||||
The available controls are as follows (replace | The available controls are as follows (replace | ||||||||||
.Ar dev | .Ar dev | ||||||||||
with one of the available devices): | with one of the available devices): | ||||||||||
.Sm off | .Sm off | ||||||||||
.Bl -column xxxxxxxxxxxxxxxxxxxxxxxx -offset indent | .Bl -column xxxxxxxxxxxxxxxxxxxxxxxx -offset indent | ||||||||||
.It Sy Name Ta Sy Value | .It Sy Name Ta Sy Value | ||||||||||
.It Ar dev Cm .volume Ta Xo | .It Ar dev Cm .volume Ta Xo | ||||||||||
.Ar vol | | .Ar vol | | ||||||||||
.Oo Cm \&+ | Cm \&- Oc Ar lvol | .Oo Cm \&+ | Cm \&- Oc Ar lvol Oo % Oc | ||||||||||
.Oo Cm \&: Oo Cm \&+ | Cm \&- Oc Ar rvol Oc | .Oo Cm \&: Oo Cm \&+ | Cm \&- Oc Ar rvol Oo % Oc Oc | ||||||||||
.Xc | .Xc | ||||||||||
.It Ar dev Cm .mute Ta Cm 0 | 1 | ^ | .It Ar dev Cm .mute Ta Cm 0 | 1 | ^ | ||||||||||
.It Ar dev Cm .recsrc Ta Cm ^ | + | - | = | .It Ar dev Cm .recsrc Ta Cm ^ | + | - | = | ||||||||||
.El | .El | ||||||||||
.Sm on | .Sm on | ||||||||||
.Pp | .Pp | ||||||||||
The | The | ||||||||||
.Ar dev Ns Cm .volume | .Ar dev Ns Cm .volume | ||||||||||
control modifies a device's volume. | control modifies a device's volume. | ||||||||||
The optional | The optional | ||||||||||
.Ar lvol | .Ar lvol | ||||||||||
and/or | and/or | ||||||||||
.Ar rvol | .Ar rvol | ||||||||||
values have to be specified. | values have to be specified. | ||||||||||
The values have to be normalized 32-bit floats, from 0.0 to 1.0 inclusively. | The values should typically be decimal numbers between 0 and 1 with at most 2 | ||||||||||
If no | digits after the decimal point. | ||||||||||
.Ql \&. | A trailing percent sign indicates that the value should be treated as a | ||||||||||
pauamma_gundo.com: Percent of what? Is "70%" the same as absolute 0.7, 0.7 times whatever the current value is, or… | |||||||||||
Done Inline ActionsRight, the intended interpretation is "70% of 1.0" kevans: Right, the intended interpretation is "70% of 1.0" | |||||||||||
character is present, the value is treated like a percentage, for backwards compatibility. | percentage of 1.0, rather than an absolute value. | ||||||||||
Done Inline Actions
Clarify. pauamma_gundo.com: Clarify. | |||||||||||
Thus, 70% means the same as 0.7. | |||||||||||
If the left or right volume values are prefixed with | If the left or right volume values are prefixed with | ||||||||||
Done Inline Actions
More readily understandable. (Insert line break where appropriate.) pauamma_gundo.com: More readily understandable. (Insert line break where appropriate.) | |||||||||||
Done Inline ActionsWhy 6 decimal digits? Since OSS' internal values range from 0 to 100, it makes christos: Why 6 decimal digits? Since OSS' internal values range from 0 to 100, it makes
sense to use… | |||||||||||
Not Done Inline ActionsThat was me trying to clarify "32-bit float", which does give you 6-7 decimal digits IIRC. But maybe I was overly literal here. pauamma_gundo.com: That was me trying to clarify "32-bit float", which does give you 6-7 decimal digits IIRC. But… | |||||||||||
.Cm + | .Cm + | ||||||||||
or | or | ||||||||||
.Cm - , | .Cm - , | ||||||||||
the value following will be used as a relative adjustment, modifying the | the value following will be used as a relative adjustment, modifying the | ||||||||||
current settings by the amount specified. | current settings by the amount specified. | ||||||||||
Note that relative percentages are still relative to 1.0, not to the current | |||||||||||
value. | |||||||||||
If the volume is currently 0.40 and an adjustment of +20% is specified, then | |||||||||||
thet final volume will be set to 0.60. | |||||||||||
Done Inline ActionsAre +23% or -42% also possible? I would add examples here if so, along the lines of (if I understand the intent correctly):
pauamma_gundo.com: Are +23% or -42% also possible? I would add examples here if so, along the lines of (if I… | |||||||||||
Done Inline ActionsI pointed this out on my comment as well. Although it does make sense, I think christos: I pointed this out on my comment as well. Although it does make sense, I think
-23% being… | |||||||||||
Not Done Inline ActionsRelative to the current volume feels more natural to me, but then I don't think I've ever used that volume-setting interface, so POLA overall probably dictates "document clearly what the code actually does, not change the code to fit one person's preconceptions". pauamma_gundo.com: Relative to the current volume feels more natural to me, but then I don't think I've ever used… | |||||||||||
.Pp | .Pp | ||||||||||
Volume can also be set using the shorthand | Volume can also be set using the shorthand | ||||||||||
.Ar dev Ns Cm =value . | .Ar dev Ns Cm =value . | ||||||||||
This syntax does not apply to other controls. | This syntax does not apply to other controls. | ||||||||||
.Pp | .Pp | ||||||||||
The | The | ||||||||||
.Ar dev Ns Cm .mute | .Ar dev Ns Cm .mute | ||||||||||
control (un)mutes a device. | control (un)mutes a device. | ||||||||||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |
Percent of what? Is "70%" the same as absolute 0.7, 0.7 times whatever the current value is, or something else?