Hello.
Trying to get microphone and audio working using WM8960 codec based on ReSpeaker_2_Mics_Pi_HAT dev board with custom IMX6ULL board.
Here is schematic of ReSpeaker_2_Mics_Pi_HAT dev :
So there are WM8960 with Headphone jack and two microphones SA0-3729.
As MCLK pin of WM8960 clocked from separate 24MHz quartz and DACLRC shorted with ADCLRC the following wiring with IMX6ULL implemented:
|-----------------------|-------------------------------------|-------------------------------|
| IMX6ULL GPIO | IMX6ULL GPIO FUNC | WM8960 GPIO |
|-----------------------|-------------------------------------|-------------------------------|
| SD1_DATA0 - SAI2_TX_SYNC - DACLRC |
| SD1_DATA3 - SAI2_TX - DACDAT |
| SD1_DATA1 - SAI2_TX_BCLK - BCLK |
| SD1_CMD - SAI2_RX_SYNC - |
| SD1_DATA2 - SAI2_RX_DATA - ADCDAT |
| SD1_CLK - SAI2_MCLK - |---------------------------------------------------------------------------------------------
E.g. SAI2_RX_SYNC and SAI2_MCLK pins of IMX6ULL left unconnected.
While all looking to IMX6ULL EVK schematic I see that all six WM8960's pins: DACLRC, DACDAT, ADCLRC, ADCDAT, BCLK and MCLK connected to relative IMX6ULL's pins.
So, I hear sounds using headset connected to jack when I play some audiofile:
$ aplay sample.wav
But no luck with recording:
$ arecord -f S24_LE -r 48000 -Dhw:0 test.wav
$ aplay -Dhw:0 -r 48000 test.wav
Just noise instead of sounds.
So I am wondering if unconnected SAI2_MCLK and SAI2_RX_SYNC can be an issue of non working microphone or something else?
Hi Almaz
one can try to tweak amixer settings:
README\mxc_amix_test\test - imx-test - i.MX Driver Test Application Software
description can be found in Linux Manual in i.MX Software and Development Tools | NXP
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------