From patchwork Fri Sep 1 14:45:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elinor Montmasson X-Patchwork-Id: 13373857 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 188EFC71153 for ; Mon, 4 Sep 2023 12:46:01 +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 1D3387F1; Mon, 4 Sep 2023 14:45:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1D3387F1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1693831560; bh=cOSRTtxerFltyzX9sjv8zONfz8Eb13gOdN301tbZTlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=NBbDAueQqPfZeaA4SP0qZekA+KV8hMF0S15N/sHPnKITHVu8YSphqdWt7S/aihCDz esYsWNywflHaZkNwGGO2aTObCvqibfirtLpgkgk5FWuCCdL1Sv4DFR8OE46xOgoSE5 /dWu21c91TCPx3IgzMJCc+Tod0dSAkj8H2zuHnoY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 098D3F8057E; Mon, 4 Sep 2023 14:44:15 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3A107F80567; Mon, 4 Sep 2023 14:44:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2EC92F80236; Fri, 1 Sep 2023 16:46:35 +0200 (CEST) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 2ED78F80074 for ; Fri, 1 Sep 2023 16:46:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2ED78F80074 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.a=rsa-sha256 header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=IaOxiW6R Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id C9BB39C1115; Fri, 1 Sep 2023 10:46:27 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id FeMSPVehX3d5; Fri, 1 Sep 2023 10:46:27 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id E481A9C28B5; Fri, 1 Sep 2023 10:46:26 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com E481A9C28B5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1693579586; bh=cqRocUh+hN2gzQVzyFD6F/wLcSVPZ0dNm/yHaFAK+WE=; h=From:To:Date:Message-Id:MIME-Version; b=IaOxiW6RQNxNRbdyou/YC2FQ854ijS1Lj5VPX60JKMLlowsmCbd5DLWh3se/pys/Y pX4TeHxT5Dtqke/lHfKLSGOjSe6XTvvbfK3uMXiD+BZeJUDlq4RsMV0/XQLQGyumKx QCSYbS1e4kPAo4I8vt+GPg/jvLrM6Em8h/oSZIDx0JUIOHHbKfpZ+wtnWIR7h27QyX SA3vY7BtI9Mx42A0mDmR4fZpfLbL9zLOJxgoH9UMdBq43t0GNYVYRsiSWEyy0hUqns qGSx6xQT7soRBJmlaszepNGDceTftSRzXz3CE4FQLgAqvMtMcNET9RcTublhruyFob uwyn4hq4hIgzQ== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id ZGQOzTyWeuK7; Fri, 1 Sep 2023 10:46:26 -0400 (EDT) Received: from gerard.rennes.sfl (lmontsouris-657-1-69-118.w80-15.abo.wanadoo.fr [80.15.101.118]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 164389C1115; Fri, 1 Sep 2023 10:46:25 -0400 (EDT) From: elinor.montmasson@savoirfairelinux.com To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com Cc: alsa-devel@alsa-project.org, philip-dylan.gleonec@savoirfairelinux.com, Elinor Montmasson Subject: [PATCH 01/10] ASoC: fsl-asoc-card: add new compatible for dummy codec Date: Fri, 1 Sep 2023 16:45:41 +0200 Message-Id: <20230901144550.520072-2-elinor.montmasson@savoirfairelinux.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> References: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> MIME-Version: 1.0 X-MailFrom: elinor.montmasson@savoirfairelinux.com X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: LN4FDCA7YQPBZVZWLNWXUVCZFKA3VE2C X-Message-ID-Hash: LN4FDCA7YQPBZVZWLNWXUVCZFKA3VE2C X-Mailman-Approved-At: Mon, 04 Sep 2023 12:44:07 +0000 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: From: Elinor Montmasson Add support for the new compatible fsl,imx-audio-dummy-codec. It allows using the fsl-asoc-card driver with the dummy codec provided by the kernel utilities instead of a real codec. For now the compatible is recognised and the codec driver names are set, but a sound card with this compatible will still be deferred during initialisation. Signed-off-by: Elinor Montmasson Co-authored-by: Philip-Dylan Gleonec --- sound/soc/fsl/fsl-asoc-card.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 76b5bfc288fd..c12a356a86d5 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -575,7 +575,11 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) goto fail; } - codec_np = of_parse_phandle(np, "audio-codec", 0); + if (of_device_is_compatible(np, "fsl,imx-audio-dummy-codec")) + codec_np = NULL; + else + codec_np = of_parse_phandle(np, "audio-codec", 0); + if (codec_np) { struct platform_device *codec_pdev; struct i2c_client *codec_i2c; @@ -705,6 +709,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM; if (codec_dev) priv->codec_priv.mclk = devm_clk_get(codec_dev, NULL); + } else if (of_device_is_compatible(np, "fsl,imx-audio-dummy-codec")) { + codec_dai_name = "snd-soc-dummy-dai"; } else { dev_err(&pdev->dev, "unknown Device Tree compatible\n"); ret = -EINVAL; @@ -806,7 +812,9 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) priv->dai_link[0].cpus->of_node = cpu_np; priv->dai_link[0].codecs->dai_name = codec_dai_name; - if (!fsl_asoc_card_is_ac97(priv)) + if (of_device_is_compatible(np, "fsl,imx-audio-dummy-codec")) + priv->dai_link[0].codecs->name = "snd-soc-dummy"; + else if (!fsl_asoc_card_is_ac97(priv)) priv->dai_link[0].codecs->of_node = codec_np; else { u32 idx; @@ -931,6 +939,7 @@ static const struct of_device_id fsl_asoc_card_dt_ids[] = { { .compatible = "fsl,imx-audio-si476x", }, { .compatible = "fsl,imx-audio-wm8958", }, { .compatible = "fsl,imx-audio-nau8822", }, + { .compatible = "fsl,imx-audio-dummy-codec", }, {} }; MODULE_DEVICE_TABLE(of, fsl_asoc_card_dt_ids); From patchwork Fri Sep 1 14:45:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elinor Montmasson X-Patchwork-Id: 13373858 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 BA4B8C71153 for ; Mon, 4 Sep 2023 12:46:19 +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 C914F84B; Mon, 4 Sep 2023 14:45:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C914F84B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1693831577; bh=94GvThpch4KIQhb/eDaV9ArjImgMNezZnaruBwzFAfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ZnpJm0W0tH+JJOOrh9YDeimkH3HrMZyg3vjnMIWyhxDay1kxmeA4iottfdm4eXZqj aE9h0RdnwvEhKA5jexUfDRw4C9nJ9FbPKVL8+CujTJRSZ6bcmEPuTxlYfUtpRO0EX7 T3UKBR2rea/48QiiCAo0z/858x2YiA7cyJWwrZIg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E1DF3F805A9; Mon, 4 Sep 2023 14:44:17 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6953CF80587; Mon, 4 Sep 2023 14:44:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 80BDAF80236; Fri, 1 Sep 2023 16:46:38 +0200 (CEST) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 5D5ABF800D1 for ; Fri, 1 Sep 2023 16:46:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5D5ABF800D1 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.a=rsa-sha256 header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=uGL1j1Gl Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 420E19C1115; Fri, 1 Sep 2023 10:46:32 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id i_qMz8tGS-Jw; Fri, 1 Sep 2023 10:46:31 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 9EA359C2A40; Fri, 1 Sep 2023 10:46:31 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 9EA359C2A40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1693579591; bh=Ld48BtjguABGFoT9Tu4EHwP0So3rOE0HKY9Qeb0+aGU=; h=From:To:Date:Message-Id:MIME-Version; b=uGL1j1GloTV3cs1E9uIH6MJ8gv1Augt7BeevqjQq1aM72zvVKSh5WdmhIMkeov9DE JzijQd+aiYYsHvL67XF7Bv1J9F8u7jQ/LzBtZpTXFtFOeE2lKqQp8U7/1GGJFnGSfg 9o7ANxSCtjmBLydU4c1a3Y+ecVIGkql+9Jk/tdK+M6l/XS9zMaFptTCTIOfgTX/0rH bNZJndzleAoPn4LjG9UX9/ot6Xl3PKOgUrYx8M2lE1EjasiPeyhxAQ2wU0Phqr0fP3 LSyjtdxyQJTXE1T1nZeNOWqci8wZEhT0Qj37J4Cfjh9zrl63IlkfVazi4QOomt9CtR 55HJtoMNYZtEg== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id c6gn2rhC1vMB; Fri, 1 Sep 2023 10:46:31 -0400 (EDT) Received: from gerard.rennes.sfl (lmontsouris-657-1-69-118.w80-15.abo.wanadoo.fr [80.15.101.118]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id B0F389C1115; Fri, 1 Sep 2023 10:46:30 -0400 (EDT) From: elinor.montmasson@savoirfairelinux.com To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com Cc: alsa-devel@alsa-project.org, philip-dylan.gleonec@savoirfairelinux.com, Elinor Montmasson Subject: [PATCH 02/10] ASoC: fsl-asoc-card: prevent deferment with dummy codec Date: Fri, 1 Sep 2023 16:45:42 +0200 Message-Id: <20230901144550.520072-3-elinor.montmasson@savoirfairelinux.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> References: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> MIME-Version: 1.0 X-MailFrom: elinor.montmasson@savoirfairelinux.com X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: NEWDIKDEG7A23NJBJCPUHKRO5RA7GIOR X-Message-ID-Hash: NEWDIKDEG7A23NJBJCPUHKRO5RA7GIOR X-Mailman-Approved-At: Mon, 04 Sep 2023 12:44:07 +0000 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: From: Elinor Montmasson Prevent deferment during sound card initialisation when using the dummy codec. If the codec isn't an ac97, it is expected to have a device tree node for the codec. If not, the sound card initialisation is deferred. However, the dummy codec has no device tree node, thus we must handle this specific use case. Signed-off-by: Elinor Montmasson Co-authored-by: Philip-Dylan Gleonec --- sound/soc/fsl/fsl-asoc-card.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index c12a356a86d5..d656df0b0eea 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -748,7 +748,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) of_node_put(bitclkprovider); of_node_put(frameprovider); - if (!fsl_asoc_card_is_ac97(priv) && !codec_dev) { + if (!fsl_asoc_card_is_ac97(priv) && !codec_dev + && !of_device_is_compatible(np, "fsl,imx-audio-dummy-codec")) { dev_dbg(&pdev->dev, "failed to find codec device\n"); ret = -EPROBE_DEFER; goto asrc_fail; From patchwork Fri Sep 1 14:45:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elinor Montmasson X-Patchwork-Id: 13373859 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 DC720C71153 for ; Mon, 4 Sep 2023 12:46:39 +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 3523C832; Mon, 4 Sep 2023 14:45:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3523C832 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1693831598; bh=VMTUibu+gKiKaY66dTNVlYqSL6ceQxuh372lCYys67c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=VIy4UMAOGVkfg/3G5/4qIsXiSkS3g/0bZ2BIkhmUkGD0y4IZ6sqxUO4nGwoNPjd+d frYenmgQD1UjOSTNltnlU8eJrocFmPtDET7KLt6bGAChVEd5ZbraWo5K33jTNrUTmy igu1TlkMgLBCKVVRYtFnziR5bPlmFRBhyaPbm39A= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1F561F805AC; Mon, 4 Sep 2023 14:44:21 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id CA7EAF80587; Mon, 4 Sep 2023 14:44:20 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ADF09F80236; Fri, 1 Sep 2023 16:46:40 +0200 (CEST) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 58D70F80155 for ; Fri, 1 Sep 2023 16:46:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 58D70F80155 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.a=rsa-sha256 header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=R8n6L/zN Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id B7C379C1115; Fri, 1 Sep 2023 10:46:34 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id gqaAkGM3qpyD; Fri, 1 Sep 2023 10:46:34 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 192D19C2A33; Fri, 1 Sep 2023 10:46:34 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 192D19C2A33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1693579594; bh=sZYZCW5RuIjbb0QpfTC3P2+IfqLC+ypkXU6dzwhTnl0=; h=From:To:Date:Message-Id:MIME-Version; b=R8n6L/zNOfeOFXrmvc9ZN1EPm/1hEL7pGFb3cHiw1GjHdQsjPVDAkne+HKcCDCdXz YMWpZgv66ONQ/DmwlklSD2sakTogXn2SL/BAWvf805Rd1Z8rWgezhBJo0U5vH+8hG1 YoChclgUqDhbwTHE8P7rStGcLlObrWRefr6yVM0DhFD7gZvGaMfZQ8a6fbjN0QcDO+ UnB+FC3omTSMSg9u4P71uE0bsMmNZo8Zh0m9cr2YNdyndGJJiAlnZ3KmKsosdxdEQP hHWjWvp1q10W083/eDJ7/CQ1CPCh7xQ+9tq7YFcMxQxvISy0b62bPRXfL34OBhIrU7 ljXZIS9XYxmow== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id nK1BigwVNiBz; Fri, 1 Sep 2023 10:46:34 -0400 (EDT) Received: from gerard.rennes.sfl (lmontsouris-657-1-69-118.w80-15.abo.wanadoo.fr [80.15.101.118]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 4167C9C2802; Fri, 1 Sep 2023 10:46:33 -0400 (EDT) From: elinor.montmasson@savoirfairelinux.com To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com Cc: alsa-devel@alsa-project.org, philip-dylan.gleonec@savoirfairelinux.com, Elinor Montmasson Subject: [PATCH 03/10] ASoC: fsl-asoc-card: set dummy codec as clock consumer Date: Fri, 1 Sep 2023 16:45:43 +0200 Message-Id: <20230901144550.520072-4-elinor.montmasson@savoirfairelinux.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> References: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> MIME-Version: 1.0 X-MailFrom: elinor.montmasson@savoirfairelinux.com X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: 3B76VQEW6NHWVW24MKUDIH6USJ4XKMDE X-Message-ID-Hash: 3B76VQEW6NHWVW24MKUDIH6USJ4XKMDE X-Mailman-Approved-At: Mon, 04 Sep 2023 12:44:07 +0000 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: From: Elinor Montmasson The default dai format defined by DAI_FMT_BASE doesn't set if the codec is consumer or provider of the bit and frame clocks. As it is set by each existing configuration, set the codec as consumer of both bit and frame clock by default with the dummy codec. Signed-off-by: Elinor Montmasson Co-authored-by: Philip-Dylan Gleonec --- sound/soc/fsl/fsl-asoc-card.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index d656df0b0eea..d210147aebfe 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -711,6 +711,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) priv->codec_priv.mclk = devm_clk_get(codec_dev, NULL); } else if (of_device_is_compatible(np, "fsl,imx-audio-dummy-codec")) { codec_dai_name = "snd-soc-dummy-dai"; + priv->dai_fmt |= SND_SOC_DAIFMT_CBC_CFC; } else { dev_err(&pdev->dev, "unknown Device Tree compatible\n"); ret = -EINVAL; From patchwork Fri Sep 1 14:45:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elinor Montmasson X-Patchwork-Id: 13373860 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 6DDB6C83F2C for ; Mon, 4 Sep 2023 12:46:47 +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 A252486F; Mon, 4 Sep 2023 14:45:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A252486F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1693831605; bh=wx5/L+oVOfEM6+bniNs5p/C2P/XtjHBfOMhCUPIBv4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=i3Dpiz3co+QrI80wgV9ZgAhMSv1bu+So0KTh4CkfMls3kv57eOXXWFqmpD3vx4Ko1 JyPKIbilaHi1Oc6aHWjPQIDA7i1diEbukQUhFXXSzMRNoG2o5k+yJnJC6DKw9iT+Uk ZbsndkSZeTMY9OHNOoNERRoZhQgAAWcZODjeTkLE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 631B3F805AD; Mon, 4 Sep 2023 14:44:23 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E0C8EF805AD; Mon, 4 Sep 2023 14:44:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 65AF3F804F3; Fri, 1 Sep 2023 16:46:45 +0200 (CEST) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 2A378F80074 for ; Fri, 1 Sep 2023 16:46:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2A378F80074 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.a=rsa-sha256 header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=bBRqCa+a Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id D8B8C9C1115; Fri, 1 Sep 2023 10:46:39 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id yvCsJ29sc4RE; Fri, 1 Sep 2023 10:46:39 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 2EAC09C2A3B; Fri, 1 Sep 2023 10:46:39 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 2EAC09C2A3B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1693579599; bh=2mqPnS4zOMOWA1vGoev9cJYScs80xweEhFQwU5Mo+ts=; h=From:To:Date:Message-Id:MIME-Version; b=bBRqCa+au22aCbiN5fSPvGS2vCuLGt9XpiS9CZQh15Wc8IyiNImhNTJ6MCssbH1h7 3fBfpYU/MTb1FphwbiILDK9sTEP4LbwFp8UPAG+Swz9YhQJ7f/UnOnzYVYyjBP8C5Q 6233gGr8x3FOrw2Dx2tDig2GppGCAXyBrRKg4/JbqUldH2ftnhYR4zUjDTg/NYTJts Z/HKkvgtB7JhRjZ700iGdSLXArxlh/RichDNVVIaenjCIngXOuvo3gnQNJxS36K+wn b+89b7AzM+b50YkvrXhaWTl7MuBl1Zemalf1k5uUsDdbU0o4qgNKTeNwxouL8z+ooK d+LDaW7VQ+0Zw== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id rGvHNaPLQp5X; Fri, 1 Sep 2023 10:46:39 -0400 (EDT) Received: from gerard.rennes.sfl (lmontsouris-657-1-69-118.w80-15.abo.wanadoo.fr [80.15.101.118]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 3C58F9C1115; Fri, 1 Sep 2023 10:46:38 -0400 (EDT) From: elinor.montmasson@savoirfairelinux.com To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com Cc: alsa-devel@alsa-project.org, philip-dylan.gleonec@savoirfairelinux.com, Elinor Montmasson Subject: [PATCH 04/10] ASoC: fsl-asoc-card: unset DAPM routes with dummy codec Date: Fri, 1 Sep 2023 16:45:44 +0200 Message-Id: <20230901144550.520072-5-elinor.montmasson@savoirfairelinux.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> References: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> MIME-Version: 1.0 X-MailFrom: elinor.montmasson@savoirfairelinux.com X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: YNYNVCIX5JSFINAI55R3E46QFBBUNIML X-Message-ID-Hash: YNYNVCIX5JSFINAI55R3E46QFBBUNIML X-Mailman-Approved-At: Mon, 04 Sep 2023 12:44:07 +0000 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: From: Elinor Montmasson Unset DAPM routes when using the dummy codec. The dummy codec doesn't provide DAPM widgets per design, as it doesn't represent any real hardware. Thus the default DAPM audio routes do not work because there is no Playback or Capture DAPM widget. Signed-off-by: Elinor Montmasson Co-authored-by: Philip-Dylan Gleonec --- sound/soc/fsl/fsl-asoc-card.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index d210147aebfe..5ef26ae512de 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -712,6 +712,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) } else if (of_device_is_compatible(np, "fsl,imx-audio-dummy-codec")) { codec_dai_name = "snd-soc-dummy-dai"; priv->dai_fmt |= SND_SOC_DAIFMT_CBC_CFC; + priv->card.dapm_routes = NULL; + priv->card.num_dapm_routes = 0; } else { dev_err(&pdev->dev, "unknown Device Tree compatible\n"); ret = -EINVAL; From patchwork Fri Sep 1 14:45:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elinor Montmasson X-Patchwork-Id: 13373861 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 C263DC83F3E for ; Mon, 4 Sep 2023 12:47:04 +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 0CCAEA4A; Mon, 4 Sep 2023 14:46:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0CCAEA4A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1693831623; bh=eNRqMVZatneI3Ka7MdPBpZnvpucMZGdgWUKSG9J6DGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=QRhACJ695rUduJH7ducQDs8S2HDr8iQFIJDxgbwxwKaa3h8acf+62q/pCPtq2cCv7 /KtzbCTJdOv4LKdq0sgtJPXcMQnxlMTkTRZlrbF0gPrU7XDJC7ml7LZCey7ZjaP+tc Crjz0yVonWBfT9jHSIMV36chWbjdyE9Azv0WUgB0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C8711F805CA; Mon, 4 Sep 2023 14:44:26 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3F0BCF805B6; Mon, 4 Sep 2023 14:44:26 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 47429F80236; Fri, 1 Sep 2023 16:46:49 +0200 (CEST) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 3347AF8023B for ; Fri, 1 Sep 2023 16:46:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3347AF8023B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.a=rsa-sha256 header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=IdxD+cPi Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 2922B9C1115; Fri, 1 Sep 2023 10:46:43 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id 5O8TOwzDq38N; Fri, 1 Sep 2023 10:46:42 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 6829B9C2A5C; Fri, 1 Sep 2023 10:46:42 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 6829B9C2A5C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1693579602; bh=dPY5UkpvLa7HatpHe4ldL14oOtB8Oa3iWA3pVzNiCVo=; h=From:To:Date:Message-Id:MIME-Version; b=IdxD+cPiu/8wasCQTbBCLdmjFg7dWFSxqPHyS9zYMpobnYHuxW3Rv4EhKpc42/Is0 45sEoriCzkRPkkjyGnkaE1LdU+OFBc6GuS83qIYaQHvP8n2Wi6HkFcx7feRtBoXGrQ U9ZqfMM9tjeTMK/+NkIBzGLGNM4rhC/V+GjDnyG7Elerx28xSKxe4R1M5hPhZ0767j w22MjR66SGn8smsguC72LklhJRIEPDDaa6yGznU4SB5GY036BYfMJdDmcDNp7w89fr hzhca3XVJJc7WU6s1+a0wKoosPZQ6W97IEJ1CzdQdCPdbuzul/twXd0Uhnn64eXZf3 txHyaJSoKvQ3w== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id OUo11mwFm-fu; Fri, 1 Sep 2023 10:46:42 -0400 (EDT) Received: from gerard.rennes.sfl (lmontsouris-657-1-69-118.w80-15.abo.wanadoo.fr [80.15.101.118]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 8DA449C2A5F; Fri, 1 Sep 2023 10:46:41 -0400 (EDT) From: elinor.montmasson@savoirfairelinux.com To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com Cc: alsa-devel@alsa-project.org, philip-dylan.gleonec@savoirfairelinux.com, Elinor Montmasson Subject: [PATCH 05/10] ASoC: fsl-asoc-card: add new DAPM audio map for asrc Date: Fri, 1 Sep 2023 16:45:45 +0200 Message-Id: <20230901144550.520072-6-elinor.montmasson@savoirfairelinux.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> References: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> MIME-Version: 1.0 X-MailFrom: elinor.montmasson@savoirfairelinux.com X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: DED63YW65SJ6NRQPHPZFCRI4FDF2VRNJ X-Message-ID-Hash: DED63YW65SJ6NRQPHPZFCRI4FDF2VRNJ X-Mailman-Approved-At: Mon, 04 Sep 2023 12:44:07 +0000 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: From: Elinor Montmasson Add the new DAPM audio map audio_map_asrc used with the dummy codec. The dummy codec doesn't have any Playback or Capture DAPM widgets. DAPM default audio maps are thus unused with it. However, when using the ASRC, DAPM routes between CPU DAI and ASRC are still required. The driver must then handle this use case. Signed-off-by: Elinor Montmasson Co-authored-by: Philip-Dylan Gleonec --- sound/soc/fsl/fsl-asoc-card.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 5ef26ae512de..d8f4412be308 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -148,6 +148,13 @@ static const struct snd_soc_dapm_route audio_map_rx[] = { {"ASRC-Capture", NULL, "CPU-Capture"}, }; + +static const struct snd_soc_dapm_route audio_map_asrc[] = { + {"CPU-Playback", NULL, "ASRC-Playback"}, + {"ASRC-Capture", NULL, "CPU-Capture"}, +}; + + /* Add all possible widgets into here without being redundant */ static const struct snd_soc_dapm_widget fsl_asoc_card_dapm_widgets[] = { SND_SOC_DAPM_LINE("Line Out Jack", NULL), @@ -803,6 +810,11 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) /* Drop the second half of DAPM routes -- ASRC */ if (!asrc_pdev) priv->card.num_dapm_routes /= 2; + else if (of_device_is_compatible(np, "fsl,imx-audio-dummy-codec")) { + /* Dummy codec doesn't provide Playback and Capture widgets */ + priv->card.dapm_routes = audio_map_asrc; + priv->card.num_dapm_routes = 2; + } if (of_property_read_bool(np, "audio-routing")) { ret = snd_soc_of_parse_audio_routing(&priv->card, "audio-routing"); From patchwork Fri Sep 1 14:45:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elinor Montmasson X-Patchwork-Id: 13373862 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 73F2EC83F2C for ; Mon, 4 Sep 2023 12:47:26 +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 45924827; Mon, 4 Sep 2023 14:46:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 45924827 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1693831644; bh=BeaPkRRq0E2gvLSB2/6DRjFDHRPDqk7IiFUOf4FkRME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=V1eanC3l1MQINpDRXcdxLm+jwp2aARarJZ/Mkx3vuD6rGyuB9LBLyF7UQPnINKKRb NKZabFdbjSxtz/q9y/PtS2/gqGt6lf2L0lEI8Qzaev/QFuCFajCoMVbP/n7O/xw68f w1cos6O92Mo8bmB78JhelwCSL/1ugYuf88bnJBYs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2C993F805D5; Mon, 4 Sep 2023 14:44:29 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id AFC5FF805C7; Mon, 4 Sep 2023 14:44:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B1045F8023B; Fri, 1 Sep 2023 16:46:50 +0200 (CEST) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 7D85BF80074 for ; Fri, 1 Sep 2023 16:46:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7D85BF80074 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.a=rsa-sha256 header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=pugRBITn Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 4C5AA9C2A6B; Fri, 1 Sep 2023 10:46:46 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id FELlblAHuwwM; Fri, 1 Sep 2023 10:46:45 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 927AF9C2A68; Fri, 1 Sep 2023 10:46:45 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 927AF9C2A68 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1693579605; bh=fHyFzyyNmZrVDepXkYzdpiB9Uglj5+vPUiPVRREG/MM=; h=From:To:Date:Message-Id:MIME-Version; b=pugRBITnrKZF4sW3DlBEu5pBX4Amy9FEZtTu1Z2ENR8NwK9FQOZ6buuQFsE7Ea/1x pkBIjs9IAcP9dJ4e2HIZoZkHeTx6fNs7z1qPXWgUtT8vElgSAe/ifXAm6vMIordxQr 2tsBHXTrYkygyFSrgh/3/C3AjSqHXjGuToeZKGTj+2LVedwCM9WulGzUhS77PXFK26 V0JuvBgW6DeLn4YOB5qbuxKw/E9uWHl6VtV6n1XBzAZ4P3L5ydBG2SoOacZx7dhcXG +1tkTzzjQ1yxCxRxeXgtTShCDL3ciRhrWXOi9VoLn9y0Kq4rTQsWHrMgY0eBeAm/rL wJn8Pn65SF2PQ== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id Sai4lqYU5oRn; Fri, 1 Sep 2023 10:46:45 -0400 (EDT) Received: from gerard.rennes.sfl (lmontsouris-657-1-69-118.w80-15.abo.wanadoo.fr [80.15.101.118]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id B21FA9C2A5F; Fri, 1 Sep 2023 10:46:44 -0400 (EDT) From: elinor.montmasson@savoirfairelinux.com To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com Cc: alsa-devel@alsa-project.org, philip-dylan.gleonec@savoirfairelinux.com, Elinor Montmasson Subject: [PATCH 06/10] ASoC: fsl-asoc-card: add dts property "cpu-slot-width" Date: Fri, 1 Sep 2023 16:45:46 +0200 Message-Id: <20230901144550.520072-7-elinor.montmasson@savoirfairelinux.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> References: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> MIME-Version: 1.0 X-MailFrom: elinor.montmasson@savoirfairelinux.com X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: RVSEXL6IHUGQXPW4562TQXEWQMWKPFU6 X-Message-ID-Hash: RVSEXL6IHUGQXPW4562TQXEWQMWKPFU6 X-Mailman-Approved-At: Mon, 04 Sep 2023 12:44:07 +0000 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: From: Elinor Montmasson Add new optional dts property "cpu-slot-width", which allows to set a custom TDM slot width in bits for the CPU DAI when using the dummy codec. Signed-off-by: Elinor Montmasson Co-authored-by: Philip-Dylan Gleonec --- sound/soc/fsl/fsl-asoc-card.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index d8f4412be308..12d01970850d 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -721,6 +721,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) priv->dai_fmt |= SND_SOC_DAIFMT_CBC_CFC; priv->card.dapm_routes = NULL; priv->card.num_dapm_routes = 0; + of_property_read_u32(np, "cpu-slot-width", &priv->cpu_priv.slot_width); } else { dev_err(&pdev->dev, "unknown Device Tree compatible\n"); ret = -EINVAL; From patchwork Fri Sep 1 14:45:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elinor Montmasson X-Patchwork-Id: 13373863 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 A0200C71153 for ; Mon, 4 Sep 2023 12:47:37 +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 600B67F1; Mon, 4 Sep 2023 14:46:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 600B67F1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1693831655; bh=3QF4KtRZO8nKUIjB3WJa1duuIxLgWmoE3PQ5cytBGVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ZPbUw9Wfl3UuSrh4F7JnTciB8TZ+Hxi79b+WvtP6rQtm8F945NbKkmreCSuVDwOeq B2smqETWpqYVyWSBkoKonJ5hLvXYE0i4tuHqU2D3cUch+SP6wivtDMJDQgV6+QQJ4k WxnmuvZzwnvE3bBQon23NthVEMpxPI2+eQNTO8SY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 40F25F805E7; Mon, 4 Sep 2023 14:44:32 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id AC5D0F805E0; Mon, 4 Sep 2023 14:44:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 238B8F80249; Fri, 1 Sep 2023 16:46:55 +0200 (CEST) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 277A1F80074 for ; Fri, 1 Sep 2023 16:46:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 277A1F80074 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.a=rsa-sha256 header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=X3lFqZd4 Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 232CE9C0919; Fri, 1 Sep 2023 10:46:51 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id oOc0W1F8q9HX; Fri, 1 Sep 2023 10:46:50 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 7C9769C2A5F; Fri, 1 Sep 2023 10:46:50 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 7C9769C2A5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1693579610; bh=LOHxGESK5L5fl663kVhZ0C4bAojEwCmxoyM8052M+Vw=; h=From:To:Date:Message-Id:MIME-Version; b=X3lFqZd4TTCkHzokJP/9L2vhtrPwsSKGguIlEAD1qHT4Bbu+GRxVINWKcwyEuBDXw BtWd24Bnqp6TJOxKcJdXl35XoSKYTpwkKlWO4tfoMtVRaoDya7KjiFESsb6SfwCiKd QBM9FpfkicAgtgnVcXlBglYgGWiM3FQ0e8zejVcZyNvLnYSP0cxHEYf+hvru5HpMIS SLk6H+sBsS5NTFoRSa2ZbvZh6IpiIh18HyBVKzcde2JpZD3Pd9ESdNEpfpGF3QDani i6qBqSR8I30Dl41gRcJAOOEuj2dyF1HgNnONvUPdY83wBYFERIxcPkZub7MNDCtwFT IaVhOvSpzRW8A== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id 1Bc7YcOar5j5; Fri, 1 Sep 2023 10:46:50 -0400 (EDT) Received: from gerard.rennes.sfl (lmontsouris-657-1-69-118.w80-15.abo.wanadoo.fr [80.15.101.118]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id A49E79C0919; Fri, 1 Sep 2023 10:46:49 -0400 (EDT) From: elinor.montmasson@savoirfairelinux.com To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com Cc: alsa-devel@alsa-project.org, philip-dylan.gleonec@savoirfairelinux.com, Elinor Montmasson Subject: [PATCH 07/10] ASoC: fsl-asoc-card: add dts property "cpu-slot-num" Date: Fri, 1 Sep 2023 16:45:47 +0200 Message-Id: <20230901144550.520072-8-elinor.montmasson@savoirfairelinux.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> References: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> MIME-Version: 1.0 X-MailFrom: elinor.montmasson@savoirfairelinux.com X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: GOYZUJDSZ3WINHWNXOF3RYCT47QXTDAZ X-Message-ID-Hash: GOYZUJDSZ3WINHWNXOF3RYCT47QXTDAZ X-Mailman-Approved-At: Mon, 04 Sep 2023 12:44:08 +0000 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: From: Elinor Montmasson Add new optional dts property "cpu-slot-num", which allows to set a custom number of TDM slots for the CPU DAI when using the dummy codec. Signed-off-by: Elinor Montmasson Co-authored-by: Philip-Dylan Gleonec --- sound/soc/fsl/fsl-asoc-card.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 12d01970850d..66bcb6aa498a 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -722,6 +722,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) priv->card.dapm_routes = NULL; priv->card.num_dapm_routes = 0; of_property_read_u32(np, "cpu-slot-width", &priv->cpu_priv.slot_width); + of_property_read_u32(np, "cpu-slot-num", &priv->cpu_priv.slot_num); } else { dev_err(&pdev->dev, "unknown Device Tree compatible\n"); ret = -EINVAL; From patchwork Fri Sep 1 14:45:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elinor Montmasson X-Patchwork-Id: 13373866 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 BB4B3C83F2C for ; Mon, 4 Sep 2023 12:50:35 +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 12E80AE9; Mon, 4 Sep 2023 14:49:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 12E80AE9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1693831834; bh=2B/FnJeGg7K3NAHuRu7Pgjl+hLySoixxolFmsv+9Bao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Xxb/6OhxccNZFYTqBSqzjXA8DAxpnCNTYWJtflMjD+Gz/ORxBHrH1u31rbTmkZ7aW sluO740NrF4pCicKUQWY6Qj+uP6Qn5Uzg3qZKdnFAn3EJuzYxVRGYk8N0cbrwxyzvz 9l3xtfhYVltYHXdoZYX9vaOgZF99rHvcrCKOVl+Q= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 90FACF80551; Mon, 4 Sep 2023 14:48:56 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id DF2DDF80563; Mon, 4 Sep 2023 14:48:55 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 68986F80158; Fri, 1 Sep 2023 16:47:06 +0200 (CEST) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 3C136F80155 for ; Fri, 1 Sep 2023 16:46:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3C136F80155 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.a=rsa-sha256 header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=jneEN2qE Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 137529C2A61; Fri, 1 Sep 2023 10:46:53 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id B8ekbhEVA18W; Fri, 1 Sep 2023 10:46:52 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 76DC49C2A62; Fri, 1 Sep 2023 10:46:52 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 76DC49C2A62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1693579612; bh=axuXg0xyUTBkHymSv+mK5SQ0Rh9l5TBxWpiykyllR94=; h=From:To:Date:Message-Id:MIME-Version; b=jneEN2qEoy03Y/yxhI5YrU9oHrJSUiPgjrTlklcBUkrLLFBycg9NqXlRIBi/zmsVP NEPIhyY8iBn9KYkSdw/SbC71qT336C2OjUbaakfUDiadhqmY8rubbtTkMM1aYPzssN e2ggCVHyp9U+4AoEBAf1uKef5v5EpubQIbQBdeT0DuvGwDN+VhqD0k5UEvcyCcEfB3 /Pmis5BB1wRm8PgezcXdp9c1SXaETr9ssGMw3FU5B4Zg8ucUV9yNNLcl3Nzqyi3vd5 oR2k3vsuD7rmmXDJ0zlkLSLT6uMPV83FLlMkyGWu5BPgpNQW2vwf+ljym9D4u7eJjO Dbww4GhzMHTJA== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id M0FGtu6eauQA; Fri, 1 Sep 2023 10:46:52 -0400 (EDT) Received: from gerard.rennes.sfl (lmontsouris-657-1-69-118.w80-15.abo.wanadoo.fr [80.15.101.118]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id A23F69C2A61; Fri, 1 Sep 2023 10:46:51 -0400 (EDT) From: elinor.montmasson@savoirfairelinux.com To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com Cc: alsa-devel@alsa-project.org, philip-dylan.gleonec@savoirfairelinux.com, Elinor Montmasson Subject: [PATCH 08/10] ASoC: fsl-asoc-card: add dts properties "cpu-sysclk-freq" Date: Fri, 1 Sep 2023 16:45:48 +0200 Message-Id: <20230901144550.520072-9-elinor.montmasson@savoirfairelinux.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> References: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> MIME-Version: 1.0 X-MailFrom: elinor.montmasson@savoirfairelinux.com X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: 3GVR5JDVWYVL6PWRYR6UF5VPDACNUJIU X-Message-ID-Hash: 3GVR5JDVWYVL6PWRYR6UF5VPDACNUJIU X-Mailman-Approved-At: Mon, 04 Sep 2023 12:48:48 +0000 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: From: Elinor Montmasson Add new optional dts property "cpu-sysclk-freq" to set custom sysclk frequencies for the CPU DAI with the dummy codec. The way values are used is up to the CPU DAI driver implementation. Signed-off-by: Elinor Montmasson Co-authored-by: Philip-Dylan Gleonec --- sound/soc/fsl/fsl-asoc-card.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 66bcb6aa498a..a60d78374ef3 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -723,6 +723,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) priv->card.num_dapm_routes = 0; of_property_read_u32(np, "cpu-slot-width", &priv->cpu_priv.slot_width); of_property_read_u32(np, "cpu-slot-num", &priv->cpu_priv.slot_num); + of_property_read_u32(np, "cpu-sysclk-freq-rx", + (u32 *)&priv->cpu_priv.sysclk_freq[RX]); + of_property_read_u32(np, "cpu-sysclk-freq-tx", + (u32 *)&priv->cpu_priv.sysclk_freq[TX]); } else { dev_err(&pdev->dev, "unknown Device Tree compatible\n"); ret = -EINVAL; From patchwork Fri Sep 1 14:45:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elinor Montmasson X-Patchwork-Id: 13373864 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 B2C83C83F2C for ; Mon, 4 Sep 2023 12:47:55 +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 95D99825; Mon, 4 Sep 2023 14:47:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 95D99825 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1693831673; bh=QCEt580HPJfTT2pU+Qq8asdM4TFCQYRTmHKfR/1Zekc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Efcbr4NLnylVXoUDy21aFbIImWN+eeUW8++dA6/jR2/i6D6Fco7T+ie1YlmwjZ10W LuzOjBWfdepdE2gRyGDx3QVWxXWyOXjQA4E8OOxJqufolnE2lYUuX8/rohhr5CMeEs 3DflNLLx2f5P/AdytIoR7Uj441Xjy9bRaM3MmSqU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 51DA3F805EF; Mon, 4 Sep 2023 14:44:34 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A3401F805E9; Mon, 4 Sep 2023 14:44:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 95DABF80245; Fri, 1 Sep 2023 16:47:00 +0200 (CEST) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 53CCBF80074 for ; Fri, 1 Sep 2023 16:46:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 53CCBF80074 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.a=rsa-sha256 header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=JH0GtcVS Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 17DA09C2A63; Fri, 1 Sep 2023 10:46:56 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id 7P9B9XEYo4Eb; Fri, 1 Sep 2023 10:46:55 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 77A6A9C0919; Fri, 1 Sep 2023 10:46:55 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 77A6A9C0919 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1693579615; bh=OiEIuZeseXeSH92Wx2GgUa4xt4lJLyKUvcRQlripQqs=; h=From:To:Date:Message-Id:MIME-Version; b=JH0GtcVShcjVy7EOr60KDJrskOEZ7ne6sjO0u8EzbZ1r9Lue1Ife08TYmpFlRv2tJ e4TLadURvzgJHiM14GkvW5oEY369LH4EoM+IWnawwn5t278Wi/yL69+cfVlOAtUT5v t9JdhYADKJEGzyNxrsEU38ZK6GkbDgO5s67glzRdzvw3icTHE2hOH3rIwaX5s5DIrX Wggzr9RGku/+yKca2gEBBH299U5Qn/ODbygfNYxMs79kK57BU22yjb1OnhyAPdWROg 4ddsz9XyBG7022TsMcExzHM1ZJ13Kh1l3pCTedZH2FnDhUQS3H8WeAsOfoZrjmmGmR +NRg14vjh/2+g== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id E6EVarP5bRky; Fri, 1 Sep 2023 10:46:55 -0400 (EDT) Received: from gerard.rennes.sfl (lmontsouris-657-1-69-118.w80-15.abo.wanadoo.fr [80.15.101.118]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id A09019C2A63; Fri, 1 Sep 2023 10:46:54 -0400 (EDT) From: elinor.montmasson@savoirfairelinux.com To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com Cc: alsa-devel@alsa-project.org, philip-dylan.gleonec@savoirfairelinux.com, Elinor Montmasson Subject: [PATCH 09/10] ASoC: fsl-asoc-card: add dts properties "cpu-sysclk-dir-out" Date: Fri, 1 Sep 2023 16:45:49 +0200 Message-Id: <20230901144550.520072-10-elinor.montmasson@savoirfairelinux.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> References: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> MIME-Version: 1.0 X-MailFrom: elinor.montmasson@savoirfairelinux.com X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: DJZXJ6NV7OUUY7ILXTCNWHFI7OOTC3TP X-Message-ID-Hash: DJZXJ6NV7OUUY7ILXTCNWHFI7OOTC3TP X-Mailman-Approved-At: Mon, 04 Sep 2023 12:44:08 +0000 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: From: Elinor Montmasson Add new optional dts properties "cpu-sysclk-dir-out" to set sysclk directions as "out" for the CPU DAI when using the dummy codec. This can be set for Tx and Rx. If not set, the direction is "in". The way values are used is up to the CPU DAI driver implementation. Signed-off-by: Elinor Montmasson Co-authored-by: Philip-Dylan Gleonec --- sound/soc/fsl/fsl-asoc-card.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index a60d78374ef3..4beb047de3bf 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -727,6 +727,12 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) (u32 *)&priv->cpu_priv.sysclk_freq[RX]); of_property_read_u32(np, "cpu-sysclk-freq-tx", (u32 *)&priv->cpu_priv.sysclk_freq[TX]); + priv->cpu_priv.sysclk_dir[RX] = + of_property_read_bool(np, "cpu-sysclk-dir-rx-out") ? + SND_SOC_CLOCK_OUT : SND_SOC_CLOCK_IN; + priv->cpu_priv.sysclk_dir[TX] = + of_property_read_bool(np, "cpu-sysclk-dir-tx-out") ? + SND_SOC_CLOCK_OUT : SND_SOC_CLOCK_IN; } else { dev_err(&pdev->dev, "unknown Device Tree compatible\n"); ret = -EINVAL; From patchwork Fri Sep 1 14:45:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elinor Montmasson X-Patchwork-Id: 13373865 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 29D90C83F2C for ; Mon, 4 Sep 2023 12:50:12 +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 1D1C886F; Mon, 4 Sep 2023 14:49:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1D1C886F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1693831809; bh=cGdtjB5519yeTVlVXWlEyo79rsXcri52zW4tD4gvfZ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IdmKpVFHXnKfpoY77VCwxmsKuEA/hpHc3resYkO2mowVCcJC82dFyGbaFKU0rmvBc beaU1TaYLungX7B1lzzYd2jvoBq1hmBcPAiIe/a38mlrdezKm3PDJhk5BzcjVYCIVp oDdGuj6quCzIfYseewoxyMRAG2UF+b1n1oUanQ9s= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A5058F80537; Mon, 4 Sep 2023 14:48:53 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D2A58F80527; Mon, 4 Sep 2023 14:48:52 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E4E10F80245; Fri, 1 Sep 2023 16:47:04 +0200 (CEST) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 0BC8AF80074 for ; Fri, 1 Sep 2023 16:47:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0BC8AF80074 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.a=rsa-sha256 header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=IbLKalNp Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 1750A9C2A63; Fri, 1 Sep 2023 10:46:59 -0400 (EDT) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id TNIYF28YmTYr; Fri, 1 Sep 2023 10:46:58 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 1346F9C2A69; Fri, 1 Sep 2023 10:46:58 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 1346F9C2A69 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1693579618; bh=+R+Al6d3HNTV3XoXsMBeRdaFhxAr1k+2+WXp5UmdN9I=; h=From:To:Date:Message-Id:MIME-Version; b=IbLKalNpNhOpvLTeXDh0LfHlVcNrawSnPyODlg/xLcdLOJzPZRx4t0MzntpZ7vfo5 bLiKc3DG9LJpBc0cpYAeJ3Nik/oeOPZfhGc+U5UHO+znhXW2XUIn1ZT6sp8Cy64ueB D5RpU6GFg+BsCb5kSdGyWmzW5dyAneS8RpDx2wCx8V3knBSLNfH+5a+FlKNVVSJUHE 8amDvv3Mi8R3li/xIG/Cg5CymvpJqR3wNip/jWHYxOBVnCTB4ovi3h0/MVzH58gBuo HGHZe3yyZP35FMjjW060Ox7bOnLimijNr2oWfA4V/rVMbU1if/sUaf1M15G6xJZkvg bqo8JsGuP0DUg== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id JnAPuSj471aI; Fri, 1 Sep 2023 10:46:58 -0400 (EDT) Received: from gerard.rennes.sfl (lmontsouris-657-1-69-118.w80-15.abo.wanadoo.fr [80.15.101.118]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 3B7599C2A6B; Fri, 1 Sep 2023 10:46:57 -0400 (EDT) From: elinor.montmasson@savoirfairelinux.com To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com Cc: alsa-devel@alsa-project.org, philip-dylan.gleonec@savoirfairelinux.com, Elinor Montmasson Subject: [PATCH 10/10] Documentation: fsl-asoc-card: add documentation for dummy-codec support Date: Fri, 1 Sep 2023 16:45:50 +0200 Message-Id: <20230901144550.520072-11-elinor.montmasson@savoirfairelinux.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> References: <20230901144550.520072-1-elinor.montmasson@savoirfairelinux.com> MIME-Version: 1.0 X-MailFrom: elinor.montmasson@savoirfairelinux.com X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: 4N4PNRLTCNJJD7744FLGSKLOGNFXIHCU X-Message-ID-Hash: 4N4PNRLTCNJJD7744FLGSKLOGNFXIHCU X-Mailman-Approved-At: Mon, 04 Sep 2023 12:48:48 +0000 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: From: Elinor Montmasson Add documentation about new dts bindings following new support for compatible "fsl,imx-audio-dummy-codec". Some CPU DAI don't require a real audio codec. The new compatible "fsl,imx-audio-dummy-codec" makes the driver use the dummy codec driver provided by the ASoC utils. It also allows to use not pre-configured audio codecs which don't require specific control through a codec driver. The new dts properties give the possibility to set some parameters about the CPU DAI usually set through the codec configuration. Signed-off-by: Elinor Montmasson Co-authored-by: Philip-Dylan Gleonec --- .../bindings/sound/fsl-asoc-card.txt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt index 4e8dbc5abfd1..2e081a62d29d 100644 --- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt +++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt @@ -17,6 +17,9 @@ Note: The card is initially designed for those sound cards who use AC'97, I2S and PCM DAI formats. However, it'll be also possible to support those non AC'97/I2S/PCM type sound cards, such as S/PDIF audio and HDMI audio, as long as the driver has been properly upgraded. + To use CPU DAIs that do not require a codec such as an S/PDIF controller, + or to use a DAI to output or capture raw I2S/TDM data, you can + use the compatible "fsl,imx-audio-dummy-codec". The compatible list for this generic sound card currently: @@ -48,6 +51,8 @@ The compatible list for this generic sound card currently: "fsl,imx-audio-nau8822" + "fsl,imx-audio-dummy-codec" + Required properties: - compatible : Contains one of entries in the compatible list. @@ -56,6 +61,8 @@ Required properties: - audio-cpu : The phandle of an CPU DAI controller +Required, unless "fsl,imx-audio-dummy-codec" compatible is used: + - audio-codec : The phandle of an audio codec Optional properties: @@ -88,6 +95,19 @@ Optional properties: - bitclock-inversion : dai-link uses bit clock inversion, for details see simple-card.yaml. - mclk-id : main clock id, specific for each card configuration. +Optional, relevant only with the "fsl,imx-audio-dummy-codec" compatible: + + - cpu-slot-width : Indicates a specific TDM slot width in bits. + - cpu-slot-num : Indicates a specific number of TDM slots per frame. + + - cpu-sysclk-freq-rx : Frequency of the CPU DAI sys clock for Rx. + - cpu-sysclk-freq-tx : Frequency of the CPU DAI sys clock for Tx. + + - cpu-sysclk-dir-rx-out : Boolean property. Specifies sys clock direction + as 'out' on initialization for Rx. If not set, default direction is 'in'. + - cpu-sysclk-dir-tx-out : Boolean property. Specifies sys clock direction + as 'out' on initialization for Tx. If not set, default direction is 'in'. + Optional unless SSI is selected as a CPU DAI: - mux-int-port : The internal port of the i.MX audio muxer (AUDMUX)