diff mbox series

ARM: dts: imx6ul: Switch to fsl-asoc-card sound card

Message ID 1619664739-12589-1-git-send-email-shengjiu.wang@nxp.com (mailing list archive)
State New, archived
Headers show
Series ARM: dts: imx6ul: Switch to fsl-asoc-card sound card | expand

Commit Message

Shengjiu Wang April 29, 2021, 2:52 a.m. UTC
There is issue with simple sound card, the simple sound
card can't configure the pll of codec.

[  115.352669] wm8960 1-001a: failed to configure clock
[  115.358843] wm8960 1-001a: ASoC: error at snd_soc_dai_hw_params on wm8960-hifi: -22

So Switch to fsl-asoc-card and the fsl-asoc-card can support
asrc module as front-end component.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 arch/arm/boot/dts/imx6ul-14x14-evk.dtsi | 50 +++++++++++--------------
 1 file changed, 21 insertions(+), 29 deletions(-)

Comments

Marco Felsch April 29, 2021, 7:09 a.m. UTC | #1
Hi,

thanks for the patch.

On 21-04-29 10:52, Shengjiu Wang wrote:
> There is issue with simple sound card, the simple sound
> card can't configure the pll of codec.

Hm, than we should fix this rather than moving to the 'old'
'fsl,imx-audio-wm8960'. But that only my opinion.

Regards,
  Marco
Shengjiu Wang April 29, 2021, 10:03 a.m. UTC | #2
On Thu, Apr 29, 2021 at 3:09 PM Marco Felsch <m.felsch@pengutronix.de> wrote:
>
> Hi,
>
> thanks for the patch.
>
> On 21-04-29 10:52, Shengjiu Wang wrote:
> > There is issue with simple sound card, the simple sound
> > card can't configure the pll of codec.
>
> Hm, than we should fix this rather than moving to the 'old'
> 'fsl,imx-audio-wm8960'. But that only my opinion.
>

Thanks for your comments.

But fsl-asoc-card is better than simple sound card, it not only
avoids the pll error but also supports the ASRC module.
And this patch is to use the same machine driver as the imx6qdl
platform.

Best regards
Wang shengjiu
Shawn Guo May 22, 2021, 2:07 p.m. UTC | #3
On Thu, Apr 29, 2021 at 10:52:19AM +0800, Shengjiu Wang wrote:
> There is issue with simple sound card, the simple sound
> card can't configure the pll of codec.
> 
> [  115.352669] wm8960 1-001a: failed to configure clock
> [  115.358843] wm8960 1-001a: ASoC: error at snd_soc_dai_hw_params on wm8960-hifi: -22
> 
> So Switch to fsl-asoc-card and the fsl-asoc-card can support
> asrc module as front-end component.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>

Applied, thanks.
Shawn Guo May 22, 2021, 2:09 p.m. UTC | #4
On Thu, Apr 29, 2021 at 10:52:19AM +0800, Shengjiu Wang wrote:
> There is issue with simple sound card, the simple sound
> card can't configure the pll of codec.
> 
> [  115.352669] wm8960 1-001a: failed to configure clock
> [  115.358843] wm8960 1-001a: ASoC: error at snd_soc_dai_hw_params on wm8960-hifi: -22
> 
> So Switch to fsl-asoc-card and the fsl-asoc-card can support
> asrc module as front-end component.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>

Changed subject prefix to "ARM: dts: imx6ul-14x14-evk: " when applying.

Shawn
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi b/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi
index 5a1e10def6ef..779cc536566d 100644
--- a/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi
+++ b/arch/arm/boot/dts/imx6ul-14x14-evk.dtsi
@@ -60,38 +60,26 @@  reg_can_3v3: regulator-can-3v3 {
 		gpios = <&gpio_spi 3 GPIO_ACTIVE_LOW>;
 	};
 
-	sound {
-		compatible = "simple-audio-card";
-		simple-audio-card,name = "mx6ul-wm8960";
-		simple-audio-card,format = "i2s";
-		simple-audio-card,bitclock-master = <&dailink_master>;
-		simple-audio-card,frame-master = <&dailink_master>;
-		simple-audio-card,widgets =
-			"Microphone", "Mic Jack",
-			"Line", "Line In",
-			"Line", "Line Out",
-			"Speaker", "Speaker",
-			"Headphone", "Headphone Jack";
-		simple-audio-card,routing =
+	sound-wm8960 {
+		compatible = "fsl,imx-audio-wm8960";
+		model = "wm8960-audio";
+		audio-cpu = <&sai2>;
+		audio-codec = <&codec>;
+		audio-asrc = <&asrc>;
+		hp-det-gpio = <&gpio5 4 0>;
+		audio-routing =
 			"Headphone Jack", "HP_L",
 			"Headphone Jack", "HP_R",
-			"Speaker", "SPK_LP",
-			"Speaker", "SPK_LN",
-			"Speaker", "SPK_RP",
-			"Speaker", "SPK_RN",
-			"LINPUT1", "Mic Jack",
+			"Ext Spk", "SPK_LP",
+			"Ext Spk", "SPK_LN",
+			"Ext Spk", "SPK_RP",
+			"Ext Spk", "SPK_RN",
+			"LINPUT2", "Mic Jack",
 			"LINPUT3", "Mic Jack",
-			"RINPUT1", "Mic Jack",
-			"RINPUT2", "Mic Jack";
-
-		simple-audio-card,cpu {
-			sound-dai = <&sai2>;
-		};
-
-		dailink_master: simple-audio-card,codec {
-			sound-dai = <&codec>;
-			clocks = <&clks IMX6UL_CLK_SAI2>;
-		};
+			"RINPUT1", "AMIC",
+			"RINPUT2", "AMIC",
+			"Mic Jack", "MICB",
+			"AMIC", "MICB";
 	};
 
 	spi4 {
@@ -145,6 +133,10 @@  codec: wm8960@1a {
 		compatible = "wlf,wm8960";
 		reg = <0x1a>;
 		wlf,shared-lrclk;
+		wlf,hp-cfg = <3 2 3>;
+		wlf,gpio-cfg = <1 3>;
+		clocks = <&clks IMX6UL_CLK_SAI2>;
+		clock-names = "mclk";
 	};
 
 	camera@3c {