From nobody Sun Nov 03 19:04:10 2024 X-Original-To: dev-commits-src-main@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 4XhPCb0hkcz5cd6Z; Sun, 03 Nov 2024 19:04:11 +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 4XhPCZ3kTNz4rgf; Sun, 3 Nov 2024 19:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730660650; 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=Qeises+x6rCn8ZEnJ/mFVmumfK0nGKxDLH14fA2Tve8=; b=mFhbn5Jh2c78TiM2pWs4oQ643/FN3TGm78c/iZTIfHFF6gCBxXStFoZCN+3S/h/vvaCSn3 zd8e9VFTQcNBz5/O9PFCCFwwxo/HffMVeKUIBXlnJUMzyPPVQ+I5wY8zYppfh/AWanuNG6 Bln6N1zkdS/pO+cymdu+s06A72+VFfHG2c8RzGpVeCcXAJ+9BFZnOpPC1JumlrvCUgZsNX JEOKV9SPWP/3l5WAJ6UVgp5P27L8mzQI1QLjJ4s73YIqOSM42mhqnVrh3J1vnm9OLqfmQ+ Qrqpvdkdjj+DnWWac7McxHlosCmAFpoY9xjJisDdicCEzol5/8yCN5mHa9BSfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730660650; 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=Qeises+x6rCn8ZEnJ/mFVmumfK0nGKxDLH14fA2Tve8=; b=eoaoY2gGNBMNpj/9MesuW0vs3GTtovj/vtSQNvzCE4IP82xVac1NQ5i4Yf8HCmkiUAHvYj v/bBcENrb3akjzqzph0qaqiahhntLj3lJBj8oZMPbWtaTMyogW76qxB6lg5No0DKCG/Pxx BOHcjjlNQ8CJlACAU8Szo6yHDHGaitzhTlGcnXiNDnShV4es2xEkGlSFZEUumvA5LqpoSE TfI0Rqq1N5Y4aS6qVrerhkOkCGIzhBm47dStckT8iaEk+gNUZGzcIC8cblnwD6rKMrc+9n kjeJKbtIWSaj+eVip2fUuH+eJyzc7dmIv6hMNnBN7zSRepX5F6TepGT4fCMIew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730660650; a=rsa-sha256; cv=none; b=P7Ar8sFptUhu4J0dBQloBKDEk0d2+zoP4OmgBAqZWvQzpbv4hRXrHRacAsgyegou9bW9Tx 1pnhyv1fX2DPoN5bQgiOAHo6DmGkmRVr1M2nTXCTpY5Y4qREo/iFXU8NQN3spoTDogt2Nh EMzTOe6Q7clz+hKV7pvR+TwIa0HuZbYQ/G0afB4miLGY/dXId43ugUOjZMuU1RO5afI/Uw nckVv9ClISEymmbdrVTiHuuUXSc6F4iGISzqd/bEXxR2Km4AtHa7CcnQK85JwtmLd6/XWF Mpz6+nvvq4sXJNdc1YB3D61BNWRO3clHchDJM3UoLvqNXgzINY3uZY4AMT6Ymg== 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 4XhPCZ3KT4z11rH; Sun, 3 Nov 2024 19:04:10 +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 4A3J4ADW052865; Sun, 3 Nov 2024 19:04:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A3J4AO0052862; Sun, 3 Nov 2024 19:04:10 GMT (envelope-from git) Date: Sun, 3 Nov 2024 19:04:10 GMT Message-Id: <202411031904.4A3J4AO0052862@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: 3a7d40c69262 - main - sound: Remove early SD_F_SIMPLEX and SD_F_AUTOVCHAN assignments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 3a7d40c692622cc614a3839491c345d945f474fe Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3a7d40c692622cc614a3839491c345d945f474fe commit 3a7d40c692622cc614a3839491c345d945f474fe Author: Christos Margiolis AuthorDate: 2024-11-03 19:02:43 +0000 Commit: Christos Margiolis CommitDate: 2024-11-03 19:02:43 +0000 sound: Remove early SD_F_SIMPLEX and SD_F_AUTOVCHAN assignments These flags are properly set in pcm_setstatus(), once the primary channels have been created. The existing comment already states that this is wrong. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D47324 --- sys/dev/sound/pcm/sound.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 3c4fb38fa4f5..e03bcab6d8fc 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -465,7 +465,8 @@ pcm_sysinit(device_t dev) } int -pcm_register(device_t dev, void *devinfo, int numplay, int numrec) +pcm_register(device_t dev, void *devinfo, int numplay __unused, + int numrec __unused) { struct snddev_info *d; int i; @@ -503,13 +504,6 @@ pcm_register(device_t dev, void *devinfo, int numplay, int numrec) CHN_INIT(d, channels.pcm.busy); CHN_INIT(d, channels.pcm.opened); - /* XXX This is incorrect, but lets play along for now. */ - if ((numplay == 0 || numrec == 0) && numplay != numrec) - d->flags |= SD_F_SIMPLEX; - - if (numplay > 0 || numrec > 0) - d->flags |= SD_F_AUTOVCHAN; - return (0); }