Sph0645 in imx6ull

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sph0645 in imx6ull

886 Views
deepanrajanbara
Contributor IV

Hi,

Ours is a custom board based on imx6ull and we are using sph0645 microphone in our design. We have configured the sai3 interface to which the microphone is connected in the dtsi file but we are not able to get the proper clock when configured.Please find the dtsi file configuration below.

&sai3 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_sai3>;
    assigned-clocks = <&clks IMX6UL_CLK_SAI3_SEL>,
            <&clks IMX6UL_CLK_SAI3>;
    assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
    assigned-clock-rates = <0>, <3072000>;
    status = "okay";
};

pinctrl_sai3: pinctrl_sai3{
                        fsl,pins = <
                                MX6UL_PAD_LCD_DATA13__SAI3_TX_BCLK      0x17088
                                MX6UL_PAD_LCD_DATA12__SAI3_TX_SYNC      0x17088
                                MX6UL_PAD_LCD_DATA14__SAI3_RX_DATA      0x11088
                        >;
                };

Please help us understand that the configuration done above is proper or is there any changes to be configured in the dtsi file

Thank you,

Deepanraj.A

Labels (1)
0 Kudos
7 Replies

784 Views
igorpadykov
NXP Employee
NXP Employee

Hi Deepanraj

sph0645 microphone is supported in TechNexion PICO-IMX7D:

Home · TechNexion/tfa98xx Wiki · GitHub 

linux-tn-imx/imx7d-pico.dtsi at tn-imx_4.14.98_2.0.0_ga-stable · TechNexion/linux-tn-imx · GitHub 

linux-tn-imx/imx7d-pico.dts at tn-imx_4.14.98_2.0.0_ga-stable · TechNexion/linux-tn-imx · GitHub 

linux-tn-imx/imx-sph0645.c at tn-imx_4.14.98_2.0.0_ga-stable · TechNexion/linux-tn-imx · GitHub 

since sai is the same as in i.MX6ULL one can try to port it for it.

Above sai settings use assigned-clock-rates = <0>, <24576000>; for sai, for i.MX6ULL one can look

at similar setting:

linux-tn-imx/imx6ull-14x14-ddr3-arm2-cs42888.dts at tn-imx_4.14.98_2.0.0_ga-stable · TechNexion/linu... 


Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

784 Views
deepanrajanbara
Contributor IV

Hi Igor,

Thanks for the support, I have tried the same configuration and driver as mentioned above. But when we do arecord and get the hexdump of the file we are getting the below output

arecord -c1 -r 16000 -d 10 -f S32_LE -t wav -V mono -v file.wav

0000000 4952 4646 c424 0009 4157 4556 6d66 2074
0000010 0010 0000 0001 0001 3e80 0000 fa00 0000
0000020 0004 0020 6164 6174 c400 0009 0000 ffff
0000030 0000 ffff 0000 ffff 0000 ffff 0000 ffff
*
009c420

There is no audio recorded in the file. Please let us know what could be the issue.

0 Kudos

784 Views
igorpadykov
NXP Employee
NXP Employee

Hi Deepanraj

sph0645 microphone is not supported in NXP BSPs, suggest to

proceed with help of Commercial Support and Engineering Services | NXP 

Best regards
igor

0 Kudos

784 Views
deepanrajanbara
Contributor IV

Acutally when added the driver we are getting

imx-sph0645 sound-sph0645: clock not found.

What could be the reason.

Thank you,

Deepanraj.A

0 Kudos

784 Views
igorpadykov
NXP Employee
NXP Employee

suggest to debug it using NXP Linux documentation
i.MX Software and Development Tools | NXP 

AN4553 Using Open Source Debugging Tools for Linux on i.MX Processors
https://www.nxp.com/docs/en/application-note/AN4553.pdf

Just as example of such debugging:

https://community.nxp.com/thread/500755 

Best regards
igor

0 Kudos

784 Views
deepanrajanbara
Contributor IV

Hi Igor,

Thank you, Already checked the below link

Just as example of such debugging:

I2S microphone (SPH0645LM4H)  Driver Implementation with i.mx6ul 

But Above link has also not come to  a conclusion. For us the data from the device is not able to get due to the clock setting we think so. Is there any way to check the clock is configured properly in the kernel.

Thank you,

Deepanraj.A

0 Kudos

784 Views
igorpadykov
NXP Employee
NXP Employee

Hi Deepanraj

right, it did not come to  a conclusion even was escalated internally.

Reason is that reference board has not such device and not possible to debug it.

For that reason I suggested to proceed with help of Commercial Support and Engineering Services | NXP 

Best regards
igor

0 Kudos