From patchwork Sun Sep 11 14:57:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Rudenko X-Patchwork-Id: 12972910 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 CBDBCECAAD3 for ; Sun, 11 Sep 2022 14:58:36 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=LTbjEU5MUCD8v/wyu1u5d0hv6iNi4NeNmlhttgf0UZg=; b=Qrkgqa+Qw7trpF CKocmJpKeg8X+xBvt+psjltqhOArBiwjA4OXreS+pr+S5jXb4LFi0cShqo8Rp09rIMfOn+rQURn/E 4EDwLIZ3UGDCcULZlXfTuHn0BJVGRiwawfZmMRBm9puIC5g3oEf6JJMU6dknLX//rvGaXVRZkGvuc TzcYF/7N5CDrHSmTHMcegRgeu8oEwOmp9/vlT19BbEmFbJnxYpCkAxR9MHJy+mhc1RwYBpJAtJ8mF KRxrlTGeyGOCM58wXOgZ6OVClE8zIemBjt/oVvMHEW4A5J9xmjuXB5SaVG/bm7gCTemNS65u1dCmo oFh5ULxdUSVKDpvIyM1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oXOOs-002a2a-OO; Sun, 11 Sep 2022 14:57:34 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oXOOq-002a0b-4v for linux-arm-kernel@lists.infradead.org; Sun, 11 Sep 2022 14:57:33 +0000 Received: by mail-lf1-x12c.google.com with SMTP id f14so9919764lfg.5 for ; Sun, 11 Sep 2022 07:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=eAQ7pZ3gOqppStIbzWQfQ4sG+iuDRIjLuat0vE00Rkw=; b=i/f4nXEJosWajMhzlcgxo2AeRYy8/SU8YuJsy/YUexGUSfmdHSfyaXFHg67uwCzsZb CR/VJbhPFE3qG02Dz87HQ9kq3KyWDatY6+wb99maWe+95+TNU45rKgTiCOv+VSP/9V1V vguqDDgMyaJ1D8i7P6UXyIX41SjYzJx6HmUoG126H/Q+EzuVmAZ7DYCLqVHx3IapunVh v1m5TVQdblRjU6beiAIxjsWfs76gCfl3dAqV45FHzMxtddBYYRobhEMYXGHeotwh+sXv 1Rq2SavvkmaOgsDp+osvWjbzAHvUIG/Vop9j/gtmGReUBz7NqGju/T7zQxZKpe2oyA2a xvcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=eAQ7pZ3gOqppStIbzWQfQ4sG+iuDRIjLuat0vE00Rkw=; b=ysPCaAUtFXquZq1Lu3yNavye+C9TllDY8HPxdyjp+ZTozTzpb0ZGPzZeWNUzqRknBo dUnx2+vc3iifJLyOpmHwU8VP/9GFpaBJjuhmnWbSJNWy7YReP8q5bcMbBSFQO7vxGz7y b1rZMF4Kxr04WBdE5D2K2mDnUETtrnBhOHh7jWl8ihUJTfCuwDKN1qPzSgbjQKkLwHH+ yIRLo8qw0EINh1JmfGhtlNQ8h6f6JOHNiksQwhBmprJFjL9D6PgTsb+St+mHyOtATNL5 DzlcQUR3jWni/YYYXbY96EEdmN4u/hD6P1q24F7LGMtaBk3z9DpNP73btufns23qAsxk ju+w== X-Gm-Message-State: ACgBeo1iBXC/I2yV94L2GROxV/3dyIbGdSPZUqli0rXlBRNoDMqLpmPa CnS+43FbuR7IeScFPWvDV3U= X-Google-Smtp-Source: AA6agR4dOV0r3KZlPBj/fj8prupK0Ya8fCrBCJbZOIV671RYwn5zSNIK6JfGj+HSnJYrgcAzn07meQ== X-Received: by 2002:a05:6512:3090:b0:48b:6e1:1b55 with SMTP id z16-20020a056512309000b0048b06e11b55mr8106591lfd.535.1662908248930; Sun, 11 Sep 2022 07:57:28 -0700 (PDT) Received: from localhost (95-31-185-216.broadband.corbina.ru. [95.31.185.216]) by smtp.gmail.com with ESMTPSA id k5-20020a2e9205000000b0026181f65600sm675817ljg.136.2022.09.11.07.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Sep 2022 07:57:28 -0700 (PDT) From: Mikhail Rudenko To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Kuninori Morimoto Cc: Mikhail Rudenko , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Date: Sun, 11 Sep 2022 17:57:11 +0300 Message-Id: <20220911145713.55199-1-mike.rudenko@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220911_075732_253028_861894F7 X-CRM114-Status: GOOD ( 14.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Signed-off-by: Mikhail Rudenko Acked-by: Jernej Skrabec --- sound/soc/sunxi/sun4i-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 60712f24ade5..01b461c64d68 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -1825,7 +1825,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 Sun Sep 11 14:57:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Rudenko X-Patchwork-Id: 12972911 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 27BF1ECAAD3 for ; Sun, 11 Sep 2022 14:58:44 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sGP6Q+rn0fSZ5ve1Ls2x0fmMn1UWsWlcbyBlSo3B+jY=; b=lK1vqBKlmCFvPC ibBYD4h5OYYF5UQz6MYjgFl/XGFOTGdWvulSznoJEz1J+nsLXXyoonvPofllQjlgoNHWNR1Hw1eJh EmEOuM5Cz2gZL8U2J8BegusL6kyFbFDDwp4k4h0ae3/448GOZvm27IFSEYE8ot7JCaaff1kxIzE8M dfVM+Y4a6qczBALFfMbEQ3JFgpIB+c/fpHDZZqQsjWTcz0xdsSTdrQc15caRDlkTJp8rwKuWmf/eq da65A1QooXZjZTx00upFqRqu3FwtHwXd0UYiUzRrUCfElM7spOFWUSHQ2ZIv8DYD6GEG44gvMiKZL ThTvNUojkGTtNtlp930A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oXOP2-002a8E-7I; Sun, 11 Sep 2022 14:57:44 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oXOOx-002a50-0a for linux-arm-kernel@lists.infradead.org; Sun, 11 Sep 2022 14:57:40 +0000 Received: by mail-lj1-x22c.google.com with SMTP id bn9so7764479ljb.6 for ; Sun, 11 Sep 2022 07:57:37 -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=I8h6IKACxQlXXVq1OeWv2JZIqExd2BXra4rChfH99Xk=; b=QQcsfunSn1opiSC+tGIBb/82hXMfbk8jt/xhW4pgbxegftG1gG0ErLsBhw79+MXAab smwr36fp7WOYftAeRvzqTtLTMoRTkY1RlwVkBKd4o2vxpLJWOe6ozb5P9ntM2HKwLiQO GYLCCugpsnnPcWVXPpZ9hqYklyBCpuNGAEn6I068BtEtVIlQuXOuE92+cCtaZLsgd2Q9 vHqz6HIPJ0iVXR3aVsjFVzhDoXPDESwUnytu1VtqmKOzdeqj8to/HMfWG8SwYEFRc3kC minkouqdBBusqivhJeR7GzMNItSHRSlnYUXzV+I953LQkCUVrD0dPPH/AyeIL8cKSHJn Q5Nw== 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=I8h6IKACxQlXXVq1OeWv2JZIqExd2BXra4rChfH99Xk=; b=0tQ8oTfm+clzvEnoCtCdepwGEr/+0LSbyF8ZS/vulhLAXSQR6u4MtObiR/OPNUzPFP JTAc7gHld0kbjtynk5AIYTsQqIrvBxYO87v8vdjZ7ZkgbpsEs8I+sEDu7JdaQljv/1zm d7ldfvOSfy3zrWl+1PKWsJufhtfYFnzUjCz/OP0gV8Oj89TjEhH+XBhRITKVItsBIPQz vPw3Xspa75q442+plLKxyFVYZg37merTzViPtrRhoeXUdMhrNl6cphETkZlS6+JTJzny LDR3DwHQje+oqg7yl0aXLMqhNjXk4sbpS3vrbHYKd/qeqpgY4RdCH4zqln2yqZadMb+S KWgA== X-Gm-Message-State: ACgBeo1K0jjwWfSGQIH5APumM1SALI1rz5EO0UgDsGl8r0Dw60Kn3lqG s3NgPs02EBve9jCMWWXjiXI= X-Google-Smtp-Source: AA6agR6KZCWm2WPTqfmyxsXJXyYXPDtajUhuPpJYX5iMpEbTFfpkYbV2J5gKHD8BN9cp+Wh+DQVtCA== X-Received: by 2002:a2e:a9a9:0:b0:261:bf5a:8ff3 with SMTP id x41-20020a2ea9a9000000b00261bf5a8ff3mr6654761ljq.252.1662908256454; Sun, 11 Sep 2022 07:57:36 -0700 (PDT) Received: from localhost (95-31-185-216.broadband.corbina.ru. [95.31.185.216]) by smtp.gmail.com with ESMTPSA id p39-20020a05651213a700b0048a9e18ae67sm636891lfa.84.2022.09.11.07.57.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Sep 2022 07:57:35 -0700 (PDT) From: Mikhail Rudenko To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Kuninori Morimoto Cc: Mikhail Rudenko , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Date: Sun, 11 Sep 2022 17:57:12 +0300 Message-Id: <20220911145713.55199-2-mike.rudenko@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220911145713.55199-1-mike.rudenko@gmail.com> References: <20220911145713.55199-1-mike.rudenko@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220911_075739_082664_6840B5CD X-CRM114-Status: GOOD ( 11.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Acked-by: Jernej Skrabec --- sound/soc/sunxi/sun4i-codec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 01b461c64d68..4d118f271e8c 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -1253,6 +1253,7 @@ static const struct snd_soc_component_driver sun8i_a23_codec_codec = { static const struct snd_soc_component_driver sun4i_codec_component = { .name = "sun4i-codec", + .debugfs_prefix = "dai", }; #define SUN4I_CODEC_RATES SNDRV_PCM_RATE_CONTINUOUS