From patchwork Mon Apr 10 22:39:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 672048 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 681ACC77B61 for ; Mon, 10 Apr 2023 22:40:58 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 14F671030; Tue, 11 Apr 2023 00:40:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 14F671030 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1681166456; bh=WvpbiUlY+1OBAuaKtGC9zbtP9lE4G4zdh1NCzFiZtv8=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Vj2E38m3saNLauwg06rwgMIHpMgogSZai9af/2btXq0AtEV8ePPD593ZfgABevcnt VXwD6vY6AMKrb2tn9QIetNj1HId3gE0IVkJ2pOqIlrbxjDRZokQGGZBGouDmWw65iU DJ7oAd3XmrCvASfptqdvJHiOK4fIhwHGOtSQB6e8= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 46F0DF80524; Tue, 11 Apr 2023 00:39:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9489BF8049C; Tue, 11 Apr 2023 00:39:12 +0200 (CEST) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F291DF80100 for ; Tue, 11 Apr 2023 00:39:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F291DF80100 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=F+gsdJ8f Received: by mail-wr1-x42a.google.com with SMTP id o18so5721985wro.12 for ; Mon, 10 Apr 2023 15:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681166346; 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; bh=dNwzE4KtIR7VA8WEdFR1Y325MnwjNn/HP5LmgOvBXjw=; b=F+gsdJ8fCjBl/In9VkEjngqOT7Yuy4rIlgNTgygFtjvwflyMXmqET1mjhlBYH4h/hK UapCpXSmCP5mAkgUJkJ9xtllBixS1M7NeDhQJzNyzoakQgm7T49tE4pNAEm1YTrWbn8f i0L9R2NTth5sj0N2S1NoFjUb4Z+83LqH5dScPFvzIIZIAZ+zcbO/S2lhE1DNKnh3e/rt G4WcjnxgSToUUhOPlLr1ZtKawVIYKB1ltq9/PZyILVBqdYT+bQr+5IjeCwCazzV9C+Rn HRkjTJ9HhANlIzvKd3TacCbtXRJAs59ZcBBTdJnMu/joEG4yIQZ5+6rigL2hvk2P84Lz pBWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681166346; 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:message-id:reply-to; bh=dNwzE4KtIR7VA8WEdFR1Y325MnwjNn/HP5LmgOvBXjw=; b=Y7Emosb0AbOQd2XejNy0/QLkDT7N8snpCajLvfqHDY/FAO6Ff8XLbgdzNlYd4ilMLT 7sDjRROdvbyo5S2/nhJltzuVS30a+AKG4ixYUa1zTdhrTRiQ3AC8UtJQQXViug6YHo75 Srk8Mq2UZq06Y9vs23CYz7t4Drt8yrpS7ZnYNxhovhm/510hoiYiku3OYLp9Msj58g/w d3AfNaYBavDJ84y9RQO83KarBJm/AbMF9WfbGonEEYH2/CuAo61tHfQsqONZYU9rDuV3 hSVTtFRv+aWkU2Qoa13WJEAh5TBF/qqk/02WG49t9YKOd3VViOLdLuA/AuLoqphxNZZg WurA== X-Gm-Message-State: AAQBX9fa29ZViGktI+5NwySrSUbTFHeF47mZ3SfwM22d2jXxLGCQR0ta phrXkln1Xk4SbwuVygWl4dRyrUKSuS4+wA== X-Google-Smtp-Source: AKy350Y/Jw0fJS5n1ttIDBcdNXFNA0aKae15RlsyioYA7N5Vk0r0ouA/4vMJ+EkD1ObVbRm/7DG4ew== X-Received: by 2002:adf:f3cf:0:b0:2d5:2c7b:bc5f with SMTP id g15-20020adff3cf000000b002d52c7bbc5fmr8960195wrp.58.1681166345763; Mon, 10 Apr 2023 15:39:05 -0700 (PDT) Received: from localhost ([2a02:1210:8629:800:82ee:73ff:feb8:99e3]) by smtp.gmail.com with UTF8SMTPSA id m8-20020adffe48000000b002c55521903bsm12862966wrs.51.2023.04.10.15.39.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Apr 2023 15:39:05 -0700 (PDT) From: Alexander Sverdlin To: alsa-devel@alsa-project.org Subject: [PATCH 1/3] ASoC: ep93xx: i2s: move enable call to startup callback Date: Tue, 11 Apr 2023 00:39:00 +0200 Message-Id: <20230410223902.2321834-2-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230410223902.2321834-1-alexander.sverdlin@gmail.com> References: <20230410223902.2321834-1-alexander.sverdlin@gmail.com> MIME-Version: 1.0 Message-ID-Hash: YK2Z7DK6SM5GFHVDBYNASOXFYYNITA4K X-Message-ID-Hash: YK2Z7DK6SM5GFHVDBYNASOXFYYNITA4K X-MailFrom: alexander.sverdlin@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Alexander Sverdlin , Nikita Shubin , David Rhodes , James Schulman , Liam Girdwood , linux-kernel@vger.kernel.org, Lucas Tanure , Mark Brown , patches@opensource.cirrus.com, Richard Fitzgerald , Takashi Iwai X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Make startup/shutdown callbacks symmetric to avoid clock subsystem warnings (reproduced with "aplay --dump-hw-params" + ctrl-c): WARNING: CPU: 0 PID: 102 at drivers/clk/clk.c:1048 clk_core_disable lrclk already disabled CPU: 0 PID: 102 Comm: aplay Not tainted 6.2.0-rc4 #1 Hardware name: Generic DT based system ... clk_core_disable from clk_core_disable_lock clk_core_disable_lock from ep93xx_i2s_shutdown ep93xx_i2s_shutdown from snd_soc_dai_shutdown snd_soc_dai_shutdown from soc_pcm_clean soc_pcm_clean from soc_pcm_close soc_pcm_close from snd_pcm_release_substream.part.0 snd_pcm_release_substream.part.0 from snd_pcm_release snd_pcm_release from __fput __fput from task_work_run ... WARNING: CPU: 0 PID: 102 at drivers/clk/clk.c:907 clk_core_unprepare lrclk already unprepared CPU: 0 PID: 102 Comm: aplay Tainted: G W 6.2.0-rc4 #1 Hardware name: Generic DT based system ... clk_core_unprepare from clk_unprepare clk_unprepare from ep93xx_i2s_shutdown ep93xx_i2s_shutdown from snd_soc_dai_shutdown snd_soc_dai_shutdown from soc_pcm_clean soc_pcm_clean from soc_pcm_close soc_pcm_close from snd_pcm_release_substream.part.0 snd_pcm_release_substream.part.0 from snd_pcm_release snd_pcm_release from __fput __fput from task_work_run ... Signed-off-by: Alexander Sverdlin --- sound/soc/cirrus/ep93xx-i2s.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c index 200d18060f7c..bbbb1065b2f1 100644 --- a/sound/soc/cirrus/ep93xx-i2s.c +++ b/sound/soc/cirrus/ep93xx-i2s.c @@ -209,6 +209,16 @@ static int ep93xx_i2s_dai_probe(struct snd_soc_dai *dai) return 0; } +static int ep93xx_i2s_startup(struct snd_pcm_substream *substream, + struct snd_soc_dai *dai) +{ + struct ep93xx_i2s_info *info = snd_soc_dai_get_drvdata(dai); + + ep93xx_i2s_enable(info, substream->stream); + + return 0; +} + static void ep93xx_i2s_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { @@ -349,7 +359,6 @@ static int ep93xx_i2s_hw_params(struct snd_pcm_substream *substream, if (err) return err; - ep93xx_i2s_enable(info, substream->stream); return 0; } @@ -398,6 +407,7 @@ static int ep93xx_i2s_resume(struct snd_soc_component *component) #endif static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = { + .startup = ep93xx_i2s_startup, .shutdown = ep93xx_i2s_shutdown, .hw_params = ep93xx_i2s_hw_params, .set_sysclk = ep93xx_i2s_set_sysclk, From patchwork Mon Apr 10 22:39:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 672047 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 2928CC76196 for ; Mon, 10 Apr 2023 22:41:25 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0D4921038; Tue, 11 Apr 2023 00:40:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0D4921038 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1681166483; bh=Q+bTa5oWFv/tzALUdVrSwXQAZdaYfE3mk+N4eTqg/1Q=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=UT8kkLqdP2RjKH3nxtHxrX8uSBezsNQQej+btn+Imx2zrEPtnJcEVRi7qnk7lfBub nlZ2zk1NYuHimUL5ZVPkNZ1m1/fiLdVd8/oD1E6jehmmh0f8JnhWPQMPop7qV96OiE reg5C1QPn87Jf2hR8aFEIhRGNiCXfRevEzZw0rtI= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B60C2F80551; Tue, 11 Apr 2023 00:39:21 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6BA4AF8052E; Tue, 11 Apr 2023 00:39:16 +0200 (CEST) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 61886F8032B for ; Tue, 11 Apr 2023 00:39:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 61886F8032B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=dHR8/FV/ Received: by mail-wr1-x430.google.com with SMTP id d9so5799339wrb.11 for ; Mon, 10 Apr 2023 15:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681166348; 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; bh=EEW0TzE/iHLHzvHGUl4AlDs0HbakMRi0xvPaOvsk9N0=; b=dHR8/FV/VB9elKmpSAI11sosqQDYQcCFq6jASEZo+UpPU3+vILSJQuioDyDmtNvHXf 8u4dnSowc6o1mn6woXbnveHCEWdNhXZXUWsoATMtaEx8nI+XRbwu1okv/F6YHrmPxH+i 9Q0VBDJs4BVSPHPZExrlCyqKVzB+p8G8ml4/nrC3z3dqWMBi6TnQyLG9nqCP4u79xhvx VL+GkBPP50Ez87OC3rF+87FPDQGNOOO7XcbIU+AqzEOYMGrz1GG4RxAz4FPXcYjH1Ep/ 3nCjTZPWchY/VTI4SIERMzRrV41pHntk/4eY9P4YHTGRb67w5IjyWoy0b+TN81uaim+h 4g2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681166348; 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:message-id:reply-to; bh=EEW0TzE/iHLHzvHGUl4AlDs0HbakMRi0xvPaOvsk9N0=; b=G9BFfD4myvGpZAe5m2shMdT+FH0gWflKsQ6EmIPg5IjN5tIM+Q+2XY+6BeA0yy3TfF Jl+N4OTgHVEvK5SoK3Xf5tsLWFkIbQDBDU7G2b9pPbKzkCpQ6CoY64g9D7cZ6kPfe37x y9Fc0TK+ebRjJdrZQjdQi8gGekONwFkxcNd1N4z2OhX4BusrSGXWUZ6e8hrSOCAIk/9P bpBmpNkcoRaLHNLQcaNLCcTvKfVqtIorfGN5ykkOfPS1nyK5kNCZ4M4/KfVo9pR5YNda mi4hxOe4GrkM9QyPkklQJ3Ei6nV4FSEH4xIF/IqysIPzwDxe3Q3u3End8m0MFGGNVjou rTUw== X-Gm-Message-State: AAQBX9f08Qvz2Wcr33PN2j50wvwTpjklW1ExNKcL8pXJNDoP1JUsr8Cy Pz+dXLSIY/rI9xr1NgGB41GEghoxHun6cQ== X-Google-Smtp-Source: AKy350b+wO4MJpD+u43vMScwz8azVmGnCXgzWl1VMIGqdNN/fQ1K6gERKuwr5WmiqLpz21Q+CGs6bw== X-Received: by 2002:adf:e785:0:b0:2ef:b21c:f6a0 with SMTP id n5-20020adfe785000000b002efb21cf6a0mr5474454wrm.53.1681166347771; Mon, 10 Apr 2023 15:39:07 -0700 (PDT) Received: from localhost ([2a02:1210:8629:800:82ee:73ff:feb8:99e3]) by smtp.gmail.com with UTF8SMTPSA id p17-20020a056000019100b002f1dc56579esm3637350wrx.2.2023.04.10.15.39.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Apr 2023 15:39:07 -0700 (PDT) From: Alexander Sverdlin To: alsa-devel@alsa-project.org Subject: [PATCH 3/3] ASoC: ep93xx: i2s: Make it individually selectable Date: Tue, 11 Apr 2023 00:39:02 +0200 Message-Id: <20230410223902.2321834-4-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230410223902.2321834-1-alexander.sverdlin@gmail.com> References: <20230410223902.2321834-1-alexander.sverdlin@gmail.com> MIME-Version: 1.0 Message-ID-Hash: MLDYZLVFVOSZIJMCRW3SS2EHBRAHRX7Z X-Message-ID-Hash: MLDYZLVFVOSZIJMCRW3SS2EHBRAHRX7Z X-MailFrom: alexander.sverdlin@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Alexander Sverdlin , Nikita Shubin , David Rhodes , James Schulman , Liam Girdwood , linux-kernel@vger.kernel.org, Lucas Tanure , Mark Brown , patches@opensource.cirrus.com, Richard Fitzgerald , Takashi Iwai X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This is necessary to replace EDB93XX specific SoC audio driver with generic "simple-audio-card". Signed-off-by: Alexander Sverdlin --- sound/soc/cirrus/Kconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/cirrus/Kconfig b/sound/soc/cirrus/Kconfig index 34870c2d0cba..38a83c4dcc2d 100644 --- a/sound/soc/cirrus/Kconfig +++ b/sound/soc/cirrus/Kconfig @@ -8,7 +8,11 @@ config SND_EP93XX_SOC the EP93xx I2S or AC97 interfaces. config SND_EP93XX_SOC_I2S - tristate + tristate "I2S controller support for the Cirrus Logic EP93xx series" + depends on SND_EP93XX_SOC + help + Say Y or M if you want to add support for codecs attached to + the EP93xx I2S interface. if SND_EP93XX_SOC_I2S