Hi,
I have a board with i.MX6 and a WM8510 codec and I can play audio using an old vendor kernel (3.14) and my own asoc machine driver [1].
Now I want to run this with something more recent (currently trying on 4.14) and upstream drivers like simple-card or fsl-asoc-card.
The problem is I'm only getting a little bit of noise from the speakers but nothing more.
I would really appreciate it if someone more knowledgeable could have a quick look and maybe come up with some ideas how I can proceed debugging.
Thanks, Frieder
My devicetree setup for the simple-card approach looks like this:
sound { compatible = "simple-audio-card"; simple-audio-card,name = "wm8510-audio"; simple-audio-card,format = "i2s"; simple-audio-card,bitclock-master = <&sound_codec>; simple-audio-card,frame-master = <&sound_codec>; simple-audio-card,widgets = "Speaker", "Ext Spk"; simple-audio-card,routing = "Ext Spk", "SPKOUTP", "Ext Spk", "SPKOUTN";
assigned-clocks = <&clks IMX6QDL_CLK_CKO2_SEL>, <&clks IMX6QDL_CLK_CKO2>; assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>, <&clks IMX6QDL_CLK_CKO2_PODF>; assigned-clock-rates = <0 24000000>;
sound_master: simple-audio-card,cpu { sound-dai = <&ssi2>; };
sound_codec: simple-audio-card,codec { sound-dai = <&codec>; clocks = <&clks IMX6QDL_CLK_CKO2>; }; };
&audmux { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_audmux>; status = "okay";
ssi2 { fsl,audmux-port = <1>; fsl,port-config = < (IMX_AUDMUX_V2_PTCR_SYN | IMX_AUDMUX_V2_PTCR_TFSEL(4) | IMX_AUDMUX_V2_PTCR_TCSEL(4) | IMX_AUDMUX_V2_PTCR_TFSDIR | IMX_AUDMUX_V2_PTCR_TCLKDIR) IMX_AUDMUX_V2_PDCR_RXDSEL(4) >; };
aud5 { fsl,audmux-port = <4>; fsl,port-config = < IMX_AUDMUX_V2_PTCR_SYN IMX_AUDMUX_V2_PDCR_RXDSEL(1) >; }; };
&ssi2 { status = "okay"; };
&i2c2 { status = "okay"; clock-frequency = <100000>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c2>;
codec: wm8510@1a { #sound-dai-cells = <0>; compatible = "wlf,wm8510"; reg = <0x1a>; }; };
&iomuxc { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sound_mclk>;
pinctrl_sound_mclk: sound { /* WM8510 MCLK */ fsl,pins = < MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x130b0 >; };
pinctrl_audmux: audmux { fsl,pins = < MX6QDL_PAD_KEY_COL0__AUD5_TXC 0x130b0 MX6QDL_PAD_KEY_COL1__AUD5_TXFS 0x130b0 MX6QDL_PAD_KEY_ROW1__AUD5_RXD 0x130b0 MX6QDL_PAD_KEY_ROW0__AUD5_TXD 0x130b0 >; }; };
Hello Frieder,
Perhaps this is because simple-card does not have capability of configuring WM8510 codec PLL and clock divisors? See this thread I started few years back: https://mailman.alsa-project.org/pipermail/alsa-devel/2017-September/125767....
We ended up patching those three lines into WM8510 codec driver. We would still be interested to implement this missing link in a proper, generic manner, if we could just figure out what would be the correct place to do it.
-Jukka
-----Original Message----- From: Alsa-devel alsa-devel-bounces@alsa-project.org On Behalf Of Schrempf Frieder Sent: torstai 28. helmikuuta 2019 10.54 To: alsa-devel@alsa-project.org Subject: [SUSPICIOUS MESSAGE] [alsa-devel] WM8510 on i.MX6
Hi,
I have a board with i.MX6 and a WM8510 codec and I can play audio using an old vendor kernel (3.14) and my own asoc machine driver [1].
Now I want to run this with something more recent (currently trying on 4.14) and upstream drivers like simple-card or fsl-asoc-card.
The problem is I'm only getting a little bit of noise from the speakers but nothing more.
I would really appreciate it if someone more knowledgeable could have a quick look and maybe come up with some ideas how I can proceed debugging.
Thanks, Frieder
[1] https://secure-web.cisco.com/1cEfWyuVF6-7tLBWcKcbV4q0wrmACgHA_c9qGq80VjziKKN...
My devicetree setup for the simple-card approach looks like this:
sound { compatible = "simple-audio-card"; simple-audio-card,name = "wm8510-audio"; simple-audio-card,format = "i2s"; simple-audio-card,bitclock-master = <&sound_codec>; simple-audio-card,frame-master = <&sound_codec>; simple-audio-card,widgets = "Speaker", "Ext Spk"; simple-audio-card,routing = "Ext Spk", "SPKOUTP", "Ext Spk", "SPKOUTN";
assigned-clocks = <&clks IMX6QDL_CLK_CKO2_SEL>, <&clks IMX6QDL_CLK_CKO2>; assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>, <&clks IMX6QDL_CLK_CKO2_PODF>; assigned-clock-rates = <0 24000000>;
sound_master: simple-audio-card,cpu { sound-dai = <&ssi2>; };
sound_codec: simple-audio-card,codec { sound-dai = <&codec>; clocks = <&clks IMX6QDL_CLK_CKO2>; }; };
&audmux { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_audmux>; status = "okay";
ssi2 { fsl,audmux-port = <1>; fsl,port-config = < (IMX_AUDMUX_V2_PTCR_SYN | IMX_AUDMUX_V2_PTCR_TFSEL(4) | IMX_AUDMUX_V2_PTCR_TCSEL(4) | IMX_AUDMUX_V2_PTCR_TFSDIR | IMX_AUDMUX_V2_PTCR_TCLKDIR) IMX_AUDMUX_V2_PDCR_RXDSEL(4) >; };
aud5 { fsl,audmux-port = <4>; fsl,port-config = < IMX_AUDMUX_V2_PTCR_SYN IMX_AUDMUX_V2_PDCR_RXDSEL(1) >; }; };
&ssi2 { status = "okay"; };
&i2c2 { status = "okay"; clock-frequency = <100000>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c2>;
codec: wm8510@1a { #sound-dai-cells = <0>; compatible = "wlf,wm8510"; reg = <0x1a>; }; };
&iomuxc { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sound_mclk>;
pinctrl_sound_mclk: sound { /* WM8510 MCLK */ fsl,pins = < MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x130b0 >; };
pinctrl_audmux: audmux { fsl,pins = < MX6QDL_PAD_KEY_COL0__AUD5_TXC 0x130b0 MX6QDL_PAD_KEY_COL1__AUD5_TXFS 0x130b0 MX6QDL_PAD_KEY_ROW1__AUD5_RXD 0x130b0 MX6QDL_PAD_KEY_ROW0__AUD5_TXD 0x130b0 >; }; }; _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://secure-web.cisco.com/12rjkHN8w-zo4qdOKo1yt9xPPcmBaclCQR4WQF2k_Jj49zF...
Hi Jukka,
thanks a lot for your response. Good to know about this issue and that there are some other users of WM8510 out there.
Unfortunately, for me your patch didn't make any difference. I still don't get sound. Probably there is still something else I'm missing, maybe on the SoC side.
The mclk to the codec is ok and I double checked all my devicetree settings, but still no luck.
Thanks, Frieder
On 28.02.19 16:59, Hynninen Jukka wrote:
Hello Frieder,
Perhaps this is because simple-card does not have capability of configuring WM8510 codec PLL and clock divisors? See this thread I started few years back: https://mailman.alsa-project.org/pipermail/alsa-devel/2017-September/125767....
We ended up patching those three lines into WM8510 codec driver. We would still be interested to implement this missing link in a proper, generic manner, if we could just figure out what would be the correct place to do it.
-Jukka
-----Original Message----- From: Alsa-devel alsa-devel-bounces@alsa-project.org On Behalf Of Schrempf Frieder Sent: torstai 28. helmikuuta 2019 10.54 To: alsa-devel@alsa-project.org Subject: [SUSPICIOUS MESSAGE] [alsa-devel] WM8510 on i.MX6
Hi,
I have a board with i.MX6 and a WM8510 codec and I can play audio using an old vendor kernel (3.14) and my own asoc machine driver [1].
Now I want to run this with something more recent (currently trying on 4.14) and upstream drivers like simple-card or fsl-asoc-card.
The problem is I'm only getting a little bit of noise from the speakers but nothing more.
I would really appreciate it if someone more knowledgeable could have a quick look and maybe come up with some ideas how I can proceed debugging.
Thanks, Frieder
[1] https://secure-web.cisco.com/1cEfWyuVF6-7tLBWcKcbV4q0wrmACgHA_c9qGq80VjziKKN...
My devicetree setup for the simple-card approach looks like this:
sound { compatible = "simple-audio-card"; simple-audio-card,name = "wm8510-audio"; simple-audio-card,format = "i2s"; simple-audio-card,bitclock-master = <&sound_codec>; simple-audio-card,frame-master = <&sound_codec>; simple-audio-card,widgets = "Speaker", "Ext Spk"; simple-audio-card,routing = "Ext Spk", "SPKOUTP", "Ext Spk", "SPKOUTN";
assigned-clocks = <&clks IMX6QDL_CLK_CKO2_SEL>, <&clks IMX6QDL_CLK_CKO2>; assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>, <&clks IMX6QDL_CLK_CKO2_PODF>; assigned-clock-rates = <0 24000000>;
sound_master: simple-audio-card,cpu { sound-dai = <&ssi2>; };
sound_codec: simple-audio-card,codec { sound-dai = <&codec>; clocks = <&clks IMX6QDL_CLK_CKO2>; }; };
&audmux { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_audmux>; status = "okay";
ssi2 { fsl,audmux-port = <1>; fsl,port-config = < (IMX_AUDMUX_V2_PTCR_SYN | IMX_AUDMUX_V2_PTCR_TFSEL(4) | IMX_AUDMUX_V2_PTCR_TCSEL(4) | IMX_AUDMUX_V2_PTCR_TFSDIR | IMX_AUDMUX_V2_PTCR_TCLKDIR) IMX_AUDMUX_V2_PDCR_RXDSEL(4) >; };
aud5 { fsl,audmux-port = <4>; fsl,port-config = < IMX_AUDMUX_V2_PTCR_SYN IMX_AUDMUX_V2_PDCR_RXDSEL(1) >; }; };
&ssi2 { status = "okay"; };
&i2c2 { status = "okay"; clock-frequency = <100000>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c2>;
codec: wm8510@1a { #sound-dai-cells = <0>; compatible = "wlf,wm8510"; reg = <0x1a>; }; };
&iomuxc { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sound_mclk>;
pinctrl_sound_mclk: sound { /* WM8510 MCLK */ fsl,pins = < MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x130b0 >; };
pinctrl_audmux: audmux { fsl,pins = < MX6QDL_PAD_KEY_COL0__AUD5_TXC 0x130b0 MX6QDL_PAD_KEY_COL1__AUD5_TXFS 0x130b0 MX6QDL_PAD_KEY_ROW1__AUD5_RXD 0x130b0 MX6QDL_PAD_KEY_ROW0__AUD5_TXD 0x130b0 >; }; }; _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://secure-web.cisco.com/12rjkHN8w-zo4qdOKo1yt9xPPcmBaclCQR4WQF2k_Jj49zF...
participants (2)
-
Hynninen Jukka
-
Schrempf Frieder