From nobody Sun Mar 13 16:44:10 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 885B01A0D243; Sun, 13 Mar 2022 16:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KGlqt3PWGz3p8S; Sun, 13 Mar 2022 16:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647189850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kpkv6SqXdeE76p/exh0Ci7QHH4QyrVv72sCvnDAAugM=; b=OeNiEjjn30W21nOxieQOeGR8SHCCE7OQESWGxlJkXbiYKr9nr8rt0A+uCeVzfWWiW8mHIw uutbvvX2VbEC2/+I5M5YWQZPkFkCwd89EjJQJjVI0a7u9fPPF0tbTARM2zv1vB/DkoWKO7 XHuqiyITrJHxMO/m9MS3CxmDILjJd7TAmzjL2LUYl8wcYaE7o41mLg+nRaDOOOGtBgoJYN tRAO+ZHhPy0yBbrSN0YO6DapjHEyLwQZtCKuYi5+pBpWs0nKbq+NuQXbg02T08Isv0+L60 jSqKH1LXafwOxsOqSf8q8VtIIfLXivnNG1NyEjwLc4EgHgwF5CmIT3lVpITzsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 541541CF0E; Sun, 13 Mar 2022 16:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22DGiAed076247; Sun, 13 Mar 2022 16:44:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22DGiAki076246; Sun, 13 Mar 2022 16:44:10 GMT (envelope-from git) Date: Sun, 13 Mar 2022 16:44:10 GMT Message-Id: <202203131644.22DGiAki076246@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: e83a53abeb90 - main - Chase mixer(8) command-line interface changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e83a53abeb90258206285be517af2f2045caa78b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647189850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kpkv6SqXdeE76p/exh0Ci7QHH4QyrVv72sCvnDAAugM=; b=EU+TY3aROLPWA8ay8XtdBiuo+0hZaj6K/c7OjbDAJ4nVvRj6apxlg79h2Dep3XIEQv66bu YXtmblccshCtZn2DoUK9g4yvz5IMtxFgwBewe7F8/J03ui/ySDWitxvJiXNxvZPo/yEsJH qkvAOgls4tPDuGU2jobEGlSKj3z+4U2ktawcerZAa0sasNJlQx8ccAntgXTwJWUy8gMdom kx4N5QGKp+FqG67BIfjrCDwjDX1I0t5+S4G1NHo/CSOLXRfRB+8fUgk/O++bbaFWs3YhMM L03qK1fC2oPlXBPIYt6VOU7NAXOyY86KkPdMDV2SKgpI/N26Naj/z/q3IMwWQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647189850; a=rsa-sha256; cv=none; b=MEBet/gxur6jcBqeK02FMSWcUa49VzICERF8xFQWNzzPWTtn7LjC8utYosL50fjB8tu0WL TTjSjvl0P8aoYQbG7TnX6ltwOTnD/fQ0v3v+euWAq+wixJ2cnwzaLs6/OLWqQ0jJb6IhJs EwjoYS7hNCj+713KjYFYEL242ps9Q7R8vp3bmKOaHZ7mddlZJbS0hC2RNgn2njuwvp8Z// QSwD//cBuuBubbEwnRyJ3eaF9Xn156eJcS6CL2CpdAp9yQcQOFb8zqI7sppD/8AvzMmw0x yYRPptSmstWHLaHnH5gjX80FU5wGP4EjhhRofXQcyluqYk2lzm4T5JzyaYnl9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e83a53abeb90258206285be517af2f2045caa78b commit e83a53abeb90258206285be517af2f2045caa78b Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-03-13 13:13:28 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-03-13 16:43:49 +0000 Chase mixer(8) command-line interface changes FreeBSD 14.0 is going to ship with a new implementation of the mixer(8) command. Unfortunately, in order to support new features like mute, the command-line interface of the new implementation is not backwards compatible. Update all the remaining documentation and scripts in the src tree to use the new syntax. While here, document in usbhidaction.1 that the mute functionality is now supported. Reviewed by: christos, debdrup, hselasky Approved by: hselasky (src) Fixes: 903873ce1560 Implement and use new mixer(3) library for FreeBSD. Differential Revision: https://reviews.freebsd.org/D34545 --- sbin/devd/apple.conf | 6 +++--- sbin/devd/asus.conf | 12 ++++++------ share/man/man4/acpi_ibm.4 | 6 +++--- usr.bin/fortune/datfiles/freebsd-tips | 4 ++-- usr.bin/usbhidaction/usbhidaction.1 | 19 +++++++++---------- 5 files changed, 23 insertions(+), 24 deletions(-) diff --git a/sbin/devd/apple.conf b/sbin/devd/apple.conf index 3084cd459fd4..9c132ec9f183 100644 --- a/sbin/devd/apple.conf +++ b/sbin/devd/apple.conf @@ -44,7 +44,7 @@ notify 0 { match "system" "PMU"; match "subsystem" "keys"; match "type" "mute"; - action "mixer 0"; + action "mixer vol.volume=0"; }; notify 0 { @@ -52,7 +52,7 @@ notify 0 { match "subsystem" "keys"; match "type" "volume"; match "notify" "down"; - action "mixer vol -10"; + action "mixer vol.volume=-10"; }; notify 0 { @@ -60,7 +60,7 @@ notify 0 { match "subsystem" "keys"; match "type" "volume"; match "notify" "up"; - action "mixer vol +10"; + action "mixer vol.volume=+10"; }; # Eject key diff --git a/sbin/devd/asus.conf b/sbin/devd/asus.conf index a195a58bc51d..eed369f6ca4d 100644 --- a/sbin/devd/asus.conf +++ b/sbin/devd/asus.conf @@ -7,21 +7,21 @@ notify 0 { match "system" "ACPI"; match "subsystem" "ASUS"; match "notify" "0x32"; - action "mixer 0"; + action "mixer vol.volume=0"; }; notify 0 { match "system" "ACPI"; match "subsystem" "ASUS"; match "notify" "0x31"; - action "mixer vol -10"; + action "mixer vol.volume=-10"; }; notify 0 { match "system" "ACPI"; match "subsystem" "ASUS"; match "notify" "0x30"; - action "mixer vol +10"; + action "mixer vol.volume=+10"; }; # The next blocks enable volume hotkeys that can be found on the Asus EeePC @@ -29,21 +29,21 @@ notify 0 { match "system" "ACPI"; match "subsystem" "ASUS-Eee"; match "notify" "0x13"; - action "mixer 0"; + action "mixer vol.volume=0"; }; notify 0 { match "system" "ACPI"; match "subsystem" "ASUS-Eee"; match "notify" "0x14"; - action "mixer vol -10"; + action "mixer vol.volume=-10"; }; notify 0 { match "system" "ACPI"; match "subsystem" "ASUS-Eee"; match "notify" "0x15"; - action "mixer vol +10"; + action "mixer vol.volume=+10"; }; # Enable user hotkeys that can be found on the Asus EeePC diff --git a/share/man/man4/acpi_ibm.4 b/share/man/man4/acpi_ibm.4 index a2c862b69703..290c7d3b29c1 100644 --- a/share/man/man4/acpi_ibm.4 +++ b/share/man/man4/acpi_ibm.4 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2020 +.Dd March 13, 2022 .Dt ACPI_IBM 4 .Os .Sh NAME @@ -451,11 +451,11 @@ case ${NOTIFY} in LEVEL=`sysctl -n dev.acpi_ibm.0.mic_led` if [ $LEVEL -eq 0 ]; then sysctl dev.acpi_ibm.0.mic_led=1 - mixer rec 0 + mixer rec.volume=0 fi if [ $LEVEL -eq 1 ]; then sysctl dev.acpi_ibm.0.mic_led=0 - mixer rec 30 + mixer rec.volume=30 fi ;; *) diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips index c974f74dfda3..e8fa84e02489 100644 --- a/usr.bin/fortune/datfiles/freebsd-tips +++ b/usr.bin/fortune/datfiles/freebsd-tips @@ -339,8 +339,8 @@ If you have sudo(8) installed and permissions to use it, type ``w ! sudo tee %'' to force a write. % You can adjust the volume of various parts of the sound system in your -computer by typing 'mixer '. To get a list of what you can -adjust, just type 'mixer'. +computer by typing 'mixer .volume='. To get a list of what +you can adjust, just type 'mixer'. % You can automatically download and install binary packages by doing diff --git a/usr.bin/usbhidaction/usbhidaction.1 b/usr.bin/usbhidaction/usbhidaction.1 index ca4556da3416..423b21adae9f 100644 --- a/usr.bin/usbhidaction/usbhidaction.1 +++ b/usr.bin/usbhidaction/usbhidaction.1 @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 28, 2020 +.Dd March 13, 2022 .Dt USBHIDACTION 1 .Os .Sh NAME @@ -139,12 +139,11 @@ The following configuration file can be used to control a pair of Philips USB speakers with the HID controls on the speakers. .Bd -literal -offset indent # Configuration for various Philips USB speakers -Consumer:Volume_Increment 1 0 mixer -f $1 vol +1 -Consumer:Volume_Decrement 1 0 mixer -f $1 vol -1 -# mute not supported -#Consumer:Mute 1 0 mixer -f $1 mute -Consumer:Channel_Top.Microsoft:Base_Up 1 0 mixer -f $1 bass +1 -Consumer:Channel_Top.Microsoft:Base_Down 1 0 mixer -f $1 bass -1 +Consumer:Volume_Increment 1 0 mixer -f $1 vol.volume=+1 +Consumer:Volume_Decrement 1 0 mixer -f $1 vol.volume=-1 +Consumer:Mute 1 0 mixer -f $1 mute.volume=^ +Consumer:Channel_Top.Microsoft:Base_Up 1 0 mixer -f $1 bass.volume=+1 +Consumer:Channel_Top.Microsoft:Base_Down 1 0 mixer -f $1 bass.volume=-1 .Ed .Pp A sample invocation using this configuration would be @@ -154,9 +153,9 @@ A sample invocation using this configuration would be The following example controls the mixer volume using a Logitech Wingman. Notice the debounce of 1 for buttons and 5 for the slider. .Bd -literal -offset indent -Button:Button_1 1 1 mixer vol +10 -Button:Button_2 1 1 mixer vol -10 -Generic_Desktop:Z * 5 mixer vol `echo $V | awk '{print int($$1/255*100)}'` +Button:Button_1 1 1 mixer vol.volume=+10 +Button:Button_2 1 1 mixer vol.volume=-10 +Generic_Desktop:Z * 5 mixer vol.volume=`echo $V | awk '{print int($$1/255*100)}'` .Ed .Sh SEE ALSO .Xr usbhidctl 1 ,