From nobody Tue Apr 14 10:31:54 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 4fw0vH3zkFz6ZZHG for ; Tue, 14 Apr 2026 10:31:55 +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 4fw0vH0bzwz3SHf for ; Tue, 14 Apr 2026 10:31:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776162715; 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=GjIb040dr6AL1kOVLLaBPtQdNUYgaq0sejyHwNNjooc=; b=qEd8/CbrkHl7VA8n/AtGXcEDweQKoGTdvTvNwbFcQUiy/33x7j1N4tAC0OovHhb3X9k2ph OgbYh65Sf7t0w3ZPSmeciKg1CBd163U4hnPdCD22Fm8UJTlr8y1dgUzdggI0UhIsILKETx d6UMjcwkkcMaV2BawTmqZ6iP4A6aFr8OGxUR33+ufODiFqPKzGMGXFZxfuDRzFfOpcnmdI Ecr9O1A+JgRSyk0w1KpcKlfHA7cbM2lAS4BFvvWoOHg+XdBAopN7pFoLemqdiX8iak7Mp6 vmWWaO2ZzYrpkgLMP847+YqULRc2+O7LGku3n3NGbufyyXusLQsDm4UkT6XeDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776162715; a=rsa-sha256; cv=none; b=SSkA2SiVvKkDFCqWsBuHw+k75eQvhu7Mu+TNT+pmzAOmDSKn3YmYNaJaqtQ+7UtZpaERvH ct2dJT1bYKKu6FHD/hZZaOUDxcDFwgQrMAqWeVH0Dj6Q8aC01DGi0NrFK3jACJOT7eEJK5 TVFvONMQ4BwRSldW0IaUzDQTq2WcyexXgxI9PeaPA89YGPRhtfKXSH3dh83CI8iMruFjwC t7GvENx0PQaLpg/K6n7FXdaxvkzQfgQnljSzVw2TUYexwKSN2vezWtvQR10Y8EsOCxkoBF RedCeKmXLY3lBy/ZMFenlU2xUIhlxjLh/2zkLYcslzmQqJj87WdqnzzbJCOvWg== 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=1776162715; 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=GjIb040dr6AL1kOVLLaBPtQdNUYgaq0sejyHwNNjooc=; b=vzd2jCwVRpwIFnTW/g4CbUEyw9SmBlMplZi16gelqU3PQPpD038AUCmJOfVF5cN9zinQRO eaOjZDhQz4UFy4+cTycfg9WkXd2R8tZPpGoujQSp95bMUPLgdWZDCtLzUookrmE+EOzUey iYwpQKw9b+IL02wfuY0QfxeIjuRguLYeV5ueYkPx70WGfChtNso17VY/Hy/CSuKhc6z+xm y3DQXWwEZohAZ0V0UcdmMjiclj/4aFbKs0dz6W/U5x3VmrI3jaqN9SxdibYE8TPP5lIZt5 RPEZuewB81CGyTZvWqd3JHLhupGNjtoMMhBEp5lBrOJVwdNh25AGcV9mxfDDCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fw0vG70K6zmxQ for ; Tue, 14 Apr 2026 10:31:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2617d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 14 Apr 2026 10:31:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 7bccc0df4bb0 - stable/15 - sound: De-macro array definitions in chn_calclatency() 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: 7bccc0df4bb003ecb955e252bd3d7717b067d4e9 Auto-Submitted: auto-generated Date: Tue, 14 Apr 2026 10:31:54 +0000 Message-Id: <69de179a.2617d.65f91da8@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=7bccc0df4bb003ecb955e252bd3d7717b067d4e9 commit 7bccc0df4bb003ecb955e252bd3d7717b067d4e9 Author: Christos Margiolis AuthorDate: 2026-04-07 15:44:34 +0000 Commit: Christos Margiolis CommitDate: 2026-04-14 10:31:43 +0000 sound: De-macro array definitions in chn_calclatency() Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56263 (cherry picked from commit 66a82f5fa471b8eda018b7566c3725a6742dfc0c) --- sys/dev/sound/pcm/channel.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 9b71d93ac7f9..0b940fe4e843 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1748,19 +1748,6 @@ round_blksz(u_int32_t v, int round) * aggressively through possibly real time programming technique. * */ -#define CHN_LATENCY_PBLKCNT_REF \ - {{1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1}, \ - {1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1}} -#define CHN_LATENCY_PBUFSZ_REF \ - {{7, 9, 12, 13, 14, 15, 15, 15, 15, 15, 16}, \ - {11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 17}} - -#define CHN_LATENCY_RBLKCNT_REF \ - {{9, 8, 7, 6, 5, 5, 4, 3, 2, 1, 1}, \ - {9, 8, 7, 6, 5, 5, 4, 3, 2, 1, 1}} -#define CHN_LATENCY_RBUFSZ_REF \ - {{14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16}, \ - {15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17}} #define CHN_LATENCY_DATA_REF 192000 /* 48khz stereo 16bit ~ 48000 x 2 x 2 */ @@ -1768,14 +1755,22 @@ static int chn_calclatency(int dir, int latency, int bps, u_int32_t datarate, u_int32_t max, int *rblksz, int *rblkcnt) { - static int pblkcnts[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = - CHN_LATENCY_PBLKCNT_REF; - static int pbufszs[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = - CHN_LATENCY_PBUFSZ_REF; - static int rblkcnts[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = - CHN_LATENCY_RBLKCNT_REF; - static int rbufszs[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = - CHN_LATENCY_RBUFSZ_REF; + static int pblkcnts[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = { + {1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1}, + {1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1} + }; + static int pbufszs[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = { + {7, 9, 12, 13, 14, 15, 15, 15, 15, 15, 16}, + {11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 17} + }; + static int rblkcnts[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = { + {9, 8, 7, 6, 5, 5, 4, 3, 2, 1, 1}, + {9, 8, 7, 6, 5, 5, 4, 3, 2, 1, 1} + }; + static int rbufszs[CHN_LATENCY_PROFILE_MAX + 1][CHN_LATENCY_MAX + 1] = { + {14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16}, + {15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17} + }; u_int32_t bufsz; int lprofile, blksz, blkcnt;