From patchwork Tue Sep 13 21:22:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Rudenko X-Patchwork-Id: 12975397 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 A7F77C54EE9 for ; Tue, 13 Sep 2022 21:24:02 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8272A17A9; Tue, 13 Sep 2022 23:23:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8272A17A9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663104239; bh=lKF1jCOzRtAkO9GC+HUc5mXA2fizB9VVIZs5GM8JdbM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=X1YJT2azQaKN4ZvhaMD80DvQc7bpSZOLSaEutcdaGg86xtinW0SpEMpDowUeo34N4 dJvNMTxzK4OIZHT+AAWrUeAiBbULqszVNv/nS0ypPZHJ59LjQ5IzBpS5+vatJDy/el NzprH8laaIT+mj+/ZV2eDGqS07q4WbeU3p2e+Jsk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0EDD9F801EC; Tue, 13 Sep 2022 23:23:09 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E2543F80224; Tue, 13 Sep 2022 23:23:06 +0200 (CEST) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 409AAF800FE for ; Tue, 13 Sep 2022 23:23:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 409AAF800FE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Qik0HCAE" Received: by mail-lf1-x130.google.com with SMTP id a3so10123926lfk.9 for ; Tue, 13 Sep 2022 14:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=IcnIgmMTd0DbyquQgMbmNfx9FsBF4BI9rV5mzK+kC9s=; b=Qik0HCAE4mWGdPhhl3Z4XxHZp2Fsh0qBqor3gfQ7RHj1oA6dc1TrGetu03nykh1gIs w+ofH7Fq69SEMBdJ6Ch4oIylIIktjNbYHlz/yjxBxzoJ4pRA+e6nMmQ4GUXJUYgi7fdO ZUY3CacnUYhm1obecq1Z183lWv5T5Jw0YJnsIXaiSMe7zocNkqyvQzKrIM4M7d88m2HQ IfJM1vEV597EU42uX81zY0iOXdGc5+/VGJG/4bp5uVAFNB1s5HEJw0Q0DB/s4FOosgez t5RMwiGNUr3quyrVSVMEYmfX6VB1rt+KlxCbBwURFi/6i0gclZ8xRNSu6UiGPjteEK2U 6pPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=IcnIgmMTd0DbyquQgMbmNfx9FsBF4BI9rV5mzK+kC9s=; b=k+gjHGLaMrxUdxSbD55eilR/ZkxNLrY0lib92BiC0OZ+u+v4mKIS2+91eNhIoA1k2p ocgoGZJ2PzRotXjk6eHrv4Oe+3yvxpioeJhy9fBMf5dmabVOMJ2rGqlXIUsXFpuhs+ig hdQuDTFR+2nrp2UOZ7evRCiPcSQSv5zfnXevBzoXsqyaU89j/nHxaSwwJ2XMiAls8VXI 5yfcVlI7x4BSw2jQebw50cUlrhjYWaORjPO/GPPhF268aib9sLZP2jVGxzMBOGPShe+/ 4QnHFJAtmjC8L9d9ChCKsA9gNS3HLLIW41jen7UwEcrUfI9ee5oNwz6iyVj9YkXnz46O W+UQ== X-Gm-Message-State: ACgBeo3Ss7WtWv/SnOA9JEeXT989DOSAcZ6FKTxJ3v+jQ/uuvoDMTHhg VLrQYkXSfOXXXMtoJq68zTg= X-Google-Smtp-Source: AA6agR7lqpwxdnlrp1g555khCJ+9y1Mn78ZuFzcawcY9GJzf7Jw2t+odgShu0RDTZclAju9cgeR/kw== X-Received: by 2002:a19:e00d:0:b0:492:e5a5:588b with SMTP id x13-20020a19e00d000000b00492e5a5588bmr10452415lfg.243.1663104182075; Tue, 13 Sep 2022 14:23:02 -0700 (PDT) Received: from localhost (95-31-185-216.broadband.corbina.ru. [95.31.185.216]) by smtp.gmail.com with ESMTPSA id s28-20020a195e1c000000b004979da67114sm1964736lfb.255.2022.09.13.14.22.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 14:23:01 -0700 (PDT) From: Mikhail Rudenko To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Charles Keepax , Li Chen , Kuninori Morimoto Subject: [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Date: Wed, 14 Sep 2022 00:22:54 +0300 Message-Id: <20220913212256.151799-1-mike.rudenko@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: References: MIME-Version: 1.0 Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Mikhail Rudenko X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" In the case when a codec device is probed before codec analog controls, snd_soc_register_card() returns -EPROBE_DEFER, resulting in a misleading error message sun4i-codec 1c22c00.codec: Failed to register our card even if the device is probed successfully later. Use dev_err_probe() to demote the above error to a debug message. Acked-by: Jernej Skrabec Signed-off-by: Mikhail Rudenko --- changes in v2: - rebase against current tree - add Jernej's Acked-by sound/soc/sunxi/sun4i-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.37.3 diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 830beb38bf15..3a7075d03c23 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -1804,7 +1804,7 @@ static int sun4i_codec_probe(struct platform_device *pdev) ret = snd_soc_register_card(card); if (ret) { - dev_err(&pdev->dev, "Failed to register our card\n"); + dev_err_probe(&pdev->dev, ret, "Failed to register our card\n"); goto err_assert_reset; } From patchwork Tue Sep 13 21:22:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Rudenko X-Patchwork-Id: 12975398 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 C5AC7ECAAD8 for ; Tue, 13 Sep 2022 21:24:29 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9546D17CF; Tue, 13 Sep 2022 23:23:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9546D17CF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663104267; bh=xNrsv2MyEJ3FHOW/gD5EaKJ/v3TZwtZWcmHwJKaHJSY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tqtka4zB+BUW7tiGEhYNF6TGFp5szrsQMJWoPLyS4VPmFNVqUkg/7OfGyV7H9Y+wR vZg+SCi/moDP2MaoScN7NeqnQ9BmcgQCJLHHO4aD8E+IBzpd7Iehffl94w0n06Zeil eKDbrwl22p2RIyUSnoBa9quCUCIVkdY9fNoYKzR0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D418DF8008E; Tue, 13 Sep 2022 23:23:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 30654F80431; Tue, 13 Sep 2022 23:23:10 +0200 (CEST) Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 635C3F8008E for ; Tue, 13 Sep 2022 23:23:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 635C3F8008E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PFSKJZ6g" Received: by mail-lf1-x12f.google.com with SMTP id f14so21157992lfg.5 for ; Tue, 13 Sep 2022 14:23:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=s9fWB+KIpWEfG0ChDe1LcnxfLz16/kGFFSIfjNPpFqg=; b=PFSKJZ6gXwhxNTRmtTVhaeQp46N+lP4VFWn/lQvm2dv0lKJ+ah8FUS5waaRZoZ9RVs TJHS2AGrgxI29RRAmLT9EJZFTvbQSopCWNEjNpAUL2QijGQFQJECoAEAIAsTTC2ZskBg qIn79PNZHDQ8/Ae27hX0fyiU/UHXr9+jbNzxtHFAMCD4Ju/UQ++1zPEP9yaDLxTMEUVn r58L3YJxIdUuZVPZeU471yBBWlLnj1+li4hj1sKKKkwHWET7uWm3Mja8T5hG8M9oFAJO 1w4d5oy3+pqBl3WbCafGgg6rWWnwSHXXt7fAA1z+rGzILMywDlcP1EEDGx19P37AfpbR x/EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=s9fWB+KIpWEfG0ChDe1LcnxfLz16/kGFFSIfjNPpFqg=; b=RNWygbCim2AtETDt52DdWpoii72Bzsan1dzXgP0t1SuZKDEuZRnRfXSQ5ENNVHL/SX QfqNecSFb9VV5ivK2uEiRYePK2WD820KZYDLweOHThfc0xY9vRY5FxwWHBmM7ooWbSAi u7W84VsjtQOKhI6vQKu5eRjOOiBB3pikD7sRHKbsYBdLBDwNPtuIBRxx1SHQ5s9jw+Hx rUJPtnVIhFZWQQxQfEv1UpjbSdgstRELe8qgeCSnkrB5baFWtKATk/9ncvTRqFvd91z1 oHQJATXXRTMcpWfYAitvhdH5rYmpxp/BtJpUU+yXaZ2V1Y7SPf5jeZYFsCMjaPk6DAkQ mlAg== X-Gm-Message-State: ACgBeo3u598vEzOcaTxGQ9KEym1fzbM+Cd03fm/5lEGv/2QRr87sJ9XD j5qmmJT7lbhxPhcJnb8zINLlOx2AMEtWGQ== X-Google-Smtp-Source: AA6agR7Omz0Ba3AN6qiv2ULvX39qzey9tyjPowF3y2cHjuujTfPT0e38hrLtPKHjw1JIch+djby9Zw== X-Received: by 2002:a05:6512:4002:b0:499:280:9c5b with SMTP id br2-20020a056512400200b0049902809c5bmr7376695lfb.593.1663104185266; Tue, 13 Sep 2022 14:23:05 -0700 (PDT) Received: from localhost (95-31-185-216.broadband.corbina.ru. [95.31.185.216]) by smtp.gmail.com with ESMTPSA id 28-20020ac25f5c000000b004998d9ccb62sm1597517lfz.99.2022.09.13.14.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 14:23:04 -0700 (PDT) From: Mikhail Rudenko To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Charles Keepax , Li Chen , Kuninori Morimoto Subject: [PATCH v2 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Date: Wed, 14 Sep 2022 00:22:55 +0300 Message-Id: <20220913212256.151799-2-mike.rudenko@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913212256.151799-1-mike.rudenko@gmail.com> References: <20220913212256.151799-1-mike.rudenko@gmail.com> MIME-Version: 1.0 Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Mikhail Rudenko X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" At present, succesfull probing of H3 Codec results in an error debugfs: Directory '1c22c00.codec' with parent 'H3 Audio Codec' already present! This is caused by a directory name conflict between codec components. Fix it by setting debugfs_prefix for the CPU DAI component. Signed-off-by: Mikhail Rudenko --- changes in v2: - rebase against current tree - add #ifdef CONFIG_DEBUG_FS guard - change prefix from "dai" to more specific "cpu" sound/soc/sunxi/sun4i-codec.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.37.3 diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 3a7075d03c23..835dc3404367 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -1232,6 +1232,9 @@ static const struct snd_soc_component_driver sun8i_a23_codec_codec = { static const struct snd_soc_component_driver sun4i_codec_component = { .name = "sun4i-codec", .legacy_dai_naming = 1, +#ifdef CONFIG_DEBUG_FS + .debugfs_prefix = "cpu", +#endif }; #define SUN4I_CODEC_RATES SNDRV_PCM_RATE_CONTINUOUS