From patchwork Thu Sep 5 14:13:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 13792449 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 22F78CD5BC7 for ; Thu, 5 Sep 2024 14:26:20 +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=fVHTuNGWpcFrdg1z92VZwboxKWfkM9u5ktFj5pVRY10=; b=uvRcz8CJarCE/bstDmhGzecz1d Z8DRdmkOyxS5f8glr5j2se+fqYpn5hmc2BXoXp4CdxtOKfTUkAJZ9iWx75fxP6oYoS+q0slco/XfB cbPyBDbxxaMz8iXc2wwiAUWcQAQM0YR8XqoMa0TlEY9G9PMTVu2C84I8cBZG3wQ2LwgtUJI9V/0gK IPpej/JMdJPd97D+5w/so/wKDZ91SVj3ntQfGqjJFLY35+xwjU7MC6hEvpK3zTxOuahYn/oUaGeoj jbi9brwKDAFiEey+0v87kv/ObWzFHK4IwE0JtEMPSjI//5CjpRDB6qUgGSIIdunVPIirSB+RJhTHi Asj1WRQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smDR5-00000008hmV-07iO; Thu, 05 Sep 2024 14:26:11 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smDF4-00000008eyi-3kPw for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2024 14:13:48 +0000 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-374bfc395a5so529135f8f.0 for ; Thu, 05 Sep 2024 07:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1725545625; x=1726150425; 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=fVHTuNGWpcFrdg1z92VZwboxKWfkM9u5ktFj5pVRY10=; b=lDYDcEuRTrvye6miiWyI3B6vG/Y5DXYhaRSYbOtwzDYiKXT9JsMId+7K4BpLHP/oOX qKQBqoA45mXLorrNh0m4yhyl8ykxxiz9RYwuyoXBGHGdDQl+pu6w5FcXAUwaiXgHbN4u fVXIwqTGoAoh2vtYySqAsZw6M7o3/pvaNJTuNG1F7uieCT69e0SySuaX1VZggbJoVuQd 3bS5sKNCAMt8dHmE53YGsCJL75jBNQSBcR6hxPsxGAZ2V1PMmi7BAq6MNm42546hbESX qW4TrMfeLRJxqrFimOfa7I9gyBdOhTnhXa6kWKo/uAhC4pAzukWZ5kq1i8UNtKouIQT6 J7dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725545625; x=1726150425; 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=fVHTuNGWpcFrdg1z92VZwboxKWfkM9u5ktFj5pVRY10=; b=Yy3jgyamBc8cdwMP9wMjzHI4XA2a+W8OW/pFyyZc3KVXjJ13SZH83P0VsnhQ1ZXdn2 ddMe5RrgpSbao92m24PJjlMUdoRI9RllHNScTf9qL8I4yDLkL1IuP3oxyE+Crvz+Ebvw yvT/vcYDbVju46mHgkiRcpMXixUJenbxgC5JFHfXck8tv/TbRJvy1WGDOO5lq2cYwsqG M9NXmnMvp53QxFMnKiu+Hhq0/q2qy9C+/2q2Dk4PlxUvvgmP6bwy7zIW2oUqtXXVEGlc 43TEB5NCbrR4IteCG3Tc95XOR8HygzH5TcquGjLo2EqaEphEDOcs/bICeHVPHWSNScds Dnwg== X-Forwarded-Encrypted: i=1; AJvYcCXYKGKMC7zjh9d181PgcWxfUJlneuuly6kugH6Ao1+7uswL0RHFFuh4dxlqoRTuI0LsSoaQcPop2zy9HXIwUgrI@lists.infradead.org X-Gm-Message-State: AOJu0YxiD/vMEATtyYxzhZsScfTEWcD30WNNK/lnaSW/fqwjsumlBpQN aQU/CO9Mzbu/a9rympx7EZuI7q0idCt6KmzSUTXB3bOeFBaEi2aTyjiY/8NVT1Y= X-Google-Smtp-Source: AGHT+IHAt5Z9yvfW2N2+9sKeMO31xt1LKMyq74worjfNWzRpMuSL5RmIi0iCLuGFdoOTEvAgdLpsNg== X-Received: by 2002:adf:ee52:0:b0:374:c7cd:8818 with SMTP id ffacd0b85a97d-3779b847c99mr3905848f8f.22.1725545625178; Thu, 05 Sep 2024 07:13:45 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 07:13:44 -0700 (PDT) From: Jerome Brunet Date: Thu, 05 Sep 2024 16:13:03 +0200 Subject: [PATCH 12/13] ASoC: cs35l34: drop useless rate contraint MIME-Version: 1.0 Message-Id: <20240905-alsa-12-24-128-v1-12-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=1810; i=jbrunet@baylibre.com; h=from:subject:message-id; bh=zpT7vKk5RwGNqc2qh5o2gdsxY4SIBJHwPSpJGqPGkl0=; b=owEBbQKS/ZANAwAKAeb8Dxw38tqFAcsmYgBm2byHCu0z886qTeaxytjbJcYPUhvLKi6a5nmcQ KBa6BdBIQyJAjMEAAEKAB0WIQT04VmuGPP1bV8btxvm/A8cN/LahQUCZtm8hwAKCRDm/A8cN/La hWBED/9N7WEhGEgo9YoopFhslbk0WKky2qk9oskEHauCvF+Zre638/Xs1VKjHXi5gaW9DFsewCe 8BXQmpqic/g4g/KZ1bSU1gtRPJzWuQUM2sbKRbPjwKl3ZjZY3skXMdvGDktmbmAUEjQfWYyaHGp Mx+5cb9seHfCb9CfRzA7CBAiPP9QKgLirL/w73Efii1rED79nzvGyZyiUotDKkV5jCOn6FQJumq 2kH2l4bM25BHOjvqtDCybOuKSbj7gxcC5aHitquhM9xq+pLrqkhPRa6z442lqP0GQNio182qG6a tIc3t4wI1L3D0bmggbA+qpNban+Ue2uHEMMlamtUZvCv45CGzqAbASvy0/rEos+HTWwVE0syyuL JpIFB4+crXOpQK5VoFJM1QBkYIHzuqFCN472OafDNVoVMS9d9QAQkn4UkaOoufUcAP3WZsBQ1wm QeWNgOVhBKM0MI9XohaVpY7JjPL2dzNlkWnHTFmWKBrew3BfxxImdzNm3eNalKpVXBQHwQJ3di8 26bAL9glcTCmq2VhAatgJCb3Xnuml1EF8l9LtKVa58KbBQRytqxBms114Bu0XK0mS1EzsfGzgLT a3nLAh2/+yq1IsqtNqQxdX9kmziJfWm6CZAgMhKfP3/5UJTczHgjPwpCTCZ222w1+iJ0I5R4BP7 cbzeB5PHdHllGJw== 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_071346_983955_0500E8A8 X-CRM114-Status: GOOD ( 14.15 ) 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 cs35l34 adds a useless rate constraint on startup. It does not set SNDRV_PCM_RATE_KNOT and the rates set are already a subset of the ones provided in the constraint list, so it is a no-op. From the rest of the code, it is likely HW supports more than the 32, 44.1 and 48kHz listed in CS35L34_RATES but there is no way to know for sure without proper documentation. Keep the driver as it is for now and just drop the useless constraint. Signed-off-by: Jerome Brunet Reviewed-by: Charles Keepax --- sound/soc/codecs/cs35l34.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c index e63a518e3b8e..287b27476a10 100644 --- a/sound/soc/codecs/cs35l34.c +++ b/sound/soc/codecs/cs35l34.c @@ -562,26 +562,6 @@ static int cs35l34_pcm_hw_params(struct snd_pcm_substream *substream, return ret; } -static const unsigned int cs35l34_src_rates[] = { - 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 -}; - - -static const struct snd_pcm_hw_constraint_list cs35l34_constraints = { - .count = ARRAY_SIZE(cs35l34_src_rates), - .list = cs35l34_src_rates, -}; - -static int cs35l34_pcm_startup(struct snd_pcm_substream *substream, - struct snd_soc_dai *dai) -{ - - snd_pcm_hw_constraint_list(substream->runtime, 0, - SNDRV_PCM_HW_PARAM_RATE, &cs35l34_constraints); - return 0; -} - - static int cs35l34_set_tristate(struct snd_soc_dai *dai, int tristate) { @@ -639,7 +619,6 @@ static int cs35l34_dai_set_sysclk(struct snd_soc_dai *dai, } static const struct snd_soc_dai_ops cs35l34_ops = { - .startup = cs35l34_pcm_startup, .set_tristate = cs35l34_set_tristate, .set_fmt = cs35l34_set_dai_fmt, .hw_params = cs35l34_pcm_hw_params,