Issue with wm8960 on imx7s based custom board

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

Issue with wm8960 on imx7s based custom board

1,362 Views
jagdishgediya
Contributor I

Below is the snapshot from the schematic for hardware connections.

Audio.PNG

Codec is connected on I2C1 and SAI2.

Below are my changes in the device tree.

There is no headphone in custom board. Playback device is speaker and Capture device is MIC. both are always there , there is no jack for mic detect.

I have made related changes in device tree like pin muxing, i2c change and sai2.

But neither playback nor capture are working.

When i try to play using aplay, It gives me below error.

aplay: pcm_write:1947: write error: Input/output error       <== ERROR

Codec is getting detected in i2c bus, I have tested it through i2cdetect utility.

Few more logs.

aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: wm8960audio [wm8960-audio], device 0: HiFi wm8960-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

arecord -l

**** List of CAPTURE Hardware Devices ****
card 0: wm8960audio [wm8960-audio], device 0: HiFi wm8960-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

Am i missing anything? Any pointers or help is appreciated. 

How should i proceed to debug it?

Labels (4)
0 Kudos
6 Replies

850 Views
igorpadykov
NXP Employee
NXP Employee

Hi jagdish

one can check mclk signal with oscilloscope and disable ECSPI3 as

its signals shared with sai2, please refer to imx7d-sdb.dts

linux-2.6-imx.git - Freescale i.MX Linux Tree 

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

0 Kudos

850 Views
jagdishgediya
Contributor I

Hi igorpadykov,

Thanks for your reply.

ECSPI3 is already disabled.
Below is my pinmux for SAI2 interface in device tree.

pinctrl_sai2: sai2grp {
            fsl,pins = <
                MX7D_PAD_SD2_RESET_B__SAI2_MCLK           0x1f
                MX7D_PAD_SAI2_TX_BCLK__SAI2_TX_BCLK     0x1f                                                                                           
                MX7D_PAD_SAI2_TX_SYNC__SAI2_TX_SYNC     0x1f
                MX7D_PAD_SAI2_TX_DATA__SAI2_TX_DATA0    0x30
                MX7D_PAD_SAI2_RX_DATA__SAI2_RX_DATA0    0x1f
            >;
        };

Is it proper?

I am getting 12MHz from the processor mclk pin when i try to run aplay command. Is it a proper behaviour?

0 Kudos

850 Views
igorpadykov
NXP Employee
NXP Employee

what bsp used in the case, please try nxp bsp from

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/?h=imx_4.1.15_1.0.0_ga

also refer to sect.15.4.2 Audio attached Linux Manual

~igor

0 Kudos

850 Views
jagdishgediya
Contributor I

Thanks igorpadykov,

I am already using that BSP through yocto. 

Please let me know if there are any other inputs.

0 Kudos

850 Views
jagdishgediya
Contributor I

Using NXP BSP, I got my MIC working. But speaker is not working yet.

While playback, I am getting below error.

aplay: pcm_write:1947: write error: Input/output error

On my board, There is no headphone. Only speaker is there. Do i need to make any changes to device tree or machine driver for it?

0 Kudos