From patchwork Thu Sep 5 14:12:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 13792438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E53ACD5BC7 for ; Thu, 5 Sep 2024 14:19:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IcCu+DWFXbg2fAQ79jKiLK8pzJONU6/x+rmv87WbABM=; b=lg4AkfybZx8cJ8pfxprrL2gbJm iYBOF8sDUkhuB88AMc7iTmB/yqbBUDLQtEWkPwuH7aOw9mZWgywDgT+FLw+UtdE6E4DsNNHycQc3Y rWvDtr6Ai3oaQgpuLzIoV9Z8VO/n/C0cO/osnVr/enM1VCtARFn1oP9jD+MNHGmVomklqXhEtG3hK AJ1BAgWWYZmLJEe9Ilqc4cUofku7HQBAycChWRXg3zFqQbWlRcTv5Br4vt6yHG/iKyvZ+Z+JtwOLj j0j9lLCe93zsEFAsjdmbKL4ONPFJ1RWdD8CZMga/WnnXxkRfvd+N6lBGocNt37Yp544yG7hiUvHjj U2rWk3Bg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smDKY-00000008gak-3HHV; Thu, 05 Sep 2024 14:19:26 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smDEx-00000008evD-1GAT for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2024 14:13:40 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-42bb81e795bso6816195e9.1 for ; Thu, 05 Sep 2024 07:13:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1725545617; x=1726150417; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=IcCu+DWFXbg2fAQ79jKiLK8pzJONU6/x+rmv87WbABM=; b=KroQCjtZ8pJjKBTsxmKF8SagC6+2YYQYOTnd0IG85EXEANERbZn5QZhQxu+gqYVmZP 838gGfuB/xO161uSG9nB/NtY5pAHJoI0H6GP//zd0TNH6AE1Kp1TU7PuLymSrUlQXcJw yuQFtGhjyCj+AiljfuAJeUCZZ3xeo9VSomMialxdfUdJYwxxFNrksynZsU0B1Zqc1JYW ATqPuYKK/9wHNRp/U45oK99v4QUL9eiikd9LFkCeweTIFTPeWopfIKHw0xjLuAuTduGA fq+ibKzfm8h51Tj9SyW3UqmPQH7C74bMLa2V5U1IV9DVIBfvCg6BqvMHgYXar4Fnfggb 4DaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725545617; x=1726150417; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IcCu+DWFXbg2fAQ79jKiLK8pzJONU6/x+rmv87WbABM=; b=YqSAob6uJJLc2M7SOjGg6Za5bZ3AsS/BGMhaRQMf/g2NNA2je8UV1Mu1Xj+eiiPXBl fHxbKTDLsPcNc+q1l0FOv2hhAW+e+aOnnK4UMNy+1CggxjX8pfeV1Xt1ptU+Bjgkmgm3 TKl0TXX4uvw2PveZgLLk7PXSt5wUgxrM81SllbusvTCG0Z9hCQyWKGJINf08NYerKbJa xXySEQ8vCPGDg9fKxLn0nqGNc0Bdjz7P4nLkIpGWV2d+eH0ZfcdXdUingGdzyzEjoBIR y+GV5Q3u+XNuerGolmUCo56J4tHd2MRAKA+EN8p+HQ4EWamIMBxXFoXnTBKhpvH9rAY4 mnag== X-Forwarded-Encrypted: i=1; AJvYcCVYN+hOE9NMDQ4rCno/AfiF7OPoTrkMlQ/26i3G8k1pvlYRW+mFKL5TtWIkZoZxuKl5YxwqDW2zYvAISE7ScYfF@lists.infradead.org X-Gm-Message-State: AOJu0Yx4hrSAMVhF2TAkMJIyyVvXmKHJY+Jr5DANKm3sHhAnsU3kr7KB XkBEJ1KjI3KvqX3oHnQGt8n1nSFPvrgwi6WffI0YThiBvQg7aQ79OoiFRlcW9sk= X-Google-Smtp-Source: AGHT+IFIEHR55riZlgeQGJQjXuyOXmmTN+5SiNQQq3UpC9AB9eRnK6WUg+y3HQedvVtwF3WTVV2akQ== X-Received: by 2002:adf:fa4c:0:b0:374:bb1b:d8a1 with SMTP id ffacd0b85a97d-374bb1bd9c6mr11130169f8f.13.1725545616938; Thu, 05 Sep 2024 07:13:36 -0700 (PDT) Received: from toaster.baylibre.com ([2a01:e0a:3c5:5fb1:4763:343b:23f3:f45]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-3749ef81146sm19514621f8f.82.2024.09.05.07.13.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 07:13:36 -0700 (PDT) From: Jerome Brunet Date: Thu, 05 Sep 2024 16:12:56 +0200 Subject: [PATCH 05/13] ALSA: hdspm: drop SNDRV_PCM_RATE_KNOT MIME-Version: 1.0 Message-Id: <20240905-alsa-12-24-128-v1-5-8371948d3921@baylibre.com> References: <20240905-alsa-12-24-128-v1-0-8371948d3921@baylibre.com> In-Reply-To: <20240905-alsa-12-24-128-v1-0-8371948d3921@baylibre.com> To: Jaroslav Kysela , Takashi Iwai , David Rhodes , Richard Fitzgerald , Liam Girdwood , Mark Brown , Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Srinivas Kandagatla , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Jerome Brunet X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1580; i=jbrunet@baylibre.com; h=from:subject:message-id; bh=Xv0vuHB6OmJEPDWj7YbALy0svxpRq+MGIQhgNIVXe28=; b=owEBbQKS/ZANAwAKAeb8Dxw38tqFAcsmYgBm2byBQJXpw0tKm9S1aoNQuw0gFMk22/TxwdNAJ DQo1OePFpeJAjMEAAEKAB0WIQT04VmuGPP1bV8btxvm/A8cN/LahQUCZtm8gQAKCRDm/A8cN/La hb6CD/44tlADSXvh8LtznvSCnCRWDjibNp3ZPrngVla5rHZENvj/3bhJd4z2yqP+n5D9sGXGqDG 4xNTMjbtLBxWXfJQTNFD1EkV6IIjuGJvW0i5NwXFyIS34ysoOE0hI9Q8FqVDCddEonzuY7wcjy5 RnJBiUvZoKOO9WcpWEP3gm0VGniXudhEWa0SBL7G3ojs3j7TOXDF1Mceym7wTQKYJGZlZDCUohC H91vxd6zdshPH/qzyMI9jqGpjwkqY2lpHww/KZ9tQqPpy2VS2MXPgl4llQyPpIxxvbcQj56iZcR CsjdRZRWF4PE/aTCl1T8mbSUU/XmInE7C+yqydfXqxp0jd0vFsy8ZojjGp6JDfs6NgGn16EYbS6 ViY4U2XOqdcXgXkg8ttNgs6JaEhjx1XrkRddp7NYnj11EVJIwwo/zODYBuBCYZJNSctuqG3MvJG IxM9AEefJBxIgyfUskHexjjJBa6NJhU/6ux0FNEN/ukrTRbxmCOFacv1jZ+uqo2BL71xYSl8GNq oAny7kUhtzHYyMG7I8Ifp0TH9qEtXeY5QApAGE+oIPYKpe8btMam/nMJCyBhUY7PotLSrYd97T2 yQ+H8YXAew9HF16sTUciTp1/QB5QSU3YEVOEMQOpwc/MS7pQvwWhwZQonuGU/QQHJOQwvSsMelf DIHwWZKP7oiAz4A== X-Developer-Key: i=jbrunet@baylibre.com; a=openpgp; fpr=F29F26CF27BAE1A9719AE6BDC3C92AAF3E60AED9 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240905_071339_411259_274EB564 X-CRM114-Status: GOOD ( 12.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The custom rate constraint list was necessary to support 128kHz. This rate is now available through SNDRV_PCM_RATE_128000. Use it and drop the custom rate constraint rule. Signed-off-by: Jerome Brunet --- sound/pci/rme9652/hdspm.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index c3f930a8f78d..dad974378e00 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -6032,18 +6032,6 @@ static int snd_hdspm_hw_rule_out_channels(struct snd_pcm_hw_params *params, return snd_interval_list(c, 3, list, 0); } - -static const unsigned int hdspm_aes32_sample_rates[] = { - 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000 -}; - -static const struct snd_pcm_hw_constraint_list -hdspm_hw_constraints_aes32_sample_rates = { - .count = ARRAY_SIZE(hdspm_aes32_sample_rates), - .list = hdspm_aes32_sample_rates, - .mask = 0 -}; - static int snd_hdspm_open(struct snd_pcm_substream *substream) { struct hdspm *hdspm = snd_pcm_substream_chip(substream); @@ -6096,9 +6084,7 @@ static int snd_hdspm_open(struct snd_pcm_substream *substream) } if (AES32 == hdspm->io_type) { - runtime->hw.rates |= SNDRV_PCM_RATE_KNOT; - snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, - &hdspm_hw_constraints_aes32_sample_rates); + runtime->hw.rates |= SNDRV_PCM_RATE_128000; } else { snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, (playback ?