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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 E0B9ACC6B2D for ; Thu, 15 Oct 2026 01:48:52 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4j4rZq4K8Hz3c2Z; Thu, 15 Oct 2026 12:48:51 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2607:f8b0:4864:20::62e" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1792028931; cv=none; b=IhkZ3boNQPiueJY+qnsW0Xlk+K5E9TjqkpY0T4g5xKwwyJvnKpMMR7wscB+0DHtGQD3Gn0sdB19TB2vcubUmvyLejtXTnAHuGS2CLiO8msT7D+XvwjHW3P94LLTNefABmhq2h1hiZpAq2Bfj/NgXF5yxUr0KfPgV73aC7VnoT1j66nmlxtWdmHqQIvV+qBNKG+BlAoJ7L54zx1JOOJ6Hz6J6XGGs6MiHClzm4ly4ZpUI2hPDa8T8vMLqzMHG6q4y3tMFOhtcS6YyuVGEMw/7HweVPZKg7CDDzcS9/6OXlzeG53vs3NPXf/7XfhPQz0x+hwLMuoTHaWqAb34k34dGJw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1792028931; c=relaxed/relaxed; bh=yU/tI1b3Chy6tvjhfXj60ZgAk9bekyFoLKnVljFmz1M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ajh0VPW1A5RhwAQxJM/tUmnaK/snSNW8wZLvZf97so/yZH7xNh1V69g5F2B1j6Hj9eygqSFkw49Kka1WuUlGYVg+xFHbZtE/yPXECoqKevQEz6o7w3olTchSWvA96ERRuB5gqUH8qf3JZiFuFcruW1WJCtK4Z2shcD8TRfNPzHHeR3db9WilHncHn/qKFIwJ3ws3Oy7nnnMeFtHxMwpdbaRFNucld/eX/eB9pue1Ss71HzZv4pMaC4/PIMtZ8AcAfw3Jx+y5RZljgC8dECKTNPmZ5RTG+ZYZvFKYhe5/d1vrzFRVUP+QqRF8ZmifDtiNxsPpL5t/hqyUWPQrsh+dRQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=DZx+9dRA; dkim-atps=neutral; spf=pass (client-ip=2607:f8b0:4864:20::62e; helo=mail-pl1-x62e.google.com; envelope-from=phucduc.bui@gmail.com; receiver=lists.ozlabs.org) smtp.mailfrom=gmail.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=DZx+9dRA; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::62e; helo=mail-pl1-x62e.google.com; envelope-from=phucduc.bui@gmail.com; receiver=lists.ozlabs.org) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4j4rZp6qKdz3c2W for ; Thu, 15 Oct 2026 12:48:50 +1100 (AEDT) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-2e82462a3f1so9150505ad.3 for ; Wed, 14 Oct 2026 18:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792028929; x=1792633729; darn=lists.ozlabs.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=yU/tI1b3Chy6tvjhfXj60ZgAk9bekyFoLKnVljFmz1M=; b=DZx+9dRAv3kCv0vZ8rItaLjyrKFp/O7Szmfy4vYUA7+1fvLEZs0ACkMOwZ9hxXprNU Ugv481opAFGJLPmuNc2TT/SQ0ktlf/oha6dvBP59wRGfbS578IVnApnrjgHlUteJyW80 F4x2esWqM6b/+s9EyHI/ILOhISD01JOURP9u0b7NvwdHWSrEXsz0ooPxnilKK7oPHDck 9qsMpPuIcuKWOQXL6ZQXk5Ij5IS3E9Jo9blE+ZSTrwO8H5c0YVl9VJkZsMnoYYf9Rf88 c1df12EmePEhoCy9+t4qZwf/cMLqFi6ccqJ3McH95qPrjB6QzzwLRiousOLQ5UlYOjWD qcVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792028929; x=1792633729; 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=yU/tI1b3Chy6tvjhfXj60ZgAk9bekyFoLKnVljFmz1M=; b=NKr9PwuGQcSK63rz1na9gkdJ4trXWH9xwUtDhFR1BOyNXFHGi5nK2Y6NY8aH9Dda1f oIIQPBTFnMd0UlUfmIHuxNQJRRE1Xym4KQvHZ88QQNjfycwyOPXe9P1hknu61jU9QxkK O6VvHNF8l08huO6fFsHlVfzip48O5UQnquCYVpLMIKArpS/2gCEmEjozjEpOR/ehOTRz xTtfoBj4xGVyqzKH25cA6qkHwKPm9yVoYkeTKTjgDyGTVO4MVoC2A9/Pg4BiiiZz9hOx 37Vu+Puo8Wl/vPcjPNW6YzoN9EFEBJ9qJtfFm3D/V+aPFDr41lJSBGsOgIjo3u3PBx5u zV6A== X-Forwarded-Encrypted: i=1; AKwUvByCyUobN/RqX2YrhftvTyTAIXMLYtGid95HoLCo5hRq0pxorDR4kQjSBst1VcEbGJxVClk3IJXV6MHGzmU=@lists.ozlabs.org X-Gm-Message-State: AFq9FYI9TyF6wwJOdL5AwyjFPUxNq+YARgOSjQErDlhlSk7Gx5D/lX+k fS2yudLKLjSxuyVkUo8qu+ye13KASLcwMexJC8gIIRpgkrhUbLHdhwne X-Gm-Gg: AYBFou0oz8UCiO3T0XK0BF6v13ZAlf0ueJI5vWw4Xh0uXeDkr15Hw0vKtfcgPqQNShH qcQIiMzbYAnxOWTnrJrm1TE+nQrvdP4DZQUl6yKdsUpIlGyIrVW/5fDRpt63MX7bXPhLTjcieKV x8YZS5/WlOQOweuUBa/JeTLfVgM90MxszhPt40PK0nL04YuI3ZuexYw7tKExrYyZA5LryfDjJW9 R7xfse3GvmOSlFClPCPql5fngpGLnCUO6bIwMEIV4rqqFanM7g4abYrPPSO8fNXvUxzqiYcVfev TMAhFDSAMmoWjpP3MIeGis6iAnfS2OaQMKp5WG+VG/dEOr6NwOVrkuYLdsBVUOaQNOZh4MbkTjl EY4IGlU8XT2hrQNLIFz6x60wHiIdp04JRjmv7SU0z5Fqi7cqSJme2CdTADA/uydzePhHKIxK5BF +MIyMfwwWGYULHANqxwl4iY3zyFpfMio3pn5P1Zx17pdFlu9sd+Fx6p9WRXL4HRPewd3knYpFnX x82BHx0iRiZhIu1J7oyy4kr+EyzUn1hSXjxE5pctAHOaQUVTdTQqgmkjWX84yuvbYLjUA5MdQsC 9MOsjxy8jIyEhA== X-Received: by 2002:a17:902:f786:b0:2e9:3215:c458 with SMTP id d9443c01a7336-2e93215c642mr37739115ad.25.1792028928882; Wed, 14 Oct 2026 18:48:48 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e8422b8cc1sm73202995ad.54.2026.10.14.18.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 18:48:47 -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 17/25] ASoC: codecs: wm8782: Ensure the DAI is marked as started on success Date: Thu, 15 Oct 2026 08:43:16 +0700 Message-ID: <20261015014324.5569-18-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> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list 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 wm8782_dai_startup(). ASoC only marks the DAI as started when .startup() returns 0. This currently has no functional impact, as wm8782_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/wm8782.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8782.c b/sound/soc/codecs/wm8782.c index 3a2acdfa9b85..cbf0c823c022 100644 --- a/sound/soc/codecs/wm8782.c +++ b/sound/soc/codecs/wm8782.c @@ -39,9 +39,19 @@ static int wm8782_dai_startup(struct snd_pcm_substream *sub, struct snd_soc_dai struct snd_pcm_runtime *runtime = sub->runtime; struct wm8782_priv *priv = snd_soc_component_get_drvdata(dai->component); + int ret; - return snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE, + ret = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE, 8000, priv->max_rate); + 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 const struct snd_soc_dapm_widget wm8782_dapm_widgets[] = { -- 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 57785CC6B30 for ; Thu, 15 Oct 2026 01:49:04 +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=Rph20GBy3J0ETdkAIYbFmMJ1pOGc0rmW7m8Tg80afpU=; b=RgPdBJdIbOgq9D XGEXGSAt3wSNheA/S6oA1bO1SnxB4bgWT6lQEieXoRub5fmQhQHnJLEqxOPf5pEZu4PaeKhflizhS dgGTDFJWz4epe4SSmk1gQE6vCVWfhFmu8c4/xay/3NkwzzHSFeTtHMG05TOAfMQMxbkptFeGSS6Ta uyGRLsp7RqUw/y8SBQu0il7vMo5xsEAp0oWVo1uKswETSjvhcLexYvbqDaMyk1TJuinDcnF4PDdYV 8n3KPe0Mys4uS/qusq2NT0Be76qjfHKAzowFtuyDp8tOkJPrpeZeHWLDnkGiq7s0tZoh/AxHiXpF7 vYUuoks2RzNOJSnYKRkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHAaU-0000000GcEU-44wY; Thu, 15 Oct 2026 01:48:54 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHAaP-0000000GcDM-2geX for linux-rockchip@lists.infradead.org; Thu, 15 Oct 2026 01:48:51 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2e95b3b52f2so1426755ad.0 for ; Wed, 14 Oct 2026 18:48:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792028929; x=1792633729; 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=yU/tI1b3Chy6tvjhfXj60ZgAk9bekyFoLKnVljFmz1M=; b=Sk+4JYNu/u1srzArGAPSTYql9fsVJOGTUTWQ0mo/1t5OUzuO76OEHyKEsszskjYXsj V+/uUFTPQjqArFKyCqPCo6xAw5COE9AV+toQYAwpSQsFvp9gJqlCDvaURThPSgzvZVnI Gxb+HP6GjD11puwab3ljEhVDTUQYw5ZAhz64WU/v2eCGtA5+p1QasB3kh7HSvdS3y0JP hlUEGe4SjHP57AgDaONMheCfirY0ovAPcTthztxXEQfbr1ZlgHu5x/KPVLmp6k+//j3b SpduYAp/QfnSDKh6CmqMQFi3EjtRSuBqhPxi67hsebCrm0VjW6JP5V0qoi36dXHwfWfo fJQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792028929; x=1792633729; 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=yU/tI1b3Chy6tvjhfXj60ZgAk9bekyFoLKnVljFmz1M=; b=c9eQyQwb2Ft0GYj/7LAQUAHHgbV2rqymRf4E8kFY8zb+Ber3Ja/84i/AUeMfKoHjpn EsR7dQZdRyhxDnnI3HHt+09nqjbp+lP/QTdplIUecWTv67F8ChGNNopokq/lQPvlYBVk v5DFLX3J9vM9MT2LGgRc4ehRXILoUlo4inVQTja0fqTVgvYtZt+Ng+i8N/WTLatdi6hb reo5WpwAyrEP4GYA/GYYsAAVS5Jqz5rOSW/9dxuhl3lM0C6A7YOv+n/mVpbIeo65tfHm PxT63us9gZJo4IhY6V7GGkhHe1YswbohCb4zSxk7D2fTSvHx7ZhWqCWnDkDIyILXBtgJ lD/g== X-Forwarded-Encrypted: i=1; AKwUvBzcAn/hTyeF6IjbuhoY6JzgRlLcd+/il4m3I3Hh3uUUH1ymVjbTvbi9d8czMhZYncw71HtIkEGpk6dAzeadQw==@lists.infradead.org X-Gm-Message-State: AFq9FYIonmVB9CWn0KnuFI7E7j3gAKXCNMoo47hDtV4sLJk4s3F8Kuq3 eGq6IqCpmKAJnIlQuWG9quszeXQzW2OInRT6hCB72Ww/rQudg68HdjlG X-Gm-Gg: AYBFou2L/JMLs8kqvqeQxHMOjxAceM/rylWPpl77C+M9jbxkw7zTaKvBcAPI0AepR1o 2EcGmBSbAW2TUmYHOV0ZeDl7SC8m4Iw9lLh+NQOTR6sem1LRoQ1oZMbm6b1X7fq3+C0pl34PDM4 ynJYF3Z1yjgCZMHqfkiVwAXLpFQ2gaX4u2zP8wt6PgUNU+DpTCpBZ36Y5aiynsh3kXWASLeNFPq ZuPcF5/v2vZXRyvLQpWqlkxvBzWplXoBP+/DdQUtK1zL9zReMZvBMcZi9VNyTCnwkllhHzZD41+ f57IZr6KANPRhrVG+tsByvLxMWYfjyZG/2ZAlgmVzJ8fRMcOebQhp0jilOLO7xedLHScuuQtB5X 2E3D9cfEwVdaX9OuFR/udVUBlDsO4h8iPuN4DDt1rRz9jLKO6uthRjP/MCggeQXxTC+VSZQzatt cdpYCdzqxG7c3OnWyNldKcoDRPtY5Z6uOzGEh0EVar8xybVUuiXtue62W1CSZF7wYpOUGIQA8dd vR4qndlxeX5WilSXZHExp02SwKq9QMbp/hm5Wey1DLruJ3OOdtHL6qedg0RTcukQFekHXK1AWli aO5V4ffzWutgmw== X-Received: by 2002:a17:902:f786:b0:2e9:3215:c458 with SMTP id d9443c01a7336-2e93215c642mr37739115ad.25.1792028928882; Wed, 14 Oct 2026 18:48:48 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e8422b8cc1sm73202995ad.54.2026.10.14.18.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 18:48:47 -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 17/25] ASoC: codecs: wm8782: Ensure the DAI is marked as started on success Date: Thu, 15 Oct 2026 08:43:16 +0700 Message-ID: <20261015014324.5569-18-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_184850_335283_1D580F2F X-CRM114-Status: GOOD ( 14.42 ) 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 wm8782_dai_startup(). ASoC only marks the DAI as started when .startup() returns 0. This currently has no functional impact, as wm8782_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/wm8782.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8782.c b/sound/soc/codecs/wm8782.c index 3a2acdfa9b85..cbf0c823c022 100644 --- a/sound/soc/codecs/wm8782.c +++ b/sound/soc/codecs/wm8782.c @@ -39,9 +39,19 @@ static int wm8782_dai_startup(struct snd_pcm_substream *sub, struct snd_soc_dai struct snd_pcm_runtime *runtime = sub->runtime; struct wm8782_priv *priv = snd_soc_component_get_drvdata(dai->component); + int ret; - return snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE, + ret = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE, 8000, priv->max_rate); + 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 const struct snd_soc_dapm_widget wm8782_dapm_widgets[] = { -- 2.43.0 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip