igor thx for hints!
I implemented max98089 on base of imx-sgtl5000.c driver. Now following problems exists. I get LRCKL and BCKL but no data output. I checked all settings and registers but don't know how i should go on further...
First of all configuration:
Kernel: 3.14.28-1.0.0ga
Master = MAX98089
Slave = imx6
Patch: see attachment
WAV File: piano2.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
pcm3244s.wav' : Signed 32 bit Little Endian, Rate 44100 Hz, Stereo
Schematics
-> see attachment
I2S0_CK = AUD3_TXC
I2S0_LRCK = AUD3_TXFS
I2S0_SDOUT = AUD3_TXD
I2S0_SDIN = AUD3_RXD
AUDIO_MCK = CCM_CLK02
GPIO6 = GPIO3_IO06
Device Tree:
-> see attachment
pinctrl_samx6i_hog: hoggrp-samx6i {
fsl,pins = <
MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x130b0 /* AUDIO MCLK */
MX6QDL_PAD_EIM_DA4__GPIO3_IO04 0x80000000 /* AUDIO IRQ */
>;
};
pinctrl_samx6i_audmux: audmuxgrp-samx6i {
fsl,pins = <
MX6QDL_PAD_CSI0_DAT7__AUD3_RXD 0x130b0
MX6QDL_PAD_CSI0_DAT4__AUD3_TXC 0x130b0
MX6QDL_PAD_CSI0_DAT5__AUD3_TXD 0x110b0
MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x130b0
>;
};
&audmux {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_samx6i_audmux>;
status = "okay";
};
&ssi2 {
fsl,mode = "i2s-slave";
status = "okay";
};
| sound { |
| compatible = "fsl,imx-audio-max98088"; |
model = "imx-max98088";
cpu-dai = <&smarc_i2s1>; /* is define on ssi2 - change to ssi2 comes to same status as described above*/
audio-codec = <&codec>;
audio-routing =
"Headphone","HPL",
"Headphone","HPR",
"Speaker","SPKL",
"Speaker","SPKR";
mux-int-port = <2>;
mux-ext-port = <3>;
};
codec: max98088@10 {
compatible = "maxim,max98088";
reg=<0x10>;
clocks = <&clks 200>;
clock-names = "codec_mclk";
clock-frequency = <24000000>;
status = "okay";
};
Register of max98089 when after playing file.
-> see attachment
Situation:
1.) MAX98089 is recognised and files can be played with aplay
2.) Configuration by i2c on max98089 is done when playing file (see attached register settings which reflects settings when playing file)
3.) Status after boot: AUD3_TXC = no clock, AUD3_TXFS = no clock, AUD3_TXD = high (1.8V) AUD3_RXD = low (0V), AUDIO_MCLK = 24 MHZ as configured, Register 0x10 of MAX98089 for clock is set correctly, Other configurations for max98089 (Reg 0x10 - 0x13, 0x14 - 0x18) are also fine (acts in master mode)
4.) When i play file AUD3_TXFS = 24 KHZ, AUD3_TXC = Jumps betweeen 1.5 and 1.7 MHZ, AUD3_TXD = high, AUD3_RXD = low.
5.) When audio file is played i get an Input/Output error on console.
6.) When file is finally played clocks on AUD3_TXFS and AUD3_TXC still remains until reboot
7.) Playing a second file only changes TXFS and TXC.
From my information gathering:
AUD3_TXC = BCLK sould be 44.8 x 16 x 2 -> which means 1.5 MHZ
AUD3_TXFS = LRCLK should be 44,8. Because of the (16 (BIT) x 2 (stereo)) / BCLK. TXFS could be wrong because of Register 0x15 Output Frequency of BCLK which is set to 64 x LRCLK.
Trying with file pcm3244.wav is more strange. Here AUD3_TXFS = 22 KHZ and AUD3_TXC jungs between 1.2 and 1.5 MHZ. So this looks strange...
May someone have same issues or could see any error in configuration of DT?
TIA
Horstl