From patchwork Wed Jul 5 19:03:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Kemnade X-Patchwork-Id: 13303321 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 F3197EB64D9 for ; Thu, 6 Jul 2023 08:01:52 +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 6DCDE7F1; Thu, 6 Jul 2023 10:00:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6DCDE7F1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1688630509; bh=RcacutE7xxZJJ2H4X1H5T96DQVDwRWxueVioNssujMg=; h=From:To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=f2QrI8b4ZTUDb5S+2U6ArqgdiYzE7T75ZcjKQbqkfZxyJjdxVkGiSfwbHibzYlvRa +bJpcvawrx3C3xAtWQRr7+U6uNUaDD+pJcZSXdbnQBQfAlZiGI4ZXtOXly4c5ZHm3/ 0GvhVpOCG3Fg4sTqTsKFaVydwkYGeJds0CKKcDt8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id CC89EF80544; Thu, 6 Jul 2023 10:00:58 +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 66173F80125; Thu, 6 Jul 2023 10:00:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 716FBF8025F; Wed, 5 Jul 2023 21:03:49 +0200 (CEST) Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a02:c205:3004:2154::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D5061F800E4 for ; Wed, 5 Jul 2023 21:03:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D5061F800E4 Received: from p200300ccff0adc001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff0a:dc00:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qH7mi-0017Xe-Bk; Wed, 05 Jul 2023 21:03:28 +0200 Received: from andi by aktux with local (Exim 4.96) (envelope-from ) id 1qH7mh-001UQk-36; Wed, 05 Jul 2023 21:03:27 +0200 From: Andreas Kemnade To: bcousson@baylibre.com, tony@atomide.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, peter.ujfalusi@gmail.com, jarkko.nikula@bitmer.com, dmitry.torokhov@gmail.com, andreas@kemnade.info, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 1/3] ASoC: ti: omap-mcbsp: Ignore errors for getting fck_src Date: Wed, 5 Jul 2023 21:03:22 +0200 Message-Id: <20230705190324.355282-2-andreas@kemnade.info> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230705190324.355282-1-andreas@kemnade.info> References: <20230705190324.355282-1-andreas@kemnade.info> MIME-Version: 1.0 X-MailFrom: andreas@kemnade.info 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: JK6CVQV674FULFTK23WQSW65TYSD7NL7 X-Message-ID-Hash: JK6CVQV674FULFTK23WQSW65TYSD7NL7 X-Mailman-Approved-At: Thu, 06 Jul 2023 08:00:53 +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: Commit 349355ce3a05 ("ARM: OMAP2+: Drop legacy platform data for omap4 mcbsp") dropped prcm_fck for omap4, so the clk_src might not be available making the clk_get(src) fail. In such cases, rely on the devicetree to assign the correct parent. Signed-off-by: Andreas Kemnade --- sound/soc/ti/omap-mcbsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c index 21fa7b9787997..f9fe96b61852b 100644 --- a/sound/soc/ti/omap-mcbsp.c +++ b/sound/soc/ti/omap-mcbsp.c @@ -70,8 +70,8 @@ static int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id) fck_src = clk_get(mcbsp->dev, src); if (IS_ERR(fck_src)) { - dev_err(mcbsp->dev, "CLKS: could not clk_get() %s\n", src); - return -EINVAL; + dev_info(mcbsp->dev, "CLKS: could not clk_get() %s\n", src); + return 0; } pm_runtime_put_sync(mcbsp->dev); From patchwork Wed Jul 5 19:03:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Kemnade X-Patchwork-Id: 13303322 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 9D8D1EB64DD for ; Thu, 6 Jul 2023 08:02:41 +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 C676C847; Thu, 6 Jul 2023 10:01:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C676C847 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1688630559; bh=9DKcSFhX5xU8Z3QE29ISYIZK/HYP0q2desnOoM14v9w=; h=From:To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=ZHuIWEff7onLhDdljNG/QqSmzx9j/UM3gRUast0j02aNxapv7YRkS1i86aQJ2bghy zULb90rbU5pWjEBxXioc+iF42BEKt2RXNP4v5MQW6/NWqtIYQvFSorTiGdGIi8wRvj jj+DuFdBcZmZClQmiK+rmtU2uIqjkE6MAkGIbLgk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 95BB7F80535; Thu, 6 Jul 2023 10:01:00 +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 E28DBF80535; Thu, 6 Jul 2023 10:00:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F3C6DF80125; Wed, 5 Jul 2023 21:03:50 +0200 (CEST) Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a02:c205:3004:2154::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2A88EF80100 for ; Wed, 5 Jul 2023 21:03:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2A88EF80100 Received: from p200300ccff0adc001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff0a:dc00:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qH7mi-0017Xs-Te; Wed, 05 Jul 2023 21:03:28 +0200 Received: from andi by aktux with local (Exim 4.96) (envelope-from ) id 1qH7mi-001UQp-1o; Wed, 05 Jul 2023 21:03:28 +0200 From: Andreas Kemnade To: bcousson@baylibre.com, tony@atomide.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, peter.ujfalusi@gmail.com, jarkko.nikula@bitmer.com, dmitry.torokhov@gmail.com, andreas@kemnade.info, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 2/3] ASoC: tlv320aic3x: use BCLK instead of MCLK if not in master mode Date: Wed, 5 Jul 2023 21:03:23 +0200 Message-Id: <20230705190324.355282-3-andreas@kemnade.info> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230705190324.355282-1-andreas@kemnade.info> References: <20230705190324.355282-1-andreas@kemnade.info> MIME-Version: 1.0 X-MailFrom: andreas@kemnade.info 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: EPRR36FLVUKF6MSTYXPTXNWJCMSRFYMQ X-Message-ID-Hash: EPRR36FLVUKF6MSTYXPTXNWJCMSRFYMQ X-Mailman-Approved-At: Thu, 06 Jul 2023 08:00:54 +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: Required to have audio output on Epson Moverio BT-200. Audio chip there is marked with AC31051. Audio output is silent there without that clock register set. Signed-off-by: Andreas Kemnade --- sound/soc/codecs/tlv320aic3x.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 56e795a00e22f..87929e210b55e 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -1234,6 +1234,10 @@ static int aic3x_set_dai_sysclk(struct snd_soc_dai *codec_dai, struct snd_soc_component *component = codec_dai->component; struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); + /* probably no mclk if not master, so rely on bitclk */ + if (!aic3x->master) + clk_id = 2; + /* set clock on MCLK or GPIO2 or BCLK */ snd_soc_component_update_bits(component, AIC3X_CLKGEN_CTRL_REG, PLLCLK_IN_MASK, clk_id << PLLCLK_IN_SHIFT); From patchwork Wed Jul 5 19:03:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Kemnade X-Patchwork-Id: 13303323 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 75F59EB64D9 for ; Thu, 6 Jul 2023 08:02:48 +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 6210A857; Thu, 6 Jul 2023 10:01:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6210A857 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1688630565; bh=uwv5vX0EvbUJFyybNY7YJL2N7qs1n1kED892nmOMY70=; h=From:To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=tg+ZZM7Kc5Wx268YGULRuGfwcG3B36xT7K6wNFmmneULMiMhJtzb7h01BxuW9KP96 yrMisu9ToCIUJqp6UnTUPEsbQXtoJYPMuf1tEIKKZckykAC/rsw4JQVhLcTZ8Bqrn/ wxV6nSYlSbQY65GYLNvqxR8QR9zdrdJ/VUe6nnkA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9EB33F80567; Thu, 6 Jul 2023 10:01:01 +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 09AFDF80568; Thu, 6 Jul 2023 10:01:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1B3A4F80125; Wed, 5 Jul 2023 21:03:53 +0200 (CEST) Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a02:c205:3004:2154::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id AF99EF80132 for ; Wed, 5 Jul 2023 21:03:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AF99EF80132 Received: from p200300ccff0adc001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff0a:dc00:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qH7mk-0017Y1-DS; Wed, 05 Jul 2023 21:03:30 +0200 Received: from andi by aktux with local (Exim 4.96) (envelope-from ) id 1qH7mj-001UQu-3D; Wed, 05 Jul 2023 21:03:30 +0200 From: Andreas Kemnade To: bcousson@baylibre.com, tony@atomide.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, peter.ujfalusi@gmail.com, jarkko.nikula@bitmer.com, dmitry.torokhov@gmail.com, andreas@kemnade.info, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 3/3] ARM: dts: omap4: embt2ws: Add audio support Date: Wed, 5 Jul 2023 21:03:24 +0200 Message-Id: <20230705190324.355282-4-andreas@kemnade.info> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230705190324.355282-1-andreas@kemnade.info> References: <20230705190324.355282-1-andreas@kemnade.info> MIME-Version: 1.0 X-MailFrom: andreas@kemnade.info 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: 3ONSV6X6FP2JVDRPUY5MO3CSLI7YAJLC X-Message-ID-Hash: 3ONSV6X6FP2JVDRPUY5MO3CSLI7YAJLC X-Mailman-Approved-At: Thu, 06 Jul 2023 08:00:54 +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: There is a headset jack on the connection between control unit and display. Wire things up to have audio output with MCBSP2 as a master. Signed-off-by: Andreas Kemnade --- arch/arm/boot/dts/omap4-epson-embt2ws.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/omap4-epson-embt2ws.dts b/arch/arm/boot/dts/omap4-epson-embt2ws.dts index 5e9a997f686b0..ee86981b2e448 100644 --- a/arch/arm/boot/dts/omap4-epson-embt2ws.dts +++ b/arch/arm/boot/dts/omap4-epson-embt2ws.dts @@ -46,6 +46,24 @@ key-lock { }; }; + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "BT2 Sound"; + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&sound_master>; + simple-audio-card,frame-master = <&sound_master>; + + sound_master: simple-audio-card,cpu { + system-clock-frequency = <24000000>; + sound-dai = <&mcbsp2>; + }; + + simple-audio-card,codec { + sound-dai = <&tlv320aic3x>; + system-clock-frequency = <24000000>; + }; + }; + unknown_supply: unknown-supply { compatible = "regulator-fixed"; regulator-name = "unknown"; @@ -274,6 +292,9 @@ &mcbsp2 { #sound-dai-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&mcbsp2_pins>; + assigned-clocks = <&abe_clkctrl OMAP4_MCBSP2_CLKCTRL 24>; + assigned-clock-parents = <&abe_clkctrl OMAP4_MCBSP2_CLKCTRL 26>; + status = "okay"; };