Page MenuHomeFreeBSD

mixer(8): Improve mute and recsrc controls
ClosedPublic

Authored by christos on Feb 8 2024, 3:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 7, 10:49 PM
Unknown Object (File)
Sun, Apr 28, 1:55 PM
Unknown Object (File)
Sat, Apr 27, 8:49 AM
Unknown Object (File)
Sat, Apr 27, 7:59 AM
Unknown Object (File)
Sat, Apr 27, 7:59 AM
Unknown Object (File)
Sat, Apr 27, 7:59 AM
Unknown Object (File)
Sat, Apr 27, 7:32 AM
Unknown Object (File)
Sun, Apr 21, 2:55 PM
Subscribers

Details

Summary
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
Test Plan
christos@tpad$ mixer vol.mute=toggle
vol.mute: on -> off
pcm0:mixer: <Realtek ALC257 (Analog 2.0+HP/2.0)> on hdaa0  (play/rec) (default)
    vol       = 0.85:0.85     pbk
    pcm       = 1.00:1.00     pbk
    speaker   = 1.00:1.00     pbk
    rec       = 0.37:0.37     pbk
    ogain     = 1.00:1.00     pbk
    monitor   = 0.67:0.67     rec src

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

christos edited the summary of this revision. (Show Details)
christos edited the test plan for this revision. (Show Details)

Remove the case statements altogether and test the symbol options after the
descriptive one.

This revision is now accepted and ready to land.Feb 8 2024, 4:02 PM
This revision was automatically updated to reflect the committed changes.