Hi community
We want to connected a Colibri IMX6DL 512MB Module to a Audio DSP ADAU1467, so we can play and record audio to/from this Audio DSP.
Our Goal is to use the TDM Signals like described in this Blog, to transmit 8 Channels and receive 8 Channels from the Audio DSP. The DSP works as clock master, as there are many other ADC’s and DAC’s connected to it. So the DSP provides the Bitclock and Frameclock to the imx6
The existing audio codec on the colibri module (sgtl15000) should be deactivated and only the DSP connection should appear as a soundcard on linux.
So we deactivated the sgtl15000 and route the ssi2 to the AUD4 and use the simple-audio-card with a dummy codec. The Input clock is configured for 48kHz sampling rate and 8 Channels with Slot width 32 Bit. This leads to a frequency of 12288000Hz.
I used the device-tree from imx6dl-colibri-eval-v3.dts
and added following changes:
&iomuxc {
/* remove existing sgtl15000 pinctrl */
/delete-node/ pinctrl_audmux;
/* add pinctrl to use AUD4 */
pinctrl_audmux: audmuxgrp {
fsl,pins = <
MX6QDL_PAD_DISP0_DAT18__AUD4_RXFS 0x130b0
MX6QDL_PAD_DISP0_DAT19__AUD4_RXC 0x130b0
MX6QDL_PAD_DISP0_DAT20__AUD4_TXC 0x130b0
MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x130b0
MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0
MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0
>;
};
};
#define AUD_PORT_2 1
#define AUD_PORT_4 3
&audmux {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_audmux>;
status = "okay";
/*
* SSI2 on AUDMUX Port 2
* PTCR1:
* - TFS_DIR 1 // TXFS is an output
* - TFSEL 3 // TSFS Source Port 4
* - TCLKDIR 1 // TCLK is an output
* - TCSEL 3 // TCLK Source Port 4
* - RFS_DIR 1 // RXFS is an output
* - RFSEL 3 // RXFS Source Port 4
* - RCLKDIR 1 // RCLK is an output
* - RCSEL 3 // RCLK Source Port 4
* - SYN 1 // Synchronous mode (4-wire interface)
* PDCR1:
* - RXDSEL 4
* - TXRXEN 0
* - MODE 0
* - INMMASK 0
*
* AUD4 on AUDMUX Port 4
* - TFS_DIR 0 // TXFS as input
* - TFSEL 0 // will be ignored when TFS_DIR = 0
* - TCLKDIR 0 // TCLK as Input
* - TCSEL 0 // will be ignored when TCLKDIR = 0
* - RFS_DIR 0 // RFS as Input
* - RFSEL 0 // will be ignored when RFS_DIR = 0
* - RCLKDIR 0 // RCLK as Input
* - RCSEL 0 // will be ignored when RCLKDIR = 0
* - SYN 1 // Synchronous mode (4-wire interface)
*
* PDCR4: 0x0000 0000
* - RXDSEL 0
* - TXRXEN 0
* - MODE 0
* - INMMASK 0
*/
ssi2 {
fsl,audmux-port = <AUD_PORT_1>;
fsl,port-config = <
(IMX_AUDMUX_V2_PTCR_TFSDIR | IMX_AUDMUX_V2_PTCR_TFSEL(AUD_PORT_4) | IMX_AUDMUX_V2_PTCR_TCLKDIR | IMX_AUDMUX_V2_PTCR_TCSEL(AUD_PORT_4) | IMX_AUDMUX_V2_PTCR_RFSDIR | IMX_AUDMUX_V2_PTCR_RFSEL(AUD_PORT_4) | IMX_AUDMUX_V2_PTCR_RCLKDIR | IMX_AUDMUX_V2_PTCR_RCSEL(AUD_PORT_4) | IMX_AUDMUX_V2_PTCR_SYN)
(IMX_AUDMUX_V2_PDCR_RXDSEL(AUD_PORT_4))
>;
};
aud4 {
fsl,audmux-port = <AUD_PORT_4>;
fsl,port-config = <
(IMX_AUDMUX_V2_PTCR_SYN)
(IMX_AUDMUX_V2_PDCR_RXDSEL(AUD_PORT_2))
>;
};
};
&i2c2 {
/delete-node/ sgtl5000@a;
};
&ssi2 {
status = "okay";
};
/{
/delete-node/ sound;
codec_test: codec_test {
compatible = "linux,snd-soc-dummy";
#sound-dai-cells = <0>;
status = "okay";
};
sound@2 {
compatible = "simple-audio-card";
model = "ssi-test";
ssi-controller = <&ssi2>;
simple-audio-card,name = "ssi-test";
simple-audio-card,format="dsp_a";
simple-audio-card,frame-master = <&codec_test>;
simple-audio-card,bitclock-master = <&codec_test>;
sound2_ssi: simple-audio-card,cpu {
sound-dai = <&ssi2>;
system-clock-frequency = <12288000>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <16>;
};
sound2codec: simple-audio-card,codec {
sound-dai = <&codec_test>;
};
};
};
When play some sound through the ssi-test
soundcard i can see some data on the aud4 TXD output pin with a logic analyzer. But the Data is not synced to the input clock instead it look’s like it is synced to another clock (maybe 44100 from the sgtl1500 driver?).
I have tried several different combinations with different data format (dsp_a, dsp_b, left_justified) and configure the ssi port for i2s-master or i2s-slave with the same result. As the dsp is quite flexible for the input format i just want to see some audio data synced to the input clock.
Do you have any suggestions, what i have missed or wrongly configured?
Best regards
Martin