From: Fabio Estevam <festevam@denx.de>
To: shengjiu.wang@gmail.com, broonie@kernel.org, daniel.baluta@gmail.com
Cc: alsa-devel@alsa-project.org
Subject: imx8mn: Trying to get EASRC to work
Date: Fri, 16 Jun 2023 16:39:54 -0300 [thread overview]
Message-ID: <87d11267e2d93256e071ee7d86775cc7@denx.de> (raw)
Hi,
I am working on an imx8mn-based board with an ES9080 codec and I am
trying to get
EASCR to work. (The ES9080 driver is not upstreamed yet).
Audio playback works fine via simple-audio-card and here are my changes
to
get EASRC to work:
- sound-ess {
- compatible = "simple-audio-card";
- simple-audio-card,name = "ess-audio";
- simple-audio-card,format = "left_j";
- simple-audio-card,frame-master = <&s2cpu>;
- simple-audio-card,bitclock-master = <&s2cpu>;
-
- s2cpu: simple-audio-card,cpu {
- sound-dai = <&sai2>;
- dai-tdm-slot-num = <8>;
- dai-tdm-slot-width = <32>;
- };
-
- simple-audio-card,codec {
- sound-dai = <&es9080>;
- };
+ sound-es9080 {
+ compatible = "fsl,imx-audio-es9080";
+ model = "es9080-with-easrc";
+ audio-cpu = <&sai2>;
+ audio-codec = <&es9080>;
+ audio-asrc = <&easrc>;
};
};
diff --git a/sound/soc/fsl/fsl-asoc-card.c
b/sound/soc/fsl/fsl-asoc-card.c
index 8d14b5593658..27b8f2c0cd65 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -624,6 +624,14 @@ static int fsl_asoc_card_probe(struct
platform_device *pdev)
codec_dai_name = "sgtl5000";
priv->codec_priv.mclk_id = SGTL5000_SYSCLK;
priv->dai_fmt |= SND_SOC_DAIFMT_CBP_CFP;
+ } else if (of_device_is_compatible(np, "fsl,imx-audio-es9080")) {
+ codec_dai_name = "es9080";
+ priv->dai_fmt |= SND_SOC_DAIFMT_CBC_CFC;
+ priv->dai_link[1].dpcm_capture = 0;
+ priv->dai_link[2].dpcm_capture = 0;
+ priv->cpu_priv.slot_width = 32;
+ priv->card.dapm_routes = audio_map_tx;
+ priv->card.num_dapm_routes = ARRAY_SIZE(audio_map_tx);
} else if (of_device_is_compatible(np, "fsl,imx-audio-tlv320aic32x4"))
{
codec_dai_name = "tlv320aic32x4-hifi";
priv->dai_fmt |= SND_SOC_DAIFMT_CBP_CFP;
@@ -902,6 +910,7 @@ static const struct of_device_id
fsl_asoc_card_dt_ids[] = {
{ .compatible = "fsl,imx-audio-tlv320aic32x4", },
{ .compatible = "fsl,imx-audio-tlv320aic31xx", },
{ .compatible = "fsl,imx-audio-sgtl5000", },
+ { .compatible = "fsl,imx-audio-es9080", },
{ .compatible = "fsl,imx-audio-wm8962", },
{ .compatible = "fsl,imx-audio-wm8960", },
{ .compatible = "fsl,imx-audio-mqs", },
The es9080-with-easrc card is registered, but after running
'speaker-test' no
audio output is present.
Is there a way to use the EASRC driver with the simple-audio-card
without
touching fsl-asoc-card.c? That would be preferable.
Would you have any suggestions as to what may be missing to get EASRC to
work?
Thanks,
Fabio Estevam
next reply other threads:[~2023-06-16 19:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-16 19:39 Fabio Estevam [this message]
2023-06-16 20:42 ` imx8mn: Trying to get EASRC to work Fabio Estevam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d11267e2d93256e071ee7d86775cc7@denx.de \
--to=festevam@denx.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=daniel.baluta@gmail.com \
--cc=shengjiu.wang@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox