From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 76E6435E1D9 for ; Fri, 16 Oct 2026 04:11:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792123864; cv=none; b=aEQ1cUhf7QsthfgkWIXCyVC/coTlTlXPVNWoDfTl7ra/OixYUZvcn0NHrYkCSo+dw2CoeyS5PG0zx5ksoYlX5j3lDcrQdtdebdgRoT+PD6a3PE+MDtEZfLv44v7M7LkYOOz1sFprWloCJ1n7DVDunaf6505D5sR1ah+TR3qlTzw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792123864; c=relaxed/simple; bh=8/Qw16cRyomYBknzWMDrzeV1i/FgY3GRJD6KWvhZd+E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lwX5xPm2nRSRRCp/DbeAL4d5vq5IiXk3misIsvGm7vlR3x6S6M5U2lBCJwJ2T/9q7BZtpbV4pBx1eU90lhF/v6GYiE8aS9fFyhgIyTw2sjyt9Ud9xn+V9KeOrE0eb7eA2ayuTrsWPMxGanyH5DBNy4LhtPXCmjvjTXC5Y7XKhx0= 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=g/RkK10z; arc=none smtp.client-ip=209.85.214.177 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="g/RkK10z" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2e987a2ba0cso2031695ad.3 for ; Thu, 15 Oct 2026 21:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792123861; x=1792728661; 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=4cGMzRNU9hZgiCZEwiJrPZgZXHYdPhSTuWZRtxpdn1k=; b=g/RkK10zN6kw/Y6+MrlEn+rg+5Q9qY//VthJ0uxEGIMuIrfJL5fuMat2qvhHkvtDD7 3dPUYsy0S7rmfXJLlHb4dQ9q66IbxnURwE/VHcF9unoR9Mbz2EX4+zYl1aEtybQ55eYV 5A323ZV0DVY6/PiSzbBiebXywF/JGS1lNAnBQA7ZMg23yAnkHV3NE4gtmK8g2qwiDLYQ kRqC8NBGLAFKXw7qGmetAzB1JA+ZJHPLAm1VtBb7NLZOehs/T11ZvA/wRh4g1L0PuWED VNzHJyCgHSUcy74AUfelXdujOUSwd0EnEOZLZ1abvmhsy9jj7vX1Ar5nJNfo7mrW7dAY ashw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792123861; x=1792728661; 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=4cGMzRNU9hZgiCZEwiJrPZgZXHYdPhSTuWZRtxpdn1k=; b=c7fWdhPTpprSStyhrTR6ZJJyqtnOw/qAJqxWaWZMw65tIyT5qiWuihtL/McdO3A3A+ deNPUVDvgNAIQzf+mLrMP5GwVnru5y5QLyy7JaBV/a5ckG9CwLaHP2r3UQ8L/UPmP6dZ IfbByBNu6+nBUlhpO3ZbvP0PboX5pMEehJ8Pfv1OV4uTzhp3v8K6kBB+aFa2awGPn7Uz g8+SmjJi/k9B7ltgPcVwojBdUXvqh5rnP2IBhSPVkLWSH5z3V4f7wbkfzXBDXCp1HV8b HRva63qz5+BKQakCBJbTnj5Nyb7j5TbPtcNiaDV4q6PAo+cc/BSPGxZGjiRKIFxw9KjC KLzA== X-Forwarded-Encrypted: i=1; AKwUvBxCSpU8xB2Prpwm8QbflFceOntfsjXs+/AfUjcZdpbMaDzLOq09jH4sF9e4TlivZRukRQo=@lists.linux.dev X-Gm-Message-State: AFq9FYLIu6tvsXCjM39gneWPzioY39WZkYPj1XRbeMNku7gInzFBJm9S HHcimNVDalDNDvKHTqMwyUMxcGqFgxoE3PYMOY8v4vXdYbJlZGQJn8ni X-Gm-Gg: AYBFou2ecsQlkcZo0A69huJCD+VsM/PsFBH7eR1JvrLTsoiaP0henlVnP/VeU6ZL/6A tq7VgX8a7PKmE6Cl6M9trErtW2BrwONw7rSacbk+im07whTdohs2S3MeQmTm9GdwZtJcK46oUlT 7aiS9MCLReSEE5CdieHYVKuYjZz4Z1KaQaiuVziKQNAof1QAAUCaZQek4S8k3SzjkEmtwI8OcCZ c2zfGqyk3AZ8z2kI1Nd84ZPZzWQySLSw1euK84ISYuR9xrUq7CZ62/XkNYdC2eq77R+cU1Es4cp HFQftPVujX4XqSBaj7FrNXqlW3K4HuX3ALfRGKpPTnL3ByDysVhKQZr1vjCfogiBi/wzAYGj6Gy gPt+gqjva4HzldbDFnD7nQ3H/kRBIEeVtysBGkx7C6i7JUhITfmce0VNNk1vg+hAm2lHKsQvM1Z OYXKsBLg+3OUC7hfvEKl/vzUVbqZQyVEPmBuUg8don8QQhoE3Q2iGjinAofVXmdDeY4prM/dWvr dS4cttfjHaVaoc2KgAME7aBtfTPBgOCOiTHDg9tXroxrQit0A6EWsw1eDeHsM3nR59APclxYtnP xyIFI8o09OSHEZe7AGNsMX9Bbg== X-Received: by 2002:a17:902:d541:b0:2df:8f19:5db8 with SMTP id d9443c01a7336-2e842f136acmr187140595ad.59.1792123860729; Thu, 15 Oct 2026 21:11:00 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e97e8ab443sm3815785ad.65.2026.10.15.21.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Oct 2026 21:11:00 -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 04/11] ASoC: codecs: Explain DAI startup return value handling Date: Fri, 16 Oct 2026 11:09:39 +0700 Message-ID: <20261016040946.521195-5-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261016040946.521195-1-phucduc.bui@gmail.com> References: <20261016040946.521195-1-phucduc.bui@gmail.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bui duc phuc Add comments explaining why the .startup() callbacks must return 0 on success to ensure the DAI is correctly marked as started and prevent future changes from reintroducing the issue. Signed-off-by: bui duc phuc --- sound/soc/codecs/cs42l42.c | 5 +++++ sound/soc/codecs/nau8325.c | 5 +++++ sound/soc/codecs/nau8540.c | 5 +++++ sound/soc/codecs/nau8821.c | 5 +++++ sound/soc/codecs/nau8824.c | 5 +++++ sound/soc/codecs/nau8825.c | 5 +++++ sound/soc/codecs/wm8580.c | 5 +++++ sound/soc/codecs/wm8782.c | 5 +++++ 8 files changed, 40 insertions(+) diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c index f6e4bf6206b7..18d6cb9bfa2c 100644 --- a/sound/soc/codecs/cs42l42.c +++ b/sound/soc/codecs/cs42l42.c @@ -907,6 +907,11 @@ static int cs42l42_dai_startup(struct snd_pcm_substream *substream, struct snd_s 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; } diff --git a/sound/soc/codecs/nau8325.c b/sound/soc/codecs/nau8325.c index 0902a7d7730d..5ccf4c110567 100644 --- a/sound/soc/codecs/nau8325.c +++ b/sound/soc/codecs/nau8325.c @@ -501,6 +501,11 @@ static int nau8325_dai_startup(struct snd_pcm_substream *substream, 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; } diff --git a/sound/soc/codecs/nau8540.c b/sound/soc/codecs/nau8540.c index 9484388ab262..09e7f31a904d 100644 --- a/sound/soc/codecs/nau8540.c +++ b/sound/soc/codecs/nau8540.c @@ -431,6 +431,11 @@ static int nau8540_dai_startup(struct snd_pcm_substream *substream, 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; } diff --git a/sound/soc/codecs/nau8821.c b/sound/soc/codecs/nau8821.c index 935df063822c..7b88ee3159d1 100644 --- a/sound/soc/codecs/nau8821.c +++ b/sound/soc/codecs/nau8821.c @@ -841,6 +841,11 @@ static int nau8821_dai_startup(struct snd_pcm_substream *substream, 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; } diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c index c89889aa420e..046cce9192b7 100644 --- a/sound/soc/codecs/nau8824.c +++ b/sound/soc/codecs/nau8824.c @@ -1073,6 +1073,11 @@ static int nau8824_dai_startup(struct snd_pcm_substream *substream, 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; } diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c index 10bbfbb460b1..af2a49c893d3 100644 --- a/sound/soc/codecs/nau8825.c +++ b/sound/soc/codecs/nau8825.c @@ -1273,6 +1273,11 @@ static int nau8825_dai_startup(struct snd_pcm_substream *substream, 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; } diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 5343d445c322..cee80da8f753 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c @@ -860,6 +860,11 @@ static int wm8580_playback_startup(struct snd_pcm_substream *substream, 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; } diff --git a/sound/soc/codecs/wm8782.c b/sound/soc/codecs/wm8782.c index 767251ac4f89..cbf0c823c022 100644 --- a/sound/soc/codecs/wm8782.c +++ b/sound/soc/codecs/wm8782.c @@ -46,6 +46,11 @@ static int wm8782_dai_startup(struct snd_pcm_substream *sub, struct snd_soc_dai 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; } -- 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 D19B6CC6B2D for ; Fri, 16 Oct 2026 04:11:22 +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=xmDNHQmIDfbwnuiQ998LOdnfA/zXBp+5mZB+xHydbf8=; b=lNyt4hOdz2Ze9w +O45kogaE4QxSN+mCZ+DvXX+7l/8lyu9RaF1oUvhgUcYILYTRKGUmDhedHNT22bBjnca7O8e6csyx qT/W4AbH1ifAcHSEH/F4+5+iFoR4Ef0z1A0O/RqnMY9jDSlWmaal6rBGYAcJ1y0A5xLNGCcbRamcX UwcwzuxT/kHSgF16Jw1Qr1Lm4rfDBD3OkK340bXC2mCD18dUty/WzfSxSxLI1JWJRb3s4rOhnjLNf gP/VeFeutIXxn+jsNsWNC2nk+RQLaWvAd1bUoHi7lYmu6igkwim5+ThsmZ6oNdIAx8oSH4VYHN5zQ DFEDbDT8nw4I4h9aMsbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHZHj-00000001whV-0uW3; Fri, 16 Oct 2026 04:11:11 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHZHg-00000001wfk-13is for linux-rockchip@bombadil.infradead.org; Fri, 16 Oct 2026 04:11:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=4cGMzRNU9hZgiCZEwiJrPZgZXHYdPhSTuWZRtxpdn1k=; b=TuSiw3EuTFOiCNbeH8/ck9qrAT zWtkhnuQb8XgZvirdHW/mEeBipZHDRvu2rT7KtDTTEVi6/F2niPQmWbb9hc0jjrDKub1vy4jre6o0 H6ib8QOghDhkLTIoXR2h1FwQsYrjt6nW1mWeeoUAJvOPhog9w9m6znl+bcPGY1Qkl07lLipSYDi2B 8Upa0ue6oeH06zpz2UJs9OCM1DLIx3yxiiLKrq5U3jfPzUCvnrsLt6dYbdsysWUZb4Jqg0826KMgP +05LrnB3EIXjXhknUmKZJIkdpgujIzs9aLuHsZhduAC2c+dZbxaX5M5X9mEaJIqhFgZBySYA0kOaf WkvH+bLw==; Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by desiato.infradead.org with esmtps (Exim 4.99.5 #2 (Red Hat Linux)) id 1xHZHb-000000015Rl-04LK for linux-rockchip@lists.infradead.org; Fri, 16 Oct 2026 04:11:06 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2e987a2ba0cso2031705ad.3 for ; Thu, 15 Oct 2026 21:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792123861; x=1792728661; 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=4cGMzRNU9hZgiCZEwiJrPZgZXHYdPhSTuWZRtxpdn1k=; b=jfGmb+Jx7EcnH+FjFsMWQvnX8M0ISro2wYZDwVgKAFeO9LMwMdOWvmNyJun21gLvcZ QHF/aXH/aVZUM6hs/F/QcyZT0IxD/jTlJTjcy85PpyFnYzoyVMktkCksaEagoR/AusnP CDXwpV9tp9fWaOLkWqmCtRymgFC1kK/3Af+EJvg4Arm/M6qG0Br0rYe/1MnVdbQtj7CJ R+IqGmNlDiNalomJABaIH+eVcDrLYXNW50iAP1adkGkC++EH85v27xoYrpbMl1L7BAzd BtF1DneOCByiu4EZiUh+iPUF3RbMMDEQLXQPJxGmEl/C1NlSUlhsRD1uog2OxPQvycwY BQJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792123861; x=1792728661; 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=4cGMzRNU9hZgiCZEwiJrPZgZXHYdPhSTuWZRtxpdn1k=; b=VC9+sbRLS/QxUmZenFwMT8WeW0C731KuJZlBdij088WExUhjy7xMIqG6qnnf3Ez8P1 2sQURbWcrUyxlUBkXot2HpzgXWOnFtHW+n3YiCqCl6wnZvpN+O7Ittcd3QBQwqfvQ2hw vz13PwWUBj8/nrAu9b4ceBXzjZu9Y0v6luBxyvKi5RuTiRYVzHoRMjlqe/AGlCx13h6V YiLLihhUcp3aQYo5i0A7URB5k33W6sS3fgtGEpbXOXiXxXdT4xLEMVuuL7ELfj53NEA2 UZeAwd12MxKp7Pl3PzINlx4fRcvDdR9p5ddX9iDdXgaw60PBB3l4jWXatSZCxGF1ALph 5NoA== X-Forwarded-Encrypted: i=1; AKwUvByt/GdzAqh6amlPFlOBFmtSJOCoiNDvzZKoxMcdWI7kR4KTbt97PGVPIgfAttpAZ09G9WG9wIIKeqpVbeqDbQ==@lists.infradead.org X-Gm-Message-State: AFq9FYLiQMAHwzpW+fCroKGx2vB65kLgUP29T1j4910XZ7s+LZyhFvSe EGiyXiPy3JFOrOi3ZTAaOs08clDTMymO6ymYYUpnwaPLzpg7y87Q5h4H X-Gm-Gg: AYBFou2wLxL+Xqy8W+wOonfpkXoA++b7j9aYDo8OgTgDO1VIxriFH/UMMPXvr7Dm13J NA+SIypausFFseo/4GWMuce+NgHxQJH1E7pgKS6OJKpSzKL2EdQP630qWfv9XVeR6BscrP7Rp35 5hxegowQ1yeckGg1ADxnn4xffz4VSfserkVH2rKiIHeAtGrmIlSCmAv9zzSInm682jXPwYPAf5I wI8MrFKvqCg4SNq0qYUzFofBnLGpDhZDiPKqxP7fDcdf02A4OIsV1UlKbX4Qm414XZvvuqzCki9 fvgEBlLI6JnTZHLo09B8VDGthuSXtLZHnX2/WAdkN3Hw5MXpL8d2HiFx6e2N5HbQ847/aiOYgze +XnD9X7T5ZZngcrAVLrCEgl+SPFhFRAa6PQSzyoMQXcoyMD0yQcJSiMesa6zs7VYq/xdy86K6/9 PsroftO29Z+m4f9V/2vvJ9f/U7YXo0/0Y9aKVJUuWbcKoUlbkKsEQb/1su1IOO20kMGh9A+qCb4 ww5Y2aMn8RGuBoPTjYok+/i1HLUC+mD8AueiwcuQKKeh7a2xY2E/M22tsOfYrsnrLi8XofuFAmV G4uOxeGMkC3rgbLtj+wGxqiwLw== X-Received: by 2002:a17:902:d541:b0:2df:8f19:5db8 with SMTP id d9443c01a7336-2e842f136acmr187140595ad.59.1792123860729; Thu, 15 Oct 2026 21:11:00 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e97e8ab443sm3815785ad.65.2026.10.15.21.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Oct 2026 21:11:00 -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 04/11] ASoC: codecs: Explain DAI startup return value handling Date: Fri, 16 Oct 2026 11:09:39 +0700 Message-ID: <20261016040946.521195-5-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261016040946.521195-1-phucduc.bui@gmail.com> References: <20261016040946.521195-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-20261016_051105_194576_1DC79BA9 X-CRM114-Status: GOOD ( 10.99 ) 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 Add comments explaining why the .startup() callbacks must return 0 on success to ensure the DAI is correctly marked as started and prevent future changes from reintroducing the issue. Signed-off-by: bui duc phuc --- sound/soc/codecs/cs42l42.c | 5 +++++ sound/soc/codecs/nau8325.c | 5 +++++ sound/soc/codecs/nau8540.c | 5 +++++ sound/soc/codecs/nau8821.c | 5 +++++ sound/soc/codecs/nau8824.c | 5 +++++ sound/soc/codecs/nau8825.c | 5 +++++ sound/soc/codecs/wm8580.c | 5 +++++ sound/soc/codecs/wm8782.c | 5 +++++ 8 files changed, 40 insertions(+) diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c index f6e4bf6206b7..18d6cb9bfa2c 100644 --- a/sound/soc/codecs/cs42l42.c +++ b/sound/soc/codecs/cs42l42.c @@ -907,6 +907,11 @@ static int cs42l42_dai_startup(struct snd_pcm_substream *substream, struct snd_s 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; } diff --git a/sound/soc/codecs/nau8325.c b/sound/soc/codecs/nau8325.c index 0902a7d7730d..5ccf4c110567 100644 --- a/sound/soc/codecs/nau8325.c +++ b/sound/soc/codecs/nau8325.c @@ -501,6 +501,11 @@ static int nau8325_dai_startup(struct snd_pcm_substream *substream, 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; } diff --git a/sound/soc/codecs/nau8540.c b/sound/soc/codecs/nau8540.c index 9484388ab262..09e7f31a904d 100644 --- a/sound/soc/codecs/nau8540.c +++ b/sound/soc/codecs/nau8540.c @@ -431,6 +431,11 @@ static int nau8540_dai_startup(struct snd_pcm_substream *substream, 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; } diff --git a/sound/soc/codecs/nau8821.c b/sound/soc/codecs/nau8821.c index 935df063822c..7b88ee3159d1 100644 --- a/sound/soc/codecs/nau8821.c +++ b/sound/soc/codecs/nau8821.c @@ -841,6 +841,11 @@ static int nau8821_dai_startup(struct snd_pcm_substream *substream, 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; } diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c index c89889aa420e..046cce9192b7 100644 --- a/sound/soc/codecs/nau8824.c +++ b/sound/soc/codecs/nau8824.c @@ -1073,6 +1073,11 @@ static int nau8824_dai_startup(struct snd_pcm_substream *substream, 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; } diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c index 10bbfbb460b1..af2a49c893d3 100644 --- a/sound/soc/codecs/nau8825.c +++ b/sound/soc/codecs/nau8825.c @@ -1273,6 +1273,11 @@ static int nau8825_dai_startup(struct snd_pcm_substream *substream, 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; } diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 5343d445c322..cee80da8f753 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c @@ -860,6 +860,11 @@ static int wm8580_playback_startup(struct snd_pcm_substream *substream, 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; } diff --git a/sound/soc/codecs/wm8782.c b/sound/soc/codecs/wm8782.c index 767251ac4f89..cbf0c823c022 100644 --- a/sound/soc/codecs/wm8782.c +++ b/sound/soc/codecs/wm8782.c @@ -46,6 +46,11 @@ static int wm8782_dai_startup(struct snd_pcm_substream *sub, struct snd_soc_dai 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; } -- 2.43.0 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip