From nobody Wed Jun 3 08:23:12 2026 X-Original-To: dev-commits-src-branches@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 4gVggj0VTqz6gJwv for ; Wed, 03 Jun 2026 08:23:13 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gVggh6v1pz3gBr for ; Wed, 03 Jun 2026 08:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780474993; 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=nqkwgqBLAlKwJPtIuaSG+5hrfyJbnoWYACelEAai2T0=; b=t3xFlOHWctVENx6gStH93tPBcwp4YFWnJkXbFeVZQlDlIkNs1CCF1heqgB/OsZcJKDCjJc s7puFL1ZCYZYvit3g2iQbCzKYpE0lEKDX2h3BGquQ6ZG2B2bsusSdrEoZoIHVtMONyP+8D Gw3ADhl3eErxBop+CpVIYWw051D8ismrtQGCVBOmL2s8k1SiGGoR2rbLPuNPIjdOxoRr2F IhHtNBDXbSNYGqns4CseJRucn65qy9CgVDmzgYbQQdegCmMsCBcyKCWwEAOjMSs7OTevti zl/AI81R3E/ljKkkmdXDEnfcWfuxLoQg75BL3msxG0h+TuDXurUVtx9mbOjrqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780474993; a=rsa-sha256; cv=none; b=hUish661PDb9u7tmAZ7Tm4zjjx9t+n+W8JB+cIFBnYdn5NE1LJ2rJFjb6wyOG5qRupHOdS OaAhayHKe7MPfRT3EoEQZmuKuJyBxnef00exNOB2BgMay2tyuHsuD6Q92Z1msHPPIAX36F 0qigwUv26rim1r65yuqlcSFlTWm7WzaCt3LmVTmtOA1us+nabn1XRt+iJLSz6kuS6lMv7S 2H7h8jupBbHdXoFilecoKdlGOVxm/QiX+eW8dYtyk5ea+HqMaDr9MV5UJLQA6QDH0dq0pi wqlHFiV7z5wDNhChE+FapuSuAioObItjSkbyuav11ytodrwFWT4D9JE0BMB75A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780474993; 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=nqkwgqBLAlKwJPtIuaSG+5hrfyJbnoWYACelEAai2T0=; b=rMjseN00T9WhWiGOe1K4q2rjPnz6O+287i7Q3ByFT7/R996+pubNDGee/f1ntjX9vTsn5w 7fmSV/OXET2u0dmIBNLV4HWsC6NLKLBdN/C7XXJ7Fltkx+q5P2xlHefpdlw38KxrzaJcYE MO5tufMw/5CF7ZqpMo0duiL1SRJwDM//mi3gGiZSoUVueMn2N7+pbJ1o9MEHaHnCFANbUv fNrqIeS4GEF0Y2/3ASwQIaRX4FPGgHPwhxpyecD/zFFzPxi/08XPtKE8kWC7ZIPynjoWD9 UPtM9dj5E9zJESr/NGoWKW06lXaNfZ2U2EfTUulltqgzWoA+Lk+PbUaQ0xSw9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gVggh6VX2z13Ht for ; Wed, 03 Jun 2026 08:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39164 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 03 Jun 2026 08:23:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 91a6647a7d48 - stable/15 - sound: Expose EQ by default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 91a6647a7d48fd8a3a13d3307ec78446481421c3 Auto-Submitted: auto-generated Date: Wed, 03 Jun 2026 08:23:12 +0000 Message-Id: <6a1fe470.39164.18f43be6@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=91a6647a7d48fd8a3a13d3307ec78446481421c3 commit 91a6647a7d48fd8a3a13d3307ec78446481421c3 Author: Christos Margiolis AuthorDate: 2026-04-16 14:26:25 +0000 Commit: Christos Margiolis CommitDate: 2026-06-03 08:22:22 +0000 sound: Expose EQ by default The dev.pcm.%d.eq* sysctls and mixer "bass" and "treble" controls are exposed only if hint.pcm.%d.eq is set. However, there is no good reason why we shouldn't at least expose the controls, and let the user enable/disable/bypass equalization through the sysctl. Sponsored by: The FreeBSD Foundation MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/15 (cherry picked from commit a0011c74f8f026e04803b9815198a56f50c247e6) --- share/man/man4/pcm.4 | 9 --------- sys/dev/sound/pcm/feeder_chain.c | 2 +- sys/dev/sound/pcm/mixer.c | 17 +++-------------- sys/dev/sound/pcm/sound.c | 3 +-- sys/dev/sound/pcm/sound.h | 8 ++------ 5 files changed, 7 insertions(+), 32 deletions(-) diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4 index 8a92cefa3549..1efebffcc424 100644 --- a/share/man/man4/pcm.4 +++ b/share/man/man4/pcm.4 @@ -197,9 +197,6 @@ The Parametric Software Equalizer (EQ) enables the use of controls (bass and treble). Commonly used for ear-candy or frequency compensation due to the vast difference in hardware quality. -EQ is disabled by default, but can be enabled with the -.Va hint.pcm.%d.eq -tunable. .Ss VCHANs Each device can optionally support more playback and recording channels than physical hardware provides by using @@ -230,12 +227,6 @@ driver. The following tunables can not be changed during runtime using .Xr sysctl 8 . .Bl -tag -width indent -.It Va hint.pcm.%d.eq -Set to 1 or 0 to explicitly enable (1) or disable (0) the equalizer. -Requires a driver reload if changed. -Enabling this will make bass and treble controls appear in mixer applications. -This tunable is undefined by default. -Equalizing is disabled by default. .It Va hint.pcm.%d.vpc Set to 1 or 0 to explicitly enable (1) or disable (0) the VPC feature. This tunable is undefined by default. diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c index 4fc846f77496..35bb12a062ec 100644 --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -725,7 +725,7 @@ feeder_chain(struct pcm_channel *c) /* Soft EQ only applicable for PLAY. */ if (cdesc.dummy == 0 && - c->direction == PCMDIR_PLAY && (d->flags & SD_F_EQ) && + c->direction == PCMDIR_PLAY && (d->flags & SD_F_EQ_ENABLED) && (((d->flags & SD_F_EQ_PC) && !(c->flags & CHN_F_HAS_VCHAN)) || (!(d->flags & SD_F_EQ_PC) && !(c->flags & CHN_F_VIRTUAL)))) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 6ed2d0c3ce5c..8015c8fc0c32 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -304,7 +304,7 @@ mixer_set(struct snd_mixer *m, u_int dev, u_int32_t muted, u_int lev) if (dev == SOUND_MIXER_PCM && (d->flags & SD_F_SOFTPCMVOL)) (void)mixer_set_softpcmvol(m, d, l, r); else if ((dev == SOUND_MIXER_TREBLE || - dev == SOUND_MIXER_BASS) && (d->flags & SD_F_EQ)) + dev == SOUND_MIXER_BASS) && (d->flags & SD_F_EQ_ENABLED)) (void)mixer_set_eq(m, d, dev, (l + r) >> 1); else if (realdev != SOUND_MIXER_NONE && MIXER_SET(m, realdev, l, r) < 0) { @@ -484,8 +484,7 @@ mix_setdevs(struct snd_mixer *m, u_int32_t v) d = device_get_softc(m->dev); if (d != NULL && (d->flags & SD_F_SOFTPCMVOL)) v |= SOUND_MASK_PCM; - if (d != NULL && (d->flags & SD_F_EQ)) - v |= SOUND_MASK_TREBLE | SOUND_MASK_BASS; + v |= SOUND_MASK_TREBLE | SOUND_MASK_BASS; for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) { if (m->parent[i] < SOUND_MIXER_NRDEVICES) v |= 1 << m->parent[i]; @@ -706,15 +705,6 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) name = device_get_name(dev); unit = device_get_unit(dev); - if (resource_int_value(name, unit, "eq", &val) == 0 && - val != 0) { - snddev->flags |= SD_F_EQ; - if ((val & SD_F_EQ_MASK) == val) - snddev->flags |= val; - else - snddev->flags |= SD_F_EQ_DEFAULT; - snddev->eqpreamp = 0; - } m = mixer_obj_create(dev, cls, devinfo, MIXER_TYPE_PRIMARY, NULL); if (m == NULL) @@ -762,8 +752,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) } if (snddev->flags & SD_F_SOFTPCMVOL) device_printf(dev, "Soft PCM mixer ENABLED\n"); - if (snddev->flags & SD_F_EQ) - device_printf(dev, "EQ Treble/Bass ENABLED\n"); + device_printf(dev, "EQ Treble/Bass ENABLED\n"); } return (0); diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 9eb2dffeb908..d98952d7a984 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -415,8 +415,7 @@ pcm_register(device_t dev, char *str) "mode (1=mixer, 2=play, 4=rec. The values are OR'ed if more than " "one mode is supported)"); vchan_initsys(dev); - if (d->flags & SD_F_EQ) - feeder_eq_initsys(dev); + feeder_eq_initsys(dev); if (snd_unit_auto < 0) snd_unit_auto = (snd_unit < 0) ? 1 : 0; diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 40deee32ea5b..7f89c1d14df1 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -102,17 +102,13 @@ struct snd_mixer; #define SD_F_REGISTERED 0x00000020 #define SD_F_BITPERFECT 0x00000040 #define SD_F_VPC 0x00000080 /* volume-per-channel */ -#define SD_F_EQ 0x00000100 /* EQ */ +/* unused 0x00000100 */ #define SD_F_EQ_ENABLED 0x00000200 /* EQ enabled */ #define SD_F_EQ_BYPASSED 0x00000400 /* EQ bypassed */ #define SD_F_EQ_PC 0x00000800 /* EQ per-channel */ #define SD_F_PVCHANS 0x00001000 /* Playback vchans enabled */ #define SD_F_RVCHANS 0x00002000 /* Recording vchans enabled */ -#define SD_F_EQ_DEFAULT (SD_F_EQ | SD_F_EQ_ENABLED) -#define SD_F_EQ_MASK (SD_F_EQ | SD_F_EQ_ENABLED | \ - SD_F_EQ_BYPASSED | SD_F_EQ_PC) - #define SD_F_BITS "\020" \ "\001SIMPLEX" \ /* "\002 */ \ @@ -122,7 +118,7 @@ struct snd_mixer; "\006REGISTERED" \ "\007BITPERFECT" \ "\010VPC" \ - "\011EQ" \ + /* "\011 */ \ "\012EQ_ENABLED" \ "\013EQ_BYPASSED" \ "\014EQ_PC" \