imx8mn: Trying to get EASRC to work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux