From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 7073D33E35C for ; Fri, 16 Oct 2026 04:11:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792123862; cv=none; b=D1ZM29dT/Itqx5HpxVZ0ZPbZk3cOnwzOwcONCvdbf6VmAl+HvpuW9SJTo4V2VF7cPustWpRz5V7o4a29ZTlqaJQkGPxaZy7HCvG97qUrackaVe6vaCp79oYmOc9SHkdpyJp2RHLNToyWhzRCOlP9HaUdzUnFTUXfC+RUbfAXhPs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792123862; c=relaxed/simple; bh=8/Qw16cRyomYBknzWMDrzeV1i/FgY3GRJD6KWvhZd+E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=j0VEExEAPMmtU9Y1WhTdt++wEz2PGLlBAqoEz1yqljRl10WWDR/THmOG7w8nxpR1UpPl6znNptxchzc1Lfa1ojpOnje/M84pf8bmIhoKJ7b0r/K12PWu/wXKu6LRYEUy3on7D7Be7uD5b4JFf9FTPFQzJknjTuB5nKhGlF2rxnE= 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.182 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-f182.google.com with SMTP id d9443c01a7336-2d6d28aa26cso11968075ad.2 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=Dpbvf/d+Y2oBsqZ+6NGxbqrrp+KWIPMBarw7Dj4z84XeVvGbIbxfSKQEfFJhylv+l0 2O5J7aYMNYPsASgsEdM96kLCpaWvg0BA56/+ID/Ekt9iGysF+o92wo0OpCFileXi74Qm 2mAwq/VcoWmvQwgr0jKp/7RxhWvuhMtipBYpIze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f19: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: asahi@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