From nobody Tue Nov 05 21:45:32 2024 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 4Xjhhr1Tm3z5bfHw; Tue, 05 Nov 2024 21:45:32 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xjhhr11KVz4fT1; Tue, 5 Nov 2024 21:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730843132; 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=ZGLEOX/jzXA8bWl3BXPIln0U0ZUCZkveZcejEC4x4Eo=; b=WpLmWYmm5Qk7x78NoiP8x1GDXuzAlz4izAmsddd3R1iIjJ9tmeHMNeOuzCkBL14mhz2Vy2 WSYJE2Hdd0kFfQsMxP3FojSxqQ8ygyVdZOKuKXxRtFPq1bTjBnab4+1EUIalNjr7duHqaT /I/3axmGffPpbH+iyvkIkJHvQj3Kr99QPjEeKclOGnIz8/C15Xf57DxLB2fqmYPyrDkhmJ e8Hnb+oHYAsoCkgt7meWonzP4Cvq3DtLcPAGRSPmO5TBK/F0HW4CXT0okENAL47QTa89Fi VZPJx3bTkoCVt8VJ5GgUOmeCSYFuhKpelc5pa1QWArha9M/LHOjkYPAg2pE05g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730843132; 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=ZGLEOX/jzXA8bWl3BXPIln0U0ZUCZkveZcejEC4x4Eo=; b=d0Ym24m6Msz8OrKofTZLWldnjB2JDVzXv5IGR67PaB/wciDn8agDSjdOgHbGC+R3jhELNm Qkx0xkEdTMM5bKHyQRx5Yb84jwzQW7Z4fYtnspD6yFYKEL3Uh+R2Dvewgd4UzGn3YPAkDX ZT4qnR6lXcVc2yl+QjDYNdqu5b/fdHPdv3MAorE+H33ncAk20ArlugjEC2kFIZC65OtStK 2TISTZnnjcrSd6mpafZEAP5iCB918RX7PFFUXlzWUtj1InCI3igLLsb3bSU7QTWKQybbOG wqP5qQVW5O48kepQa13bhro9sgPNesTK8XgVjO3Ntz0OPsa1US3LBSSvutBXDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730843132; a=rsa-sha256; cv=none; b=JAJDgLraH+Yjn/2AvYmTvOsq9ay2ruz9h127cBI5LIcK2jg0U0XdZuGL1jQwvVbkQR7ert pf+PaNosvGH/6N/fgMeXI1WcNpSQ320yTzy5rS5+s57XLCEWNFNHakhcPzZGSd78fDQZgV p0qIMBqkke7SR5ttyE3mRu6jnJf4OrcYSavQkxctdP6D3WgiSLyB7CdM7VOoj1upGwb4Re 4xLcfDs8vtRtvgsE1r+LDM1EaK/ke9+V64+ZFo4bqkDiL+cRtFgo3kSfV0FnbQjMul98Wi OG/qla/CPsrH+qmL55V6sJy57akyBVplofJRzVVtKxlLjzKO5/WTr4m7/ujNAA== 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 4Xjhhr0cVBzZK0; Tue, 5 Nov 2024 21:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4A5LjWwN095393; Tue, 5 Nov 2024 21:45:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A5LjWp3095390; Tue, 5 Nov 2024 21:45:32 GMT (envelope-from git) Date: Tue, 5 Nov 2024 21:45:32 GMT Message-Id: <202411052145.4A5LjWp3095390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 3dace161c237 - stable/14 - sound: Retire pcm_veto_load 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/14 X-Git-Reftype: branch X-Git-Commit: 3dace161c237069d954bda743e6c734df27ef274 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3dace161c237069d954bda743e6c734df27ef274 commit 3dace161c237069d954bda743e6c734df27ef274 Author: Christos Margiolis AuthorDate: 2024-11-03 19:02:17 +0000 Commit: Christos Margiolis CommitDate: 2024-11-05 21:44:41 +0000 sound: Retire pcm_veto_load pcm_veto_load is used to prevent pcm_register() from running if the root feeder has not been registered yet. However, feeder_register_root() is a SYSINIT. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj, emaste Differential Revision: https://reviews.freebsd.org/D47280 (cherry picked from commit 98cd27c8e13418fa517a02844641f390f9389987) --- sys/dev/sound/pcm/feeder.c | 7 ++++--- sys/dev/sound/pcm/sound.c | 8 -------- sys/dev/sound/pcm/sound.h | 1 - 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 2b9599859102..6a6d8c80a34a 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -68,9 +68,6 @@ feeder_register_root(void *p) fte->idx = feedercnt; SLIST_INSERT_HEAD(&feedertab, fte, link); feedercnt++; - - /* we've got our root feeder so don't veto pcm loading anymore */ - pcm_veto_load = 0; } void @@ -465,6 +462,10 @@ static struct feeder_class feeder_root_class = { .desc = NULL, .data = NULL, }; +/* + * Register the root feeder first so that pcm_addchan() and subsequent + * functions can use it. + */ SYSINIT(feeder_root, SI_SUB_DRIVERS, SI_ORDER_FIRST, feeder_register_root, &feeder_root_class); SYSUNINIT(feeder_root, SI_SUB_DRIVERS, SI_ORDER_FIRST, feeder_unregisterall, NULL); diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index e25cb359f793..948cbd0b8fb9 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -48,8 +48,6 @@ devclass_t pcm_devclass; -int pcm_veto_load = 1; - int snd_unit = -1; static int snd_unit_auto = -1; @@ -462,12 +460,6 @@ pcm_register(device_t dev, void *devinfo, int numplay, int numrec) struct snddev_info *d; int i; - if (pcm_veto_load) { - device_printf(dev, "disabled due to an error while initialising: %d\n", pcm_veto_load); - - return EINVAL; - } - d = device_get_softc(dev); d->dev = dev; d->lock = snd_mtxcreate(device_get_nameunit(dev), "sound cdev"); diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 126b3411b035..c5013e76034a 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -229,7 +229,6 @@ enum { #define DSP_DEFAULT_SPEED 8000 -extern int pcm_veto_load; extern int snd_unit; extern int snd_verbose; extern devclass_t pcm_devclass;