From nobody Sun Nov 03 19:04:06 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 4XhPCW1N7kz5cd6S; Sun, 03 Nov 2024 19:04:07 +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 4XhPCW0h6yz4rgM; Sun, 3 Nov 2024 19:04:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730660647; 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=WdJcgjHOdg/2z2FYm5AuTckO8pe4/BSGmWizY42QSNE=; b=QGun1Gmh1/AR1gKyG2ZITq39/Mb/PP9NRtpTJTRTp6zkT5Ql00HLQimiZ5zSEYkLcelDPX NcWi3IA1bR7TovHjB/Ccix7DMCLNJ12PqJPA1PN8fmCCRbp0oa9cx/q89/m2w10AXhsESv 9g3lfinkFlp5Zki+hMbkiJtlIgBbO+7P4AUmul2/vgZbpFkd2vxKR5q7e4Fuz9x2N+f27N CgC84eH/YL2c69V5AYpSCzpBWTHOtho+Y5agYw6IWM+RnwWpRuazg04ZVr0DXs8atL4y/F Is9ilhwwEv6GLpwr6OoMuZeOAUlgeH03Dshph8fLMKsU0UeKncgfrqPyQJ1nXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730660647; 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=WdJcgjHOdg/2z2FYm5AuTckO8pe4/BSGmWizY42QSNE=; b=QtX42ckWNgee94oIXKFw9NcIbQEuHYhBsa4zuQYdbdbNf3AGKVY/euv1hWoX75vLI3gsdE A6fAfMHZwLq1kqhvhjjDfh4S2J0eD7rA9dayUw0SfRPtEmSvapLwIWnR8O9Djrboxc+Qmd rPRaMC0IFpxls1q2nXhxuLKgGO6imbV1Sbj6cvGgk3pFfd2EEidkWlpFBk6vUA/GOelNxA NCR1FMOewPiQkClxRSIUiak9wCpAraeJ4zjq1CacBve7BeUdd4QouELvG94zJ76IDYBVPm nwHrx2plFcjjLGL5VIGLIiEhSZgLkY1xbhPxx8guIM/PqXKX87g37go9bQnGWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730660647; a=rsa-sha256; cv=none; b=qsNsoTavbuJYdQ1k3qH9mSvtnT4WZp9fG+UtPriUvhntLzDofhAMbXvurrMlEZycGH3E3g hBG51uG11QmdLxi/LAaR1KcnxUoJzWyOtg7oXPbV0ngu+vAABbxA3G31ZW3HQs7W0coDub AWPU+Ql6WjlCe/1aNDLi1vY9CysitLpDnW8f2GzyTELpNiNz0zIyRDn/4MVKctbhoOGGPQ 32lbaI3sju0WC7J5l4tfPMEKjotnvLaRut6eVLUWt6PLR2NHsBRN1e6R4DXfaFi7j8TPoK 1vBWFON6sLg5Pn0J7MXo6dJqGVCJu2k3MIqe8puTtcN0xyN5AeiL1HxtU6CJVQ== 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 4XhPCW0HQKz121X; Sun, 3 Nov 2024 19:04:07 +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 4A3J469M052721; Sun, 3 Nov 2024 19:04:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A3J46D3052718; Sun, 3 Nov 2024 19:04:06 GMT (envelope-from git) Date: Sun, 3 Nov 2024 19:04:06 GMT Message-Id: <202411031904.4A3J46D3052718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 98cd27c8e134 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 98cd27c8e13418fa517a02844641f390f9389987 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=98cd27c8e13418fa517a02844641f390f9389987 commit 98cd27c8e13418fa517a02844641f390f9389987 Author: Christos Margiolis AuthorDate: 2024-11-03 19:02:17 +0000 Commit: Christos Margiolis CommitDate: 2024-11-03 19:02:17 +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 --- 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;