From nobody Wed Jul 10 16:48:59 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 4WK3j729xLz5QmjQ; Wed, 10 Jul 2024 16:48:59 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WK3j71f7wz4gJH; Wed, 10 Jul 2024 16:48:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720630139; 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=1bOGys8dtirk7SjOhzROneNTb8lBxiGRPlpXNEf2OTQ=; b=hjrIaaBuVWZ+p89XMeS5+FNPLqXunEU2ZOU4QNP+QlmKl2Hk9SwIYbv3uzcSGw4DRNX8iw i9SsgshCOgAWkXjm72qVoKyMHCa+PVVbHK84Dx4RLlLe/xi85jItyvkg4sqLXCEqAEonpj QXeHRk4MleOrrjoY8XK9hD2GduW27ymennBAyRv9/QAtD9rM0/eCRkApoCADQsCaU/NN/n gLVTLCWdg/kbAtI5NN3vCLiF8qup/c/IWoSiJjhv8vOcQTzc05k2Imbd9O9C5CNa9tY92r q/g6tH+tVSLgQQKOE064LFqsUKNfEJdf0gKIqi/Koqxah0+2l348lw1J/Jpiww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720630139; a=rsa-sha256; cv=none; b=td7U23F2Km0a724CnVEf9WxHHWsWLj2qL8Q2czuUggVzLabmTM5L4YjSXY3JAMc1oPtcey PFsdn0bGdjGmu4Jtw5xbJ1xlUYzvtp+0E/tek9Ph8DEM2FimddOqXUtGCx8mV6WRKzL1zq gLQFS8OwLAAy9OEegIcUxxaMiGIWq63TDwShuYKR9r9KY/Wk9cXQo7ptM/5T1Sh27jLvHs 5TRyLAGAtBKs5RshN4o0zuvcNp98UoXxScFKPqm8cUVGLJbKOjvq+VEssOAQ5EH9zCY/Dy NnELEX8TugkiafILE6qJ8GdzG/dbLzDoE2dnPvoY9/1mLm5mvkMM+3bq/oI9GA== 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=1720630139; 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=1bOGys8dtirk7SjOhzROneNTb8lBxiGRPlpXNEf2OTQ=; b=EfKuPAmUcONKLw0o9WkvcvGguX7qFFD2S2A/l5WSi9h+IrqO49hBt456Szpvv222AXd6Or 88sTX2z0Syd+Vkgw2Snp7i0j66hYEVk5HY6da6zWpr4jyaz3PJ/POrKV2MdG0uGfkOP8DM dQRvqL1OhSOpHLuAKA7Ic8r/w59gqAJ9pXHUKTzUPg1sbro/AEzhOvZVsut1Zsuj9GmzRd 2LLVMaeUNloEIMJNGmwn9fCEvtfh38KH6lqEka1rwyRW3z4YPH0mKxrVRnXWmGAKuOX/VH vPcgtmsqYv/q7lpj4W+RkzcL7OUCUBYm3qa4KTMTpK/beOIY3GLdUp+i3sM8/Q== 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 4WK3j71FYDzQFv; Wed, 10 Jul 2024 16:48:59 +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 46AGmxI4034660; Wed, 10 Jul 2024 16:48:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46AGmxkj034657; Wed, 10 Jul 2024 16:48:59 GMT (envelope-from git) Date: Wed, 10 Jul 2024 16:48:59 GMT Message-Id: <202407101648.46AGmxkj034657@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: de8161712e23 - stable/14 - sound: Get rid of snd_sb16 workaround in vchan_create() 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: de8161712e2349554529be24c9146a642e282953 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=de8161712e2349554529be24c9146a642e282953 commit de8161712e2349554529be24c9146a642e282953 Author: Christos Margiolis AuthorDate: 2024-07-06 18:22:16 +0000 Commit: Christos Margiolis CommitDate: 2024-07-10 16:48:12 +0000 sound: Get rid of snd_sb16 workaround in vchan_create() The snd_sb16 driver was removed in 716924cb4832 ("Retire snd_sbc ISA sound card driver"). While here, simplify sample rate assignment a bit. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj, emaste Differential Revision: https://reviews.freebsd.org/D45662 (cherry picked from commit d6d4586b0b7e3b01812e6c26818af78bf9b680a3) --- sys/dev/sound/pcm/vchan.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index 528c6fa62621..fa4fa2023b71 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -768,25 +768,10 @@ vchan_create(struct pcm_channel *parent) &vchanspd); CHN_LOCK(parent); if (r != 0) { - /* - * No saved value, no hint, NOTHING. - * - * Workaround for sb16 running - * poorly at 45k / 49k. - */ - switch (parent_caps->maxspeed) { - case 45000: - case 49000: - vchanspd = 44100; - break; - default: - vchanspd = VCHAN_DEFAULT_RATE; - if (vchanspd > parent_caps->maxspeed) - vchanspd = parent_caps->maxspeed; - break; - } - if (vchanspd < parent_caps->minspeed) - vchanspd = parent_caps->minspeed; + /* No saved value, no hint, NOTHING. */ + vchanspd = VCHAN_DEFAULT_RATE; + RANGE(vchanspd, parent_caps->minspeed, + parent_caps->maxspeed); } save = 1; } @@ -795,10 +780,7 @@ vchan_create(struct pcm_channel *parent) /* * Limit the speed between feeder_rate_min <-> feeder_rate_max. */ - if (vchanspd < feeder_rate_min) - vchanspd = feeder_rate_min; - if (vchanspd > feeder_rate_max) - vchanspd = feeder_rate_max; + RANGE(vchanspd, feeder_rate_min, feeder_rate_max); if (feeder_rate_round) { RANGE(vchanspd, parent_caps->minspeed,