From nobody Sat Jun 27 09:55:56 2026 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 4gnSbk5JQRz6jHDh for ; Sat, 27 Jun 2026 09:56:02 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gnSbk1myQz46vR for ; Sat, 27 Jun 2026 09:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782554162; 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=BnaYdpUdtnroxqmnryRl/hpzcVkmbdp28IO8ed6JyK8=; b=b3cyDXjA2BKXEEiK+vGw42y+8+rGTu+dVmmygRkrjtHNGPELB68LCilBF6WppavYohUB95 A6hLMPCS8tR9iUFFBVATxmP7AitI5W7EEj06gB2epfjoKdDpnFtoIqdYjzevny5naObva9 t+SlFi9xbERCei+2VJn4HmqZIVYNSKKRcHGubSjkvkhrfm1uKs+H2KTs+g7MyT65uytBq4 jmmo6we6+M1eytbIkTvZsc/xNe5Z78YCsPa5b7ND4zUbIHIXR9L3WjF4ClGGFC0sE5pRBJ GpDwtvUSYXId/NnxQ2ZJmRkaZ8CyC23545U+xicSt1Vpi+CbuBm2EQpgPsu77Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782554162; a=rsa-sha256; cv=none; b=EoNgC5c9ni1rpg9eUxW21wVx8hL/jmgCXY/8j9kAthbFy25ALotzFRClmyU9xRYXIzYm/U /HBx2f79HbqLNCFFrRj2OMbMSTTxy5bC5oBrIBBcY8raoz+9B7RGFuREfILWJwrkFTQR8v JFRdN1H937lT1W71N7lNXP5trveB7R5FDtzy0y2OGN6zMEmp4OB/tQJxbRjwr4JLkrEic8 c55c4t8/4IX1d2TeH3AMH97MnD+m4BGo6vHIK/lD4L9enmuGhidn5xdMsCiDYHieY9Kv8q PWCXMdZGT0/+9fch34HeEXdsStfBSqJ8zicHjItb43CbKGcm8Enk8aieiGqR2A== 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=1782554162; 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=BnaYdpUdtnroxqmnryRl/hpzcVkmbdp28IO8ed6JyK8=; b=dtGfCG1BJly7kXwfXhKznOVAv25o/4GU38YUfeIZaHY1YRCV8wzGp+5xAQN8//9CV1qalP KXPjHw6UlppHawN3DRKiGf38rkLtfog7ABmYLHJUajuw1SpzydDkC1kdYmmdnXirjAWKFm 3XcSgk+tjp+hfDlyfvzLHD3q3OV9vF1GOwl+UypeoONiFRqODxzbUlTF/B7r5IfO4tbcDw sIMB9z+S/8Zw+2Gkxi4Mkxvk+s1FWgn+0NRwrfRzVPAnMyW82Z3JqGUgW55L/XZ7t4HLnO AwN/oUKZs84O5DJRPXlqzLdlnYNHQTuI5R4ihiqmrAnl7mOwmXA1BHzilewtpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gnSbk0mfWz3wt for ; Sat, 27 Jun 2026 09:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30eb1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 27 Jun 2026 09:55:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: e9df33a044ec - stable/15 - sound: Retire SD_F_VPC and related settings 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: e9df33a044ecd34f4b007f70a1416b0d0544321e Auto-Submitted: auto-generated Date: Sat, 27 Jun 2026 09:55:56 +0000 Message-Id: <6a3f9e2c.30eb1.59fe67ac@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e9df33a044ecd34f4b007f70a1416b0d0544321e commit e9df33a044ecd34f4b007f70a1416b0d0544321e Author: Christos Margiolis AuthorDate: 2026-06-20 17:32:21 +0000 Commit: Christos Margiolis CommitDate: 2026-06-27 09:55:19 +0000 sound: Retire SD_F_VPC and related settings VPC is enabled by default, and the only way to turn it off is through a loader hint. That being said, there is no benefit to turning it off in the first place, because VPC provides more fine-grained volume control, as well as access to the SNDCTL_DSP_[SET|GET][REC|PLAY]VOL ioctls and dsp_ioctl_channel(). Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit f70a687bb071cdee60dc7420d75fa1dd122af51a) --- share/man/man4/pcm.4 | 22 +--------------------- sys/dev/sound/pcm/dsp.c | 2 +- sys/dev/sound/pcm/feeder_chain.c | 4 ++-- sys/dev/sound/pcm/sound.c | 4 ---- sys/dev/sound/pcm/sound.h | 4 ++-- 5 files changed, 6 insertions(+), 30 deletions(-) diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4 index 14d7e52eed5d..7a0059f43f73 100644 --- a/share/man/man4/pcm.4 +++ b/share/man/man4/pcm.4 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 15, 2026 +.Dd June 20, 2026 .Dt SOUND 4 .Os .Sh NAME @@ -212,26 +212,6 @@ application, without touching the master .Nm volume. This is sometimes referred to as Volume Per Channel (VPC). -The VPC feature is enabled by default. -.Ss Loader Tunables -The following loader tunables are used to set driver configuration at the -.Xr loader 8 -prompt before booting the kernel, or they can be stored in -.Pa /boot/loader.conf -in order to automatically set them before booting the kernel. -It is also possible to use -.Xr kenv 1 -to change these tunables before loading the -.Nm -driver. -The following tunables can not be changed during runtime using -.Xr sysctl 8 . -.Bl -tag -width indent -.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. -VPC is however enabled by default. -.El .Ss Runtime Configuration There are a number of .Xr sysctl 8 diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 7e4b4ae2df24..0557b03484dc 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -542,7 +542,7 @@ dsp_ioctl_channel(struct dsp_cdevpriv *priv, struct pcm_channel *ch, int j, left, right, center, mute; d = priv->sc; - if (!PCM_REGISTERED(d) || !(pcm_getflags(d->dev) & SD_F_VPC)) + if (!PCM_REGISTERED(d)) return (-1); PCM_UNLOCKASSERT(d); diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c index 35bb12a062ec..1dbdf2fcc0e4 100644 --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -714,8 +714,8 @@ feeder_chain(struct pcm_channel *c) cdesc.dummy = 1; if ((softfmt & AFMT_CONVERTIBLE) && - (((d->flags & SD_F_VPC) && !(c->flags & CHN_F_HAS_VCHAN)) || - (!(d->flags & SD_F_VPC) && (d->flags & SD_F_SOFTPCMVOL) && + (!(c->flags & CHN_F_HAS_VCHAN) || + ((d->flags & SD_F_SOFTPCMVOL) && !(c->flags & CHN_F_VIRTUAL)))) cdesc.use_volume = 1; diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 235142eb5209..101b38367873 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -355,10 +355,6 @@ pcm_init(device_t dev, void *devinfo) cv_init(&d->cv, device_get_nameunit(dev)); i = 0; - if (resource_int_value(device_get_name(dev), device_get_unit(dev), - "vpc", &i) != 0 || i != 0) - d->flags |= SD_F_VPC; - if (resource_int_value(device_get_name(dev), device_get_unit(dev), "bitperfect", &i) == 0 && i != 0) d->flags |= SD_F_BITPERFECT; diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 06de95e461ec..becd787a456a 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -101,7 +101,7 @@ struct snd_mixer; #define SD_F_MPSAFE 0x00000010 #define SD_F_REGISTERED 0x00000020 #define SD_F_BITPERFECT 0x00000040 -#define SD_F_VPC 0x00000080 /* volume-per-channel */ +/* unused 0x00000080 */ /* unused 0x00000100 */ #define SD_F_EQ_ENABLED 0x00000200 /* EQ enabled */ /* unused 0x00000400 */ @@ -117,7 +117,7 @@ struct snd_mixer; "\005MPSAFE" \ "\006REGISTERED" \ "\007BITPERFECT" \ - "\010VPC" \ + /* "\010 */ \ /* "\011 */ \ "\012EQ_ENABLED" \ /* "\013 */ \