From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AAF0A2C325C for ; Thu, 15 Oct 2026 01:46:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792028818; cv=none; b=De72Mzr87qh3kiFFpZnZ0nNJqWp3Ox4vWx5YCRpta5FYHuF0dIS+EaHgDF+7Bmwp4xTJtiB60Kzuuets1pEAXZzCdHoAyJCZQQYlx3TNw6MW0ZYl42KVZ1G2pQILNtopubcN0tjXaYG3TAumpjpHZstMjVBN1h03KPtZEwatrAY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792028818; c=relaxed/simple; bh=b5pvZP3GD540pr000CqdgVuOT1MR9F2E/LPs2Mdzp0o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IQfP7lXHZHP2atk2ywLVVa/1qWrDus2mMVGVblhOa1O33LOX19K/BkAu0eWeYWiH2yUFmV7vp6QOL15YCDNeUZj68+PJi72sk+efM7MWe5hfGvnlrpYlxGqMir+7T1NIq2TKt4Bco17YB9+JMrGX1JLdMDBiq6jOiv7r0GuVYXc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Q84XSWo0; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Q84XSWo0" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2e608cd460eso25827785ad.3 for ; Wed, 14 Oct 2026 18:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792028817; x=1792633617; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=QkExA76YJWwf2po0CbLVw6mxayxnqBJKULe/shJjNF8=; b=Q84XSWo0DEsgzEvTBZPYWDvQmlZj98HTrjHckNaB9sJ3im+gKcKI4SAbErrUaXjrXh gq5azS5vjhaPe04Eqe7bmQoOc8pqEOyNThC85aJhgiGNreda4wwA0Ef7R78335FV8YE7 CupnDZsdb8Y2dqaK3GYujSjyLTjSP8icOYCRFe6oAucw11XjjyorIAwXIYRENd2IfOnj oKd5EFIKdP7TP/GDL4ju7DdsENwkYXIvWW/pA7dOUCKfyme6acoeYx2arhSb4X4alezg IqBCPNblTqngf4UENC0fkcGerY087feOfkZjJlb2TxXNNUkr9dSLQSeBs7K8cqfY7jUF xGQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792028817; x=1792633617; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=QkExA76YJWwf2po0CbLVw6mxayxnqBJKULe/shJjNF8=; b=tHayHCTFFSm+IVqUuAsLcuzOMQNF3bz8H/qd5qDgJXI12oLHMjQHGb0GFZaTMEw94P Ssqk8y0U0/4dxErg5W0DXLshHH5/chsJSx+cT1QzbLxUPuUZ9TTgukY/HDuTR3osSPJ+ /RiR8WZ3RBZL7Vu7+pK2aE6X+N5oBHgbtEPEtORrzLZYcwvYk4NKBc8iItHHytQx81Pv JO7NvR77Ur8UPNE9vnz4O3Z9QVGDpaLlIqV12V3FCy5CZCd6/04kMX8fYUmpAuV43+Er bonivW3ECAVi2eWEW1K6/I8mImuMDo0yygTRu1Aqh8DMjegYjgZeifCJKWT3kXZfygx1 9uog== X-Forwarded-Encrypted: i=1; AKwUvBwCoR8KFuc1YkdgCiuw6NSv5XELmir7vb7XLPTuEMOlIw2kp2KCGXmomXk3nRAQ4wTvU4/FRA==@lists.linux.dev X-Gm-Message-State: AFq9FYLQ9QETMjFG4ra9DddRSj6rqrkNxooBTzj8XuoM0i7Ok9OjbFgc n+QZjSQUD+1GEOzcz6cFOkAlNA+b2CH0zGDlWXldIiv3aHirbHbOZ1c9 X-Gm-Gg: AYBFou04VreCJn9iX611mj+tSn2pxCBKUgM6GO7FKhlrG2g9iWyiP8yRIeLMzhzsbEE HmwOGFoMQXFmlEbTs5651Ak70wDDDlJ+5BzCYrJ+ZV72VW1shhJQpCw+ov/oxj7IW0fX7aOnE49 vsrclJT8/D3kaHYMfYKJvcXopM/Yv7lrws3UFXSsj9yQAVLnJRJU8NUMCfCnHD8r0ff1OYGqJA0 hF7U3AV6FzeOaXacG6tnwhhHI3/NXZwZYH5QXx62nYvl7f6S6uF6gcGHyUQujKMY+sOeytRHX6Z M8vgCmE2OFrMhZ31KcrTI2ZpI1weHTligDFm5utJHzI/teNB+XPcVCQLJB8j5za+udWJ0juYWLw NBrfUvJW8fcaNgeojU135jROnFNHEOa/e0QgLmOIy4RydGwclgIT0RF4l8neW0lLvNVFOzX5Wf4 9Nfi32pX9MMgp25s9k0bdXYwleumRjgbkfW7XvovXwOBd3vWOK0RQ2NVZAohIZRbQTc/qg17EB+ +UwGBG1AfAQIcsmPPr/E8PyEmHgIATlyT1IBrUVmL94DlRU6GUGqHHjmPupuNp489nhiYTfK3zW nizVCI/SWeeJe2fgd0cGxt3O X-Received: by 2002:a17:902:ebca:b0:2e9:401f:f0f4 with SMTP id d9443c01a7336-2e9401ffb38mr25578395ad.16.1792028816992; Wed, 14 Oct 2026 18:46:56 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e8422b8cc1sm73202995ad.54.2026.10.14.18.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 18:46:55 -0700 (PDT) From: phucduc.bui@gmail.com To: Vijendar Mukunda , Venkata Prasad Potturu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , povik+lin@cutebit.org, Claudiu Beznea , Andrei Simion , Nicolas Ferre , Alexandre Belloni , David Rhodes , Richard Fitzgerald , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Cezary Rojewski , Peter Ujfalusi , Bard Liao , Kai Vehmanen , Pierre-Louis Bossart , Kuninori Morimoto , Geert Uytterhoeven , Magnus Damm , Biju Das , Lad Prabhakar , Heiko Stuebner Cc: Kees Cook , Syed Saba Kareem , wangdicheng , Chris Bainbridge , Linus Walleij , Charles Keepax , Neo Chang , Krzysztof Kozlowski , u.kleine-koenig@baylibre.com, Pengpeng Hou , Cristian Ciocaltea , Hemanth Selam , Md Shofiqul Islam , Bjorn Helgaas , Zain Aboobacker , Sang-Heon Jeon , Bo Shen , Vinod Koul , linux-sound@vger.kernel.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, patches@opensource.cirrus.com, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-rockchip@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, bui duc phuc Subject: [PATCH v2 11/25] ASoC: codecs: nau8325: Ensure the DAI is marked as started on success Date: Thu, 15 Oct 2026 08:43:10 +0700 Message-ID: <20261015014324.5569-12-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261015014324.5569-1-phucduc.bui@gmail.com> References: <20261015014324.5569-1-phucduc.bui@gmail.com> Precedence: bulk X-Mailing-List: asahi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bui duc phuc snd_pcm_hw_constraint_minmax() may return 1, which is then returned from nau8325_dai_startup(). ASoC only marks the DAI as started when .startup() returns 0. This currently has no functional impact, as nau8325_dai_ops has no .shutdown() callback. Still, return 0 explicitly on success to match what ASoC expects and ensure the DAI is correctly marked as started. Signed-off-by: bui duc phuc --- sound/soc/codecs/nau8325.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/nau8325.c b/sound/soc/codecs/nau8325.c index 2c95ed00a681..5ccf4c110567 100644 --- a/sound/soc/codecs/nau8325.c +++ b/sound/soc/codecs/nau8325.c @@ -489,14 +489,24 @@ static int nau8325_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_component *component = dai->component; struct nau8325 *nau8325 = snd_soc_component_get_drvdata(component); const struct nau8325_osr_attr *osr; + int ret; osr = nau8325_get_osr(nau8325); if (!osr || !osr->osr) return -EINVAL; - return snd_pcm_hw_constraint_minmax(substream->runtime, - SNDRV_PCM_HW_PARAM_RATE, - 0, CLK_DA_AD_MAX / osr->osr); + ret = snd_pcm_hw_constraint_minmax(substream->runtime, + SNDRV_PCM_HW_PARAM_RATE, + 0, CLK_DA_AD_MAX / osr->osr); + if (ret < 0) + return ret; + + /* + * ASoC only marks the DAI as started when .startup() returns 0. + * Since snd_pcm_hw_constraint_minmax() may return 1, explicitly + * return 0 to ensure the DAI is correctly marked as started. + */ + return 0; } static int nau8325_hw_params(struct snd_pcm_substream *substream, -- 2.43.0 From mboxrd@z Thu Jan 1 00:00:00 1970 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 44615CC6B2D for ; Thu, 15 Oct 2026 01:47:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ak8qwW+9BI2AnrslD2qzNnXrMAQ5Nh9HKkmPTdAPTV0=; b=3l6Qq9pwpCwIgp CGwlSJ/LbpaSfJlheB0s2hWtN7P9OfhBygY2cPCD3s5+nkCuzFtoKiuTOWqmA9ToTkgLi+FM6haOc nQtMSVr1cmnHRw9nvT/Ef2XPI7k/gulfGip3psuYv2Smg0cgEvrEuMLnIO6+4E/IEzTLB/ZZpzROl yDfLULsLc1FEM37VqixPRWm8/2C8MqYA3cyY7KRmj5pJHCeHC6lTQe5GUO65qiz1lSsYTISczTxms faAZ0MSjwjMH90/K6SKscm5/X52L/0arA0ebW2dvzsNe3OyjL1v8E60OBn6BE+XZzO/HS6zIZ/sO6 /vroHoIndgSPE8025AlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHAYh-0000000GbmM-0Opu; Thu, 15 Oct 2026 01:47:03 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHAYc-0000000GbkY-0Aj2 for linux-rockchip@lists.infradead.org; Thu, 15 Oct 2026 01:46:59 +0000 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-2e608cd460eso25827755ad.3 for ; Wed, 14 Oct 2026 18:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792028817; x=1792633617; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=QkExA76YJWwf2po0CbLVw6mxayxnqBJKULe/shJjNF8=; b=C9rDe4vAZ5bhVg2cl8tvVjkVdhlGz1rSYYksWSPaFD6Q8SHFi/hopjtqtyCl9jfbtL aYbK80SEJ01jC5VpCgLbYx8oOiSJL7z0lyuQphEx5uHrMMe82HKWgSG2jq7aci/yjUsg Lsu7h0vlD/TjMgAeQjWC69UIzWpuE93erXpfG/rrzosWP9NJEkQ+6K2Z5pGRqwW92Ofc rcJq0g1oug8KEkyImN8C1RCoPSfMTHZ8scoJqYT1oIZwSorgkdpoF5+1YjkfCSruF/Vs i6S5hEISccwIihzpePMLFDqTlU3lMgPmvaPaLHjh3RyRwJkKYH+HtvsXmU9uO/t+TFwA y4/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792028817; x=1792633617; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=QkExA76YJWwf2po0CbLVw6mxayxnqBJKULe/shJjNF8=; b=LpjG7RmUiCkI66WyikDvXoyFL6z2ZlOP9jQBrmEFQH7nO8RIcowv7/lWJVO+/lNKzI mRjzubb8NrE2U1Nl4buiR+rqtrkqTOkG6/z492kvHv/8vI3s65Ocumepd7/TpavsI7t5 p14DdRsZLsMIqXttN7fdbIA59pwNl57k2/FKbJe43to9lF1P5IWnMyPH5ZMQS54A3OT6 Wb3ZbHxsTsTPpU1LEbRz87Wl8BEQbDV4L65ZiDPJfTShMKYvjATtiPck5agwBvqI0hJV Io9wcftWgZ4Jw+/mZXpGgoKkZ8WbDBOoO3R9oiXGxkjkI0/ywiuptWpXjxE2lAPhAXJY ITFQ== X-Forwarded-Encrypted: i=1; AKwUvBwqh54nnWHoTBavVW0w6GnuNoZRRjtGcgBgb8X2R8ss1H05GOCdnXPYipc1L9wnonRkfQL6McgpKV6e1jlvpQ==@lists.infradead.org X-Gm-Message-State: AFq9FYITz9njfYReHWovtDk+uV+8v7TUIDoXgPy2iduc3Y5yDoZTN8+N jsKrp/feSJ1K2c2cEPoKxje1h/e4opxaEr46b5CRee3yuyDPA+5+0UiP X-Gm-Gg: AYBFou1D1F+c7VZXSvvorHFNZMKyQ3+sqmmP3PZ8NaUWMgK34RHPR+hfFZEMCnqMOBJ dpkNLy1h6jf55YY91FHLYMi3BRtdQjE7OloTzarxiYJDSbuLz7QVxWQqGJSiOvdzrcYWw6qKhd4 /+6trhaImVq9R1pG3CzcNDWR4O3/4vAgtiAcOt19zxY33S58aUWGJ9+VNtZ2P5+G1UmezrleaSo +k9CNm/zG2Ew0/BH0TkFRNeX1GmqNeWForXqDTnfgCjoBW1LFs2RkhTC/2GbX89t2K6EMUP1pPQ oSyke3AiVstNJemU4HWZJzKyvfXa288IIcVEq9Q07Yp3TbcKkE4OD8oOUywlQHt7w69wuS4RZrI WEK366r6ri4TMg3egZrSXaxKCywKAgHEjVsXh9uLtSIq/h1riGgwxGspacjuBnxkRghcLB9uNR5 y7Y4de3GbRIBkdMIdVtISkewXytD57AYNwd0CKORp6cALcYtLI/LdmibmqOCdtZHzAtRmEF9Xz1 0moV+HXuLhIYdn/De91ptnrqd7CrRcGV4OK4ILUuPKO2N72nFuX6OH0LHDjcUiM6FmYbfqew3y8 MihSPhrShEW6geeQoK/Ab9LT X-Received: by 2002:a17:902:ebca:b0:2e9:401f:f0f4 with SMTP id d9443c01a7336-2e9401ffb38mr25578395ad.16.1792028816992; Wed, 14 Oct 2026 18:46:56 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e8422b8cc1sm73202995ad.54.2026.10.14.18.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 18:46:55 -0700 (PDT) From: phucduc.bui@gmail.com To: Vijendar Mukunda , Venkata Prasad Potturu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , povik+lin@cutebit.org, Claudiu Beznea , Andrei Simion , Nicolas Ferre , Alexandre Belloni , David Rhodes , Richard Fitzgerald , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Cezary Rojewski , Peter Ujfalusi , Bard Liao , Kai Vehmanen , Pierre-Louis Bossart , Kuninori Morimoto , Geert Uytterhoeven , Magnus Damm , Biju Das , Lad Prabhakar , Heiko Stuebner Subject: [PATCH v2 11/25] ASoC: codecs: nau8325: Ensure the DAI is marked as started on success Date: Thu, 15 Oct 2026 08:43:10 +0700 Message-ID: <20261015014324.5569-12-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261015014324.5569-1-phucduc.bui@gmail.com> References: <20261015014324.5569-1-phucduc.bui@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261014_184658_079721_0D5E5BB3 X-CRM114-Status: GOOD ( 14.20 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, wangdicheng , Kees Cook , Sang-Heon Jeon , Pengpeng Hou , Bo Shen , Neo Chang , linux-rockchip@lists.infradead.org, bui duc phuc , Chris Bainbridge , Charles Keepax , linux-sound@vger.kernel.org, u.kleine-koenig@baylibre.com, Zain Aboobacker , Bjorn Helgaas , Md Shofiqul Islam , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , patches@opensource.cirrus.com, Linus Walleij , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Vinod Koul , asahi@lists.linux.dev, Hemanth Selam , linuxppc-dev@lists.ozlabs.org, Syed Saba Kareem Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: bui duc phuc snd_pcm_hw_constraint_minmax() may return 1, which is then returned from nau8325_dai_startup(). ASoC only marks the DAI as started when .startup() returns 0. This currently has no functional impact, as nau8325_dai_ops has no .shutdown() callback. Still, return 0 explicitly on success to match what ASoC expects and ensure the DAI is correctly marked as started. Signed-off-by: bui duc phuc --- sound/soc/codecs/nau8325.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/nau8325.c b/sound/soc/codecs/nau8325.c index 2c95ed00a681..5ccf4c110567 100644 --- a/sound/soc/codecs/nau8325.c +++ b/sound/soc/codecs/nau8325.c @@ -489,14 +489,24 @@ static int nau8325_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_component *component = dai->component; struct nau8325 *nau8325 = snd_soc_component_get_drvdata(component); const struct nau8325_osr_attr *osr; + int ret; osr = nau8325_get_osr(nau8325); if (!osr || !osr->osr) return -EINVAL; - return snd_pcm_hw_constraint_minmax(substream->runtime, - SNDRV_PCM_HW_PARAM_RATE, - 0, CLK_DA_AD_MAX / osr->osr); + ret = snd_pcm_hw_constraint_minmax(substream->runtime, + SNDRV_PCM_HW_PARAM_RATE, + 0, CLK_DA_AD_MAX / osr->osr); + if (ret < 0) + return ret; + + /* + * ASoC only marks the DAI as started when .startup() returns 0. + * Since snd_pcm_hw_constraint_minmax() may return 1, explicitly + * return 0 to ensure the DAI is correctly marked as started. + */ + return 0; } static int nau8325_hw_params(struct snd_pcm_substream *substream, -- 2.43.0 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip