From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 DE6432F39B5 for ; Thu, 15 Oct 2026 01:46:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792028776; cv=none; b=TwxOxRM2BKs2F6hVSjwqzSeFodu/ILkB+PxubtwT7VB1wf0mw4rmOpoAGicU7i0Aue7GsaPty0/LTM/jy4vhlFomzg9NYVZzHoVryu30W6Yf5d3dy+elvgHr1CU39ny7kzKWhouxQ5cltxHyg83xgeOJIUdqzfQs8xjQcUzfQdM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792028776; c=relaxed/simple; bh=yyOhgd07c+cxIzNpWT9aCbeZ38F5m8HPqyV963AJgU8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WJkaEdxuOmVr7tjrZz++Ul00kcLtCya0mvUN8mQ0qkwcHbDhlzH83nhzXlHpFuB1Gp5Jf23In6lbFepr2oe/KrkPe2702+VdvDnrscPAv3bV+doaIYKtOUChQhWL5nVga2GcxEdT+RasjjopfDH0w93tIds/0lJd/JK+G2Tx9KM= 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=iXGzP7BS; arc=none smtp.client-ip=209.85.214.181 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="iXGzP7BS" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2e86dce4510so24244435ad.3 for ; Wed, 14 Oct 2026 18:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792028774; x=1792633574; darn=vger.kernel.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=kUuyyTReTSIMtXgKEYicRWK2Sg4dljNH29dcQFqlL0M=; b=iXGzP7BSbNs94RxPtyeSJ5Gau8VP7nk1AW5pbIRSAasb5Zj7SClkKqkHjGcI2/STmC EURBcvHD+b0geswJwaWD2XHthls6gn8g3/2on1/deJTQypOdD9TnULzHXkTTeXpaCTzw rZa51H8C7pMxc5QCe+41Rkvw5X7WlRYRWcJAsPmELQa1r5MUvUdBcSjO7iLtE8ODAMyW aKN00z62grjsheCKCsP2xWu6OKosVaogqkQ++35rtb7Gs8pjXh0STpJ6x9j+unbGKmkT Tc68jtPOc0yg64Lp07L89zrZQBhg+YVvh2Rs0o499Ke5RjTGQFjWy3RrMZAaftT4Splv 70gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792028774; x=1792633574; 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=kUuyyTReTSIMtXgKEYicRWK2Sg4dljNH29dcQFqlL0M=; b=WNgWl6YGHUYkZToCWmN0Jf4yzx4v2W8NIqOiW4VWl0UE3K7fTHm1foM6fbwHTPq7vk T/fB956Os0aXEy7w2VYBMIAhAofo0oKCwObyVW1YgZ+0YZoduafSkuLBycRWbCVIXGPI JCsIhe7MUgOzCPDHV+NukHQxUE+a+c+kjy40mNAttURcKtaFaUlrLAE2lhTgh5BT1vvr Pa3G0hOr5IweUxhG1sLMX2iTe3HMwk1h97g1GE4fOsvsG+oyOEy4+sKafPIrOtTeOH34 Pai5uduYc5cQdH2TAb3sV67QefX3UB5tw1/92eV7rXnLMYJluPxK1unIjy6v0T0+ox5w 7mPA== X-Forwarded-Encrypted: i=1; AKwUvBzYkdX3WsF63aMtrLF7p/vX7IM5LSH65iZqK8elKH/rI0Y17EruedwQXa95DbnFhTNYPt63tYjFNtcnDye6ol6xIQ==@vger.kernel.org X-Gm-Message-State: AFq9FYK/b1w51Krt/5OvuXZNXEa0tcprN0L0dgZ0T+I80apQ28rUDy2P LR9SaSFGw0zFz3CR7RdHTqnUqaWM4ZT6kUgE20BPw6mEVQFRrWlaK6Xg X-Gm-Gg: AYBFou2K7vSGLMufhpQAUpSWooLJZ4OtdVhg5AGBTIiCSUl79mF7ypOA/u77O52IjaS ghvmTSfmve1eU7Sp/6Hz2pjGPObFvHA1bDO4OuBG2Z7d/P2xSQB8XmHsj05tnAIywF2l1u05LO4 TndWb7Nmk0tsnTL/in90HRU4ky93dLW43bIn+Azry1xq3Aub1n5oizoN/ca3fQ8hfx+WEeovu8t 72xhxsNyk+dOR2br2kwk0fj0HTkecA+ndrkgDRG8pKCR8QUbH4KwurAhXUjK2jiESaEH2VlY1Fi V+aKHHO1iqPFb4aaRyQunCR5zRYdGErGHmlwdq7SGsm7Q8FJl4n/VEpS/cR3k00zFf0s6fpQPAi Lezx5K/QDpvIOfo1+w5Svs0Gbg+NTK1E0/ojuCucgsvnL15uHMd5z1G8+y7MmxdMmvhO21G3gAR QEda/5D42TuF86xwmACsiKO3vnPpH149sOlg8ILiJL2z9HL4SAhue3+Lv4hLkCC0N82gHQR6mvk OocdQcZiBWbUR36LJKA6DbSmUnCGAPgMjBj+NCU67A1L3Appx/Xq1YvmiOgR/Edj25QOxALcPqc zuBNHaHMOpZmwA== X-Received: by 2002:a17:902:cec2:b0:2dd:c0ff:e72b with SMTP id d9443c01a7336-2e842e02a57mr138459075ad.61.1792028774224; Wed, 14 Oct 2026 18:46:14 -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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 18:46:13 -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 08/25] ASoC: apple: mca: Ensure the DAI is marked as started on success Date: Thu, 15 Oct 2026 08:43:07 +0700 Message-ID: <20261015014324.5569-9-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: linux-renesas-soc@vger.kernel.org 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 mca_fe_startup(). ASoC only marks the DAI as started when .startup() returns 0. This currently has no functional impact, as mca_fe_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/apple/mca.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sound/soc/apple/mca.c b/sound/soc/apple/mca.c index be702b2942a5..26022a42a95e 100644 --- a/sound/soc/apple/mca.c +++ b/sound/soc/apple/mca.c @@ -516,6 +516,7 @@ static int mca_fe_startup(struct snd_pcm_substream *substream, { struct mca_cluster *cl = mca_dai_to_cluster(dai); unsigned int mask, nchannels; + int ret; if (cl->tdm_slots) { if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) @@ -528,9 +529,18 @@ static int mca_fe_startup(struct snd_pcm_substream *substream, nchannels = 2; } - return snd_pcm_hw_constraint_minmax(substream->runtime, - SNDRV_PCM_HW_PARAM_CHANNELS, - 1, nchannels); + ret = snd_pcm_hw_constraint_minmax(substream->runtime, + SNDRV_PCM_HW_PARAM_CHANNELS, + 1, nchannels); + 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 mca_fe_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, -- 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 07B90CC6B33 for ; Thu, 15 Oct 2026 01:46:33 +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=geIm3+DN2+88YqenzwuAlw0qQTygaBO2u7ymd/DmvOg=; b=CC5czJgieA6Qiz hd/3K9IiWAPI8825EhWtdo91AOl4k6Y1lOgJyfnSGNaC4Vfu+rqRU7Xk88x05rI53NIENfZeW/lJg Joc3094fb4iLaNParwy15xXesz4de53g/kx1ln3vyoQi/IUbDnlU2LTJH6jmUxsj5gLiYTXmz1dRn G/o63+tHMuev85nUbsn2avwEmdk2YFLD1md9dVMC6La4XsKX2LmKZak+oucStpJ5T29Qlhjl/zA7X iyJIRnpTZzLegL+b6Cwmml75/iUuq0gQJ2XiRvsrQmVdGotxOTw2AGZrhZYkXsGP7e3GyD5cN6rGQ ARCrNtfzr6jXTwoFAHWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHAXy-0000000GbYS-2v6J; Thu, 15 Oct 2026 01:46:18 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHAXv-0000000GbXF-0sKC for linux-rockchip@lists.infradead.org; Thu, 15 Oct 2026 01:46:16 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2e8fe8e343fso18304215ad.2 for ; Wed, 14 Oct 2026 18:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792028774; x=1792633574; 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=kUuyyTReTSIMtXgKEYicRWK2Sg4dljNH29dcQFqlL0M=; b=khX0k+CAbDodT0m1e/s5wlcJd8olpid7ryIOpKwpAMOv2KC5S10JPi1088S6JJTNNX +7jKZa1xSKSJ2OhV9QFGqhBkWn6oVGQr5XxKRJ5cxsiC/HIgB7aNsp3uwL/fZv2GX78g BJKF6tcjerYJebOOqSMewcM88/gqjFIqWDzMnsPn16A6vofkrJZ3RgXpotCrystiLGt/ uHcSm9hlbt+SoOCvC3zlfipeovPLXHB/+AKEqXMFBtkNpaCFcvWYLmKp+o7pwcPS42ld WUTVFp/8iN0WkByUft+0eoD9DXuqvJzaBAcDNDpzAGFt2MfNWy3pHBVIccnMgErKU4VN lVMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792028774; x=1792633574; 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=kUuyyTReTSIMtXgKEYicRWK2Sg4dljNH29dcQFqlL0M=; b=0EJ7jS9ywbP7VG/p2iEGKU+vfnt5kjVmCaMTWflGvUF49+hj9DYcsfuJiCXYsSuFKv eEmv1ElIUGueNmxtI7U3FzlpkznxTjJvS7PL3oB2VhOGeMxjxSDayd61o3cwM5njcZ5F L2ZWAdkyhUPJh7ExzJWUCi46trFCYCqE9y4SOxWhiDhvbSTsHcOyfl7FA4zNo3SwC+Qx DVmA2ZaHf381tMI9q6LSH7j+DQe6Z0c/bhXg0iqY7sAZcF1Mogfo71zgHORk81dfwwph cwMBf6orZ2l5M5ZITeUKSpejrO1bJ+4iyPOFDTpXyKHwGkMMPI8/AyZ0bjHdm3OtskHP Zc+Q== X-Forwarded-Encrypted: i=1; AKwUvBzGu1a9Gtu4VDZeX6v+VxUPEiZNJhvdTXXvBiSyzx+i4s7v87KxiifQOpHI8r7wxtEOtrI0tVQCusimjZeFXg==@lists.infradead.org X-Gm-Message-State: AFq9FYJE2IVqYc8MDV1QJUhPcVx4O4NrsrdIJWfJMucFeGZRCmbI+Ws6 XlMLa+Jfo9q9paC+/vGxKHE/DMV1H+r+M3K/9qUkXeGspnH650714pmP X-Gm-Gg: AYBFou0AyFVlwYbdMwXy50I0q0EN/oiw4byFoXzgp4omuxAwdHmC9RRMP8CTbYvyH+x TkEje6/5Sjcesw9JlYRWCY0Wn4bHKcL7ShT3sz/Jia4sq9jNRE/QqAbC/3bI9VlDsL0YnA3NenD OX6xLFIZROIzSCwLE1Pa0XuSunyT7yyqd7wI/b3gKSr/q5ugDGHqMahafS0af7ud6nDqtlpkJVr fNKs1cP++iBwwfeqyiiOahNGYKtNQL+OqaotLuIVIjfoto/q6KnN93SiHWALj/MQfyv5JOqigt+ 6ekhvb65j2lN8iFkuMpZxJBmEtO2H8XJs92xYxjoI2PRmwiskZBYBrrCcHERaU60vUgF1Yh/Jea f5OUt/mLaMWnbLXy8bgMLjfMvEHx/smgav/NkzChYMRvrlnL5bV4k6mczP74z20DL30MTp+YASP e9A5A/2ny9xJKwKGZYC3hSzuefioWjjbSjFFA+FIxUgReizRfui2zZWIEilc/neltbNKBgAmcFF Zz63ro20aywdSywSaeRod56S7/qd1MuEpKuMcEJrA/IAf8z0RPj+qB0R0uZzfayDOjGq+eoqEYR kekC2i8Cto8Kjg== X-Received: by 2002:a17:902:cec2:b0:2dd:c0ff:e72b with SMTP id d9443c01a7336-2e842e02a57mr138459075ad.61.1792028774224; Wed, 14 Oct 2026 18:46:14 -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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 18:46:13 -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 08/25] ASoC: apple: mca: Ensure the DAI is marked as started on success Date: Thu, 15 Oct 2026 08:43:07 +0700 Message-ID: <20261015014324.5569-9-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_184615_249261_1EED1DFE X-CRM114-Status: GOOD ( 14.43 ) 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 mca_fe_startup(). ASoC only marks the DAI as started when .startup() returns 0. This currently has no functional impact, as mca_fe_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/apple/mca.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sound/soc/apple/mca.c b/sound/soc/apple/mca.c index be702b2942a5..26022a42a95e 100644 --- a/sound/soc/apple/mca.c +++ b/sound/soc/apple/mca.c @@ -516,6 +516,7 @@ static int mca_fe_startup(struct snd_pcm_substream *substream, { struct mca_cluster *cl = mca_dai_to_cluster(dai); unsigned int mask, nchannels; + int ret; if (cl->tdm_slots) { if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) @@ -528,9 +529,18 @@ static int mca_fe_startup(struct snd_pcm_substream *substream, nchannels = 2; } - return snd_pcm_hw_constraint_minmax(substream->runtime, - SNDRV_PCM_HW_PARAM_CHANNELS, - 1, nchannels); + ret = snd_pcm_hw_constraint_minmax(substream->runtime, + SNDRV_PCM_HW_PARAM_CHANNELS, + 1, nchannels); + 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 mca_fe_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, -- 2.43.0 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip