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 BDA5F367B6D for ; Thu, 15 Oct 2026 01:48:07 +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=1792028889; cv=none; b=cctoAmNaMUrfVBHW4B5TxZeTGyQXqb7PMgB0thZavqLUzH6MO1B5D/KRuw5TkX1v+5BGxEbSvZXl2W6LAQgI0xZMiRE64eD4IRmSMMOol3X/Otffa+pDWkkpCUulPBtOG47mjta/Lg+0uDIPj/2+px+cdGkmUDyPJPn3XHi9NNI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792028889; c=relaxed/simple; bh=h+aUqaPj9vowNjoKv8XZBklyZfSSufgTE4gL6idJtRw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y7/Yf2uPNV3TS2afDTITu2wIlybqciIfPBUgJpRkyS08xQ11en6LMkoCXAerhv/gImDzgf9NjDU7LEfw011UDfxXFKM6FBFPpa3p9Uw4egwGeM20+Nb7UDC2AXt8rQkhtM+GkAzqr/AAjB0J1HL91rKdsgIv9kfmqhNk0iPXUvI= 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=pWKtBiyQ; 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="pWKtBiyQ" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2d71d1cc8b2so25405475ad.1 for ; Wed, 14 Oct 2026 18:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792028887; x=1792633687; 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=E8bdFAa8/cOYz7HxAYkPZAcubK8qZlAfIypauJAM7ak=; b=pWKtBiyQ23YWDomGNL5PcGW9wdh4yclUPF+47vg0Noswwe3l7EWX6vcpE4Z4u7CCUt o+Cc9ULa5C8WQR9ECC/5JJW/FTFzXD7tqFLRdrZOJa/4TxwO7JBjRMs/x+2uOWvbhpu+ 22mtClJv+jy9DhbPrMsY2Jf+5V4EIT4bOC38cwW2Li5bpgQzhTLVE9vo/ZK+6mjWQnFu aO5BuDc/reIJSOeZEygi/QNhq/S3XdChoFfNEIstSeSYHOJWfWRpaQ22HlhGK524RVYs v7/4VGt25eXYAE6BS7TkkBlngYFPH9m0/ftxTbng/C+WkmpDcEJYzPFoLDX4llJ0xdth ysIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792028887; x=1792633687; 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=E8bdFAa8/cOYz7HxAYkPZAcubK8qZlAfIypauJAM7ak=; b=lqw12FvxMUSb5oB0Yirv3286KNvncbijE8oZFg9uVAvZjiamLQLi310ciK69zKEVz6 +LT7L835mVvi7aMa9/aCCE24dDPVkIAO95R1rJAlbsgmQ6f7jCBfOSr2mNL9nC+j99Z1 cCZEZyU3El/Gxrvt0fCmRVTSl8cal8pmFkdrS+9wI7MZKuEUl/jOeFgrHwFqYE9lgTvb Tt6XKj2HqH+HuRfHxttMSYQuwqoFIFPVo2GtiEQyyt+02Utz3R03UmzZJpjhZrF4MtDC apHCnzv5bbhQA+W7PNWZtQUPAMh+5BrYzF5x0QXbFkHpGdFHzXcVW6a6Eu6Z9Nq4squg i91w== X-Forwarded-Encrypted: i=1; AKwUvBySCbTdPSOLmZZZ0SEU3Pz+Qabagor4M6eyYBWSq2p0GSkd2nqxiGjD1ssDir/xj15uVe+SeQ==@lists.linux.dev X-Gm-Message-State: AFq9FYLPf+Mk/YytbJyJvfrkkruIdam+KBtrscGaR5gPF9lCv2o5BRm7 AseBmcG66se9MJxMVjNJ9CXNuKDtW1cD6ZsgCQJEA/k36ZQjOG+XF5he X-Gm-Gg: AYBFou0qf1KPm/iW90Mg9z1UhDLXdRLQPb/oIB/Y2g9fZvj1T8surDuv0Geg4KYsMQh NiKPjqt+jdwgXgdRBz9JccptZJo3/xFXAZLuy6QBBtwp9mV573NUA55xfh23MMdpRK7R1hvVmlp Fedc35KnFZ5GnQwYSLi8yZsWnz6k7AogD+UvgqsC2VA0l6X6APNHBRwmbIO832TzSIPNLsFigsL No6tafxgiEBF/WD9pQ9sLN2BlD4QiuzDgYD1xkHg13JP0DBW5sqAOVndv5v8pIsVddivRDcP18I he7eadMBOs3ilF8KU/STDv3v6SMdeef37e9ZYfswQprVIoqouT5LH+25XIkk22gdWFGvTltPWFl TfmBlRin0gyFNChIdsNqPnOIRMK+vzUaenk3IE65wHgh9hCswQSFp6yg4QnBIVj41Law+R6W1dj 9yUzr3cO6E4/+iQ0b1+LbgcCzaFL1MIpMyTBQ0t8oAepp+P+HcNzPuYWv+wXjpJNmJNAKacKcsu yInL2dx6ogxq1C9xDx5DeUCO0IX7E2Wzf4LVrRhsM+bulAhoponYXeHaQOr/BqwZmNp/IhDfwm7 MLqqCtAywx1PgQ== X-Received: by 2002:a17:903:15c7:b0:2e6:1a6c:abd4 with SMTP id d9443c01a7336-2e84280e026mr162256675ad.2.1792028887036; Wed, 14 Oct 2026 18:48:07 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e8422b8cc1sm73202995ad.54.2026.10.14.18.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 18:48:05 -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 15/25] ASoC: codecs: nau8825: Ensure the DAI is marked as started on success Date: Thu, 15 Oct 2026 08:43:14 +0700 Message-ID: <20261015014324.5569-16-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 nau8825_dai_startup(). ASoC only marks the DAI as started when .startup() returns 0. This currently has no functional impact, as nau8825_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/nau8825.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c index 63d927f31409..af2a49c893d3 100644 --- a/sound/soc/codecs/nau8825.c +++ b/sound/soc/codecs/nau8825.c @@ -1261,14 +1261,24 @@ static int nau8825_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_component *component = dai->component; struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); const struct nau8825_osr_attr *osr; + int ret; osr = nau8825_get_osr(nau8825, substream->stream); 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 nau8825_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 BC9A5CC6B2D for ; Thu, 15 Oct 2026 01:48:15 +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=jvzApiTcdXAUYGv7HNlYglamy49WRzFWSHCn20VV1xQ=; b=OQdOjEcxszFyR+ OcfcwRowHcyGqs6vgx5oFjT8OEymImC4nrphLBLYPtBU4o9I9RhvRwB4zscoUvdjH2Uv3jsmgUCWh lQqQdI67MLw/gw/nv8iB1Yo4an1iibSaunJrjL2cDnR289r8TrN8pYxvG//CIMNCX9Bxn8bXeZEiT GPO8BQ/d/n6uE9J1Ug0YS75wfT0qDOm4RxKBs9naUtETO6qd4yY9WIL/YWejUKskina+4EHIFTu6h nTZhCG31fERPplVOtH76B0uOWblzE8n/HH7PZxNrccMOH5cpUIy9DUttfizTAboXipWy2VJH5yhqx ZQI4mMgQtzo7TyXB1l3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHAZl-0000000Gc3M-2ctp; Thu, 15 Oct 2026 01:48:09 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHAZj-0000000Gc2X-3qI3 for linux-rockchip@lists.infradead.org; Thu, 15 Oct 2026 01:48:09 +0000 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-2e8246b13cbso35376155ad.2 for ; Wed, 14 Oct 2026 18:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792028887; x=1792633687; 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=E8bdFAa8/cOYz7HxAYkPZAcubK8qZlAfIypauJAM7ak=; b=DCFE7+D3+huXd3zzITaHnKFt0HDbzrnk+0p0XdHcTnWOma97et74juhqKGRH3w3RUq CubhFDwTlUcFBkBIJdCG7NYdBX8saSLf7q/mF1AHmD4MltjObKychlQ01cDs8ZjB45F3 1POUAjA1y9SsE62qvWONkR8YrZr7JXT8gwfhOnQKyYjrJRksUH2j8f382iIEuvseQ1U+ rOCEslK+MHwbRsjw6ceHlmJoGj3g3K/tKMc79yXF41YiRamEKmj3R4LcYa3O7H030Uzc r37pFjK8QlbNN6iimr5v8MhFc+itYqEnXA3r1XUO9jLQML/E1z9kzUiA1d0WhhzVTjfU h81Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792028887; x=1792633687; 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=E8bdFAa8/cOYz7HxAYkPZAcubK8qZlAfIypauJAM7ak=; b=r+lTmp4Jn1vV6LP1sXBhpcT/s6VX5EU7gcxKqHz1IJNe9c9aYDO0Rzmt1TDygTBEXk RjEvfFYzjUv6k5Pmb1tpUq4z15q6cpzZLIqQkgkoX7/FFfoNejuYvveAm7So9fDFmb+c GGljOCJqz2tybIoqQvk2Iq0Kp/joHParNWEsDkiLb1QpCwnzDKiOFHcm3TlqZMhSfB+/ 9bAPVU5frw2m39L+xjJbnkRGW1tBJYy3qtU3Lu1ciKUsDcNLA1fcbhfLTq7iQpk0+/z8 k6q/haAGOokK0njfv38lAR5pVCojDGriv6qB0xumh+2e6YvV7Dvdi1xgdNYxqM5+yx5j rLcA== X-Forwarded-Encrypted: i=1; AKwUvBxsl4Hb0e/OAEljH2D9o93+TXKuT1VGqocMCCKoE9nEMSf/8AH/gRABU8TqTVcb1UIYZphjwj/HcQofhwnhXQ==@lists.infradead.org X-Gm-Message-State: AFq9FYIiVODtxLXDnJhia+xCOLVXxG1pZVYsQ0B5vPLbUu1HMCiEYHXE 7+GkKY86EJZbw2s2JqC+/0zgJoRpMZUS9OoI1dB61j7NJLFkotHb8SgD X-Gm-Gg: AYBFou3ICFZW+Iq1dM1UDYPbPbbivS2pMKuYjw1LaPUIfYO7yCc1IthUwXFBYZZYelX G+i6qg31+Sx41FG28zeK6BTF+BzHBHeBhcWLhjZkiodyRSEOHaA/0xevY5m0EmET/3wOO9Mz2lU DX0Dn+9oRgeiBJYkE723wjUlNVta7ctUsX0CqocB7EvY9XTGfZ/ebaTXag3zCHXRuQR3b+3EZbj dgW3woB/g/yOPftCpnuV+l1uKVlqOQV2yeW0Dt1ovbbu00Vo7ZQewfEGJB0ayqkgTefH7KaKkb3 +nnGBx6djprXp1JaJCAW8JBFBu8Bg2H6nqiuLIPwT0JoJV9DQl3ivTrXtNoRB2zb3EZrXXcLgjk MR876MJmtP+WndoN1bOmP9Yi+er5q/aLuvJbC9aepi2FbR2RhEnry9DajZVPwssgXnrfldQLQpt y7uaqXMSNNDV0navDUQbBn2FeOtmeN21fRm//gFwr0U51srV2jyjMYPA9v8Y5OZiGRDSkOqTgsc 1x9v7RZCU0+kQWsSqFwEvuO7e440aAH//POwu5fIYppHtjx0T+ppe7f+Ym0GIn90Lmg4Bo3vHI6 fkHoUy16Q8fnTA== X-Received: by 2002:a17:903:15c7:b0:2e6:1a6c:abd4 with SMTP id d9443c01a7336-2e84280e026mr162256675ad.2.1792028887036; Wed, 14 Oct 2026 18:48:07 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e8422b8cc1sm73202995ad.54.2026.10.14.18.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 18:48:05 -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 15/25] ASoC: codecs: nau8825: Ensure the DAI is marked as started on success Date: Thu, 15 Oct 2026 08:43:14 +0700 Message-ID: <20261015014324.5569-16-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_184807_964597_51ABB3CA X-CRM114-Status: GOOD ( 14.00 ) 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 nau8825_dai_startup(). ASoC only marks the DAI as started when .startup() returns 0. This currently has no functional impact, as nau8825_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/nau8825.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c index 63d927f31409..af2a49c893d3 100644 --- a/sound/soc/codecs/nau8825.c +++ b/sound/soc/codecs/nau8825.c @@ -1261,14 +1261,24 @@ static int nau8825_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_component *component = dai->component; struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); const struct nau8825_osr_attr *osr; + int ret; osr = nau8825_get_osr(nau8825, substream->stream); 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 nau8825_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