From nobody Thu Mar 19 12:17:53 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 4fc4Tf5pWNz6V2Xl for ; Thu, 19 Mar 2026 12:17:58 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fc4Tf3hzbz3wFf for ; Thu, 19 Mar 2026 12:17:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773922678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a9axtZepJ+fcUNr8KGf7KIFhiyOCdN87g1Mi/CNJUzY=; b=fFIRse7H9KkrJgSXAxiyCnLs/IoK+AjPZzG7hZ4uzJmstdlqqv4FklwaWsx5guWU0VEsHy kUBlOUCZlj9WoZFIBtqFmiF+a/o5pc0hWm3F0APtSmyhonJM97h5FSkwepZsBXGGNay9Ja zt7u/uvjO9c6Uji831rwpETjyN2MHW5jWRwjtCB94r/hQ3KJGB4QJYMTd0zeXS5oOBiYND DedZ6m7O9KGuG+Yt8hS4uYpz6jB5dzrUcv9uBnt77kB2zm1VnfQ+CU0RFn4lhbTAZcjVtH P6jIi35YuhGFmvT6NLEDNctW5c2bNxsP/4+aRs3ylpP/j0g5bCeYP7wLJWffpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1773922678; a=rsa-sha256; cv=none; b=EIhsCrsBw/Hq/eiL7ftbZYTEPtCz+qCXo5FfjbbNnWr1nUA6htZq4ItnIF2iIS8Y9FoFve 3bKh2CYOl8gJz3BRjNVCds1KX1vWxMdzDwth9ktLFD7WDV5cMFlIEjmVFknYyE5HAztgUA CJHIrfENMAapVZ0ASHox2jZhrBPGXL67ChSNQ/QV83UntCHky/WRy4AyxEJrFXboBh8qye s7wVA2UWivfRigENYMS5qG5wL6jJp8Whm68VuRCuFNHPmjxsLoxYVRGfyOEc8KIAvTaign 7SEq1gfgKi2s5GDw/cSL/+EvjP1xyCd79GvXdG51RHUeKPk6bpq0l/WbgO1Lhg== 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=1773922678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a9axtZepJ+fcUNr8KGf7KIFhiyOCdN87g1Mi/CNJUzY=; b=VlT3kBsEnxlskqQFwESIgJvoY3qIR2LgriW+Es5jysU/ME88xwhyif/xaW5+Vb7/mvol0l 5b8fdHXANy2cZZT6CI5mHThFHlR7aagCEierYfCWZFKMeBGa0eSlVBRhRgdtJmG+o7Ud7F LMfecT2rENdee3UW4rKnqzFtZT/tU7RMzCpFpqaepkb4VfhfCBgxJhnogFwNo+x7NxLQym AN9RxVI2ra+Ytww1gV04Ykue/ppvAkNjPd2qzn9AbEuHjoYVUbBDqGCZ9yxodeCez4koQ8 plCJp+L7OLdKFjUbMcS9XTg6jgUOYzPlQHoQ9t128Te9gmaEARwiGUMCq9uXDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fc4Tf36nwzvNy for ; Thu, 19 Mar 2026 12:17:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33d0e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 19 Mar 2026 12:17:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Sean Farley From: Christos Margiolis Subject: git: bd5ce67416b5 - stable/15 - sound: enforce MASTER volume mute during playback 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 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: bd5ce67416b56d895c2e1a7f0497163c3814e982 Auto-Submitted: auto-generated Date: Thu, 19 Mar 2026 12:17:53 +0000 Message-Id: <69bbe971.33d0e.e734c4d@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=bd5ce67416b56d895c2e1a7f0497163c3814e982 commit bd5ce67416b56d895c2e1a7f0497163c3814e982 Author: Sean Farley AuthorDate: 2026-03-12 18:22:02 +0000 Commit: Christos Margiolis CommitDate: 2026-03-19 12:17:35 +0000 sound: enforce MASTER volume mute during playback MASTER mute (vol.mute) works while audio is playing. However, if a stream is stopped and restarted (PCMTRIG_STOP -> PCMTRIG_START), the audio will resume even though the mixer shows the MASTER volume as muted. Other streams that are already playing remain silent. New streams may also start playing audio regardless of the MASTER mute state. The volume feeder now considers the MASTER mute when determining whether a channel should be muted. This ensures MASTER mute is consistently enforced for all streams and removes the dependency on trigger-driven state propagation. Tested with Creative Labs CA0132 card. MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D55605 (cherry picked from commit ac5ff2813027c385f9037b47b2b164d4c1bebd09) --- sys/dev/sound/pcm/feeder_volume.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c index fc4ed1bbb0a5..e43b2594c7e0 100644 --- a/sys/dev/sound/pcm/feeder_volume.c +++ b/sys/dev/sound/pcm/feeder_volume.c @@ -242,11 +242,14 @@ feed_volume_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, { int temp_vol[SND_CHN_T_VOL_MAX]; struct feed_volume_info *info; + struct snd_mixer *m; + struct snddev_info *d; uint32_t j, align; int i, *matrix; uint8_t *dst; const int16_t *vol; const int8_t *muted; + bool master_muted = false; /* * Fetch filter data operation. @@ -278,8 +281,14 @@ feed_volume_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, return (FEEDER_FEED(f->source, c, b, count, source)); /* Check if any controls are muted. */ + d = (c != NULL) ? c->parentsnddev : NULL; + m = (d != NULL && d->mixer_dev != NULL) ? d->mixer_dev->si_drv1 : NULL; + + if (m != NULL) + master_muted = (mix_getmutedevs(m) & (1 << SND_VOL_C_MASTER)); + for (j = 0; j != SND_CHN_T_VOL_MAX; j++) - temp_vol[j] = muted[j] ? 0 : vol[j]; + temp_vol[j] = (muted[j] || master_muted) ? 0 : vol[j]; dst = b; align = info->bps * info->channels;